Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
metaSNV
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
Panagiotis Mantas
metaSNV
Commits
4f3963cf
Commit
4f3963cf
authored
7 years ago
by
Robin Erich Muench
Browse files
Options
Downloads
Patches
Plain Diff
project_name bug fix
parent
fff4caff
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
metaSNV.py
+22
-11
22 additions, 11 deletions
metaSNV.py
with
22 additions
and
11 deletions
metaSNV.py
+
22
−
11
View file @
4f3963cf
...
...
@@ -91,21 +91,15 @@ def get_header(args):
f
.
close
()
args
.
ctg_len
=
args
.
project_dir
+
'
/bed_header
'
def
split_opt
(
args
):
if
args
.
n_splits
>
100
:
stderr
.
write
(
"
Maximum number of splits is 100.
\n
"
)
exit
(
1
)
def
compute_summary
(
args
):
'''
This information is required by metaSNV_post.py
'''
older_files
=
glob
(
args
.
project_dir
+
'
/bestsplits/*
'
)
if
older_files
:
stderr
.
write
(
"
\n
removing old splits.
\n
"
)
for
f
in
older_files
:
os
.
unlink
(
f
)
project_name
=
path
.
basename
(
args
.
project_dir
)
cov_dir
=
path
.
join
(
args
.
project_dir
,
'
cov
'
)
cov_files
=
glob
(
cov_dir
+
'
/*.cov
'
)
project_name
=
path
.
basename
(
args
.
project_dir
)
#
project_name = path.basename(args.project_dir)
if
not
cov_files
:
if
not
args
.
print_commands
:
stderr
.
write
(
"
Coverage files not found.
\n
"
)
...
...
@@ -122,10 +116,26 @@ def split_opt(args):
print
(
"
\n
Coverage summary here: {}
"
.
format
(
args
.
project_dir
))
print
(
"
Average vertical genome coverage:
'
{}/{}.all_cov.tab
'"
.
format
(
args
.
project_dir
,
project_name
))
print
(
"
Horizontal genome coverage (1X):
'
{}/{}.all_perc.tab
'"
.
format
(
args
.
project_dir
,
project_name
))
print
(
""
)
cmd
=
[
'
python
'
,
'
{}/src/collapse_coverages.py
'
.
format
(
basedir
),
args
.
project_dir
]
subprocess
.
call
(
cmd
)
subprocess
.
call
(
cmd
)
def
split_opt
(
args
):
if
args
.
n_splits
>
100
:
stderr
.
write
(
"
Maximum number of splits is 100.
\n
"
)
exit
(
1
)
older_files
=
glob
(
args
.
project_dir
+
'
/bestsplits/*
'
)
if
older_files
:
stderr
.
write
(
"
\n
removing old splits.
\n
"
)
for
f
in
older_files
:
os
.
unlink
(
f
)
project_name
=
path
.
basename
(
args
.
project_dir
)
print
(
"
\n
Calculating best database split:
"
)
...
...
@@ -258,6 +268,7 @@ SOLUTION: make\n\n'''.format(basedir))
create_directories
(
args
.
project_dir
)
compute_opt
(
args
)
compute_summary
(
args
)
get_header
(
args
)
if
args
.
n_splits
>
1
:
...
...
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