Commit a35f703d authored by WJH58's avatar WJH58
Browse files

put comments on trimmomatic

parent c6afcd22
...@@ -47,8 +47,8 @@ FASTQC = expand(RESULT_DIR + "fastqc/{samples}_{R}_2000reads_fastqc.htm ...@@ -47,8 +47,8 @@ FASTQC = expand(RESULT_DIR + "fastqc/{samples}_{R}_2000reads_fastqc.htm
FORWARD_READS = expand(WORKING_DIR + "trimmed/{samples}_forward.fastq.gz", samples = SAMPLES), FORWARD_READS = expand(WORKING_DIR + "trimmed/{samples}_forward.fastq.gz", samples = SAMPLES),
REVERSE_READS = expand(WORKING_DIR + "trimmed/{samples}_reverse.fastq.gz", samples = SAMPLES), REVERSE_READS = expand(WORKING_DIR + "trimmed/{samples}_reverse.fastq.gz", samples = SAMPLES),
TRIMMED_FASTQC = expand(RESULT_DIR + "fastqc/{samples}_{R}_trimmed_fastqc.html", samples = SAMPLES, R=['R1', 'R2']), TRIMMED_FASTQC = expand(RESULT_DIR + "fastqc/{samples}_{R}_trimmed_fastqc.html", samples = SAMPLES, R=['R1', 'R2']),
MAPPED = expand(WORKING_DIR + "mapped/{samples}.bam", samples = SAMPLES), #MAPPED = expand(WORKING_DIR + "mapped/{samples}.bam", samples = SAMPLES),
UNMAPPED = [WORKING_DIR + "unmapped/{samples}.fq." + str(i) +".gz" for i in range(1,2)], #UNMAPPED = [WORKING_DIR + "unmapped/{samples}.fq." + str(i) +".gz" for i in range(1,2)],
rule all: rule all:
input: input:
...@@ -152,26 +152,26 @@ rule fastqc: ...@@ -152,26 +152,26 @@ rule fastqc:
shell: shell:
"fastqc --outdir={params} {input.fwd} {input.rev} &>{log}" "fastqc --outdir={params} {input.fwd} {input.rev} &>{log}"
rule mapping: #rule mapping:
input: #input:
foward = WORKING_DIR + "trimmed/{samples}_forward.fastq.gz", #foward = WORKING_DIR + "trimmed/{samples}_forward.fastq.gz",
reverse = WORKING_DIR + "trimmed/{samples}_reverse.fastq.gz", #reverse = WORKING_DIR + "trimmed/{samples}_reverse.fastq.gz",
forwardUnpaired = WORKING_DIR + "trimmed/{samples}_forward_unpaired.fastq.gz", #forwardUnpaired = WORKING_DIR + "trimmed/{samples}_forward_unpaired.fastq.gz",
reverseUnpaired = WORKING_DIR + "trimmed/{samples}_reverse_unpaired.fastq.gz", #reverseUnpaired = WORKING_DIR + "trimmed/{samples}_reverse_unpaired.fastq.gz",
index = [WORKING_DIR + "genome." + str(i) + ".bt2" for i in range(1,4)] #index = [WORKING_DIR + "genome." + str(i) + ".bt2" for i in range(1,4)]
output: #output:
mapped = WORKING_DIR + "mapped/{samples}.bam", #mapped = WORKING_DIR + "mapped/{samples}.bam",
unmapped = [WORKING_DIR + "unmapped/{samples}.fq." + str(i) +".gz" for i in range(1,2)], #unmapped = [WORKING_DIR + "unmapped/{samples}.fq." + str(i) +".gz" for i in range(1,2)],
params: #params:
bowtie = " ".join(config["bowtie2"]["params"].values()), #take argument separated as a list separated with a space #bowtie = " ".join(config["bowtie2"]["params"].values()), #take argument separated as a list separated with a space
index = WORKING_DIR + "genome", #index = WORKING_DIR + "genome",
unmapped = WORKING_DIR + "unmapped/{samples}.fq.gz" #unmapped = WORKING_DIR + "unmapped/{samples}.fq.gz"
threads: 10 #threads: 10
conda: #conda:
"../envs/samtools_bowtie.yaml" #"../envs/samtools_bowtie.yaml"
log: #log:
RESULT_DIR + "logs/bowtie/{samples}.log" #RESULT_DIR + "logs/bowtie/{samples}.log"
shell: #shell:
""" #"""
bowtie2 {params.bowtie} --threads {threads} -x {params.index} -1 {input.forward} -2 {input.reverse} -U {input.forwardUnpaired},{input.reverseUnpaired} --un-conc-gz {params.unmapped} | samtools view -Sb - > {output.mapped} 2>{log} #bowtie2 {params.bowtie} --threads {threads} -x {params.index} -1 {input.forward} -2 {input.reverse} -U {input.forwardUnpaired},{input.reverseUnpaired} --un-conc-gz {params.unmapped} | samtools view -Sb - > {output.mapped} 2>{log}
""" #"""
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment