Skip to content

Commit

Permalink
read alternative references' regions;
Browse files Browse the repository at this point in the history
this fixes the error, that all references use the same region in IGV
  • Loading branch information
kriese committed Jun 3, 2022
1 parent 97b52df commit db303d0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion workflow/Snakefile
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ rule pca_plot:

rule create_igv_batch:
input:
"results/{sample}/{region}/cut_refs.fa"
output:
"results/{sample}/{region}/igv_batch_{ref}.txt"
params:
Expand All @@ -135,13 +136,15 @@ rule create_igv_batch:
path_to_resources = Path(".").absolute()
shell:
"""
REF_REGION=$(grep {wildcards.ref} {input} | cut -d' ' -f2)
cat > {output} <<-EOF
genome {params.path_to_resources}/resources/references/{params.ref_file}
load {params.path_to_resources}/resources/samples/{wildcards.sample}/{wildcards.ref}/PacBio.bam
goto {params.region}
goto $REF_REGION
snapshot {params.path_to_resources}/results/{wildcards.sample}/{wildcards.region}/igv_{wildcards.ref}_screenshot.png
exit
EOF
unset REF_REGION
"""
# load "resources/{wildcards.sample}/Illumina.bam"
# load "results/{wildcards.sample}/{wildcards.region}/MSA"
Expand Down

0 comments on commit db303d0

Please sign in to comment.