Skip to content
Snippets Groups Projects
Commit 272bf2f3 authored by Thomas Faraut's avatar Thomas Faraut
Browse files

patch for getting chromsomes in get_batches

parent 491fa286
No related branches found
No related tags found
No related merge requests found
......@@ -55,7 +55,9 @@ def get_batches(wdir):
# Search for chromosomes:
my_chrs = []
for ffile in glob(os.path.join(filter_dir, variant, "svtyper_*_%s_genotypes_filtered.vcf.gz" % variant)):
chrm = ffile.split("_")[1]
# chrm = ffile.split("_")[1] doesn't work when the directory path contains an "_"
basefilename = os.path.basename(ffile)
chrm = basefilename.split("_")[1]
my_chrs.append(chrm)
if len(my_chrs) == 0:
......@@ -188,4 +190,4 @@ rule summary:
1
shell:
"cp {params.ipynb} {output.ipynb}; "
"jupyter nbconvert --to html --template {params.tpl} --execute {output.ipynb}"
\ No newline at end of file
"jupyter nbconvert --to html --template {params.tpl} --execute {output.ipynb}"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment