diff --git a/workflow/Snakefile b/workflow/Snakefile index a3d813e..8faf366 100644 --- a/workflow/Snakefile +++ b/workflow/Snakefile @@ -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: @@ -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"