Skip to content
Snippets Groups Projects
Commit d449112a authored by Sascha Meiers's avatar Sascha Meiers
Browse files

add singularity image. Make reference a parameter instead of input file

parent 09197f57
No related branches found
No related tags found
No related merge requests found
...@@ -20,6 +20,10 @@ import os.path ...@@ -20,6 +20,10 @@ import os.path
METHODS = ["simpleCalls_llr1", "simpleCalls_llr4", "biAllelic_llr1", "biAllelic_llr4"] METHODS = ["simpleCalls_llr1", "simpleCalls_llr4", "biAllelic_llr1", "biAllelic_llr4"]
singularity: "mosaicatcher-singularity-1.0.img"
rule all: rule all:
input: input:
expand("plots/{sample}/{window}_fixed.pdf", sample = SAMPLE, window = [50000, 100000, 200000, 500000]), expand("plots/{sample}/{window}_fixed.pdf", sample = SAMPLE, window = [50000, 100000, 200000, 500000]),
...@@ -591,7 +595,6 @@ rule indexMergedBam: ...@@ -591,7 +595,6 @@ rule indexMergedBam:
rule call_SNVs_bcftools_chrom: rule call_SNVs_bcftools_chrom:
input: input:
fa = config["reference"],
bam = "snv_calls/{sample}/merged.bam", bam = "snv_calls/{sample}/merged.bam",
bai = "snv_calls/{sample}/merged.bam.bai" bai = "snv_calls/{sample}/merged.bam.bai"
output: output:
...@@ -599,11 +602,12 @@ rule call_SNVs_bcftools_chrom: ...@@ -599,11 +602,12 @@ rule call_SNVs_bcftools_chrom:
log: log:
"log/call_SNVs_bcftools_chrom/{sample}/{chrom}.log" "log/call_SNVs_bcftools_chrom/{sample}/{chrom}.log"
params: params:
fa = config["reference"],
samtools = config["samtools"], samtools = config["samtools"],
bcftools = config["bcftools"] bcftools = config["bcftools"]
shell: shell:
""" """
{params.samtools} mpileup -r {wildcards.chrom} -g -f {input.fa} {input.bam} \ {params.samtools} mpileup -r {wildcards.chrom} -g -f {params.fa} {input.bam} \
| {params.bcftools} call -mv - | {params.bcftools} view --genotype het --types snps - > {output} 2> {log} | {params.bcftools} call -mv - | {params.bcftools} view --genotype het --types snps - > {output} 2> {log}
""" """
......
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