Skip to content

Instantly share code, notes, and snippets.

@crazyhottommy
Last active July 1, 2016 18:54
snakemake-paired-sample
aDict = {"B":"inputG1", "A":"inputG1", "C":"inputG2"}
rule all:
input: ["C.bed", "A.bed", "B.bed"]
def get_files(wildcards):
case = wildcards.case
control = aDict[case]
return [case + ".sorted.bam", control + ".sorted.bam"]
rule call_peak:
input: get_files
output: "{case}.bed"
run:
case = input[0]
control = input[1]
shell("echo macs14 -t {case} -c {control} -n {wildcards.case}")
shell("touch {output}")
# read https://groups.google.com/forum/#!searchin/snakemake/dependencies/snakemake/iDnr3PIcsfE/x-qQvzWBBgAJ
# https://groups.google.com/forum/#!searchin/snakemake/dependencies/snakemake/1QelazgzilY/oBgZoP19BL4J
aDict = {"B":"inputG1", "A":"inputG1", "C":"inputG2"}
rule all:
input: ["C.bed", "A.bed", "B.bed"]
def get_files(wildcards):
case = wildcards.case
control = aDict[case]
return [case + ".sorted.bam", control + ".sorted.bam"]
rule call_peak:
input: get_files
output: "{case}.bed"
shell:
"""
echo macs14 -t {input[0]} -c {input[1]} -n {wildcards.case}
touch {output}
"""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment