Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cnvpipelines
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SVdetection
cnvpipelines
Commits
bd7962eb
Commit
bd7962eb
authored
7 years ago
by
Floreal Cabanettes
Browse files
Options
Downloads
Patches
Plain Diff
Restore previous code: fix has been done in svtyper
parent
7325ca13
No related branches found
Branches containing commit
No related tags found
1 merge request
!7
Svtyper parallel
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
snakecnv/bin/svtyper_launcher.py
+3
-8
3 additions, 8 deletions
snakecnv/bin/svtyper_launcher.py
snakecnv/tools/genotyping.snk
+1
-1
1 addition, 1 deletion
snakecnv/tools/genotyping.snk
with
4 additions
and
9 deletions
snakecnv/bin/svtyper_launcher.py
+
3
−
8
View file @
bd7962eb
...
...
@@ -21,7 +21,7 @@ def input_is_empty(input_vcf):
return
is_empty
def
launch
(
bamlist
,
input_vcf
,
output_vcf
,
threads
,
chromosome
):
def
launch
(
bamlist
,
input_vcf
,
output_vcf
,
threads
):
try
:
if
input_is_empty
(
input_vcf
):
shutil
.
copy
(
input_vcf
,
output_vcf
)
...
...
@@ -31,17 +31,14 @@ def launch(bamlist, input_vcf, output_vcf, threads, chromosome):
else
:
tabix_index
(
output_vcf
)
else
:
vcf_out_dir
=
os
.
path
.
join
(
os
.
path
.
dirname
(
output_vcf
),
chromosome
)
if
not
os
.
path
.
exists
(
vcf_out_dir
):
os
.
mkdir
(
vcf_out_dir
)
vcf_out
=
os
.
path
.
join
(
vcf_out_dir
,
os
.
path
.
basename
(
output_vcf
[:
-
3
]))
vcf_out
=
output_vcf
[:
-
3
]
genotype_multiple_samples
(
bamlist
=
bamlist
,
vcf_in
=
input_vcf
,
vcf_out
=
vcf_out
,
cores
=
threads
)
if
run
(
"
bcftools sort -O z -o {ovcf} {ivcf}
"
.
format
(
ivcf
=
vcf_out
,
ovcf
=
output_vcf
),
shell
=
True
)
\
.
returncode
==
0
:
shutil
.
rmtre
e
(
vcf_out
_dir
)
os
.
remov
e
(
vcf_out
)
tabix_index
(
output_vcf
,
force
=
True
,
preset
=
"
vcf
"
)
else
:
print
(
"
Bctools sort command failed
"
,
file
=
sys
.
stderr
)
...
...
@@ -67,8 +64,6 @@ if __name__ == "__main__":
help
=
"
Output VCF file
"
)
parser
.
add_argument
(
"
-t
"
,
"
--threads
"
,
required
=
True
,
type
=
int
,
help
=
"
Number of threads to use
"
)
parser
.
add_argument
(
"
-c
"
,
"
--chromosome
"
,
required
=
True
,
type
=
str
,
help
=
"
Chromosome name
"
)
args
=
parser
.
parse_args
()
...
...
This diff is collapsed.
Click to expand it.
snakecnv/tools/genotyping.snk
+
1
−
1
View file @
bd7962eb
...
...
@@ -21,7 +21,7 @@ rule svtyping:
stderr = "{batch}/logs/svtyper/{chrom}_svtyper.e"
shadow: "shallow" # in order to prevent raw.vcf to be corrupted
shell:
"svtyper_launcher.py -B {input.bamlist} -i {input.sites} -o {output.vcf} -t {threads}
-c {wildcards.chrom}
"
"svtyper_launcher.py -B {input.bamlist} -i {input.sites} -o {output.vcf} -t {threads} "
" 1>{log.stdout} 2>{log.stderr}"
rule genotyping:
...
...
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