Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
Big bed generator
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
minerva
Big bed generator
Commits
1608905c
Commit
1608905c
authored
1 year ago
by
Piotr Gawron
Browse files
Options
Downloads
Patches
Plain Diff
--skipNonStandardChromosomes parameter added to skip nonstandard chromosomes
parent
416e24e2
No related branches found
Branches containing commit
No related tags found
1 merge request
!3
Add filtering for non standard chromosomes
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
generate.py
+8
-1
8 additions, 1 deletion
generate.py
with
8 additions
and
1 deletion
generate.py
+
8
−
1
View file @
1608905c
...
...
@@ -47,6 +47,8 @@ def download_ucsc_file(filename):
inputFile
=
sys
.
argv
[
1
]
db
=
sys
.
argv
[
2
]
skipNonStandardChromosomes
=
sys
.
argv
[
3
]
if
3
<
len
(
sys
.
argv
)
else
None
basename
=
ntpath
.
basename
(
inputFile
).
replace
(
"
.txt.gz
"
,
""
)
download_ucsc_file
(
"
fetchChromSizes
"
)
...
...
@@ -59,10 +61,15 @@ with open(chrom_sizes, 'w') as output_chrom_sizes:
chromosomes
=
{}
unknown_chromosomes
=
{}
if
skipNonStandardChromosomes
==
"
--skipNonStandardChromosomes
"
:
print
(
"
Skipping non standard chromosomes
"
)
with
open
(
chrom_sizes
)
as
f
:
lines
=
f
.
readlines
()
for
line
in
lines
:
chromosomes
[
line
.
split
(
"
\t
"
)[
0
]]
=
True
chromosomeName
=
line
.
split
(
"
\t
"
)[
0
]
if
skipNonStandardChromosomes
!=
"
--skipNonStandardChromosomes
"
or
"
_
"
not
in
chromosomeName
:
chromosomes
[
chromosomeName
]
=
True
output_file_unsorted
=
basename
+
"
.bed
"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment