Commit aa7893e4 authored by Lindner, Melanie's avatar Lindner, Melanie
Browse files

better notes

parent e360f66e
......@@ -32,14 +32,6 @@ dict_Readgroup = dict(seq2018 = dict_seq2018, reseq2020 = dict_reseq2020)
SAMPLE, = glob_wildcards("trimmed_data/reseq2020/{sample}_R1_val_1.fq.gz")
RUN = ["seq2018", "reseq2020"]
# rule all:
# input:
# expand("trimmed_data/{run}/{sample}_R1_val_1.fq.gz", sample=SAMPLE)
# rule all:
# input:
# expand("out/{run}/alignment/{sample}.deduplicated.bam", sample=SAMPLE, run=RUN)
rule all:
input:
expand("out/merged/alignment/{sample}.deduplicated_merged.bam", sample=SAMPLE)
......@@ -58,7 +50,7 @@ rule genome:
shell:
"(bs_seeker2-build.py -f {input} --aligner=bowtie2 -d genome) 2> {log}"
# alignment
# alignments
rule align:
input:
R1Tr="trimmed_data/{run}/{sample}_R1_val_1.fq.gz",
......@@ -74,7 +66,7 @@ rule align:
shell:
"(bs_seeker2-align.py -g genome/genome.fna -d genome -1 {input.R1Tr} -2 {input.R2Tr} -f bam --aligner=bowtie2 -o {output} --bt2--end-to-end --temp_dir=out/{wildcards.run}/temp/ --bt2-p 4) 2> {log}"
# sort alignment
# sort alignments
rule piSort:
input:
"out/{run}/alignment/{sample}.bam"
......@@ -88,7 +80,7 @@ rule piSort:
shell:
"(picard SortSam I={input} O={output} SORT_ORDER=queryname) 2> {log}"
# deduplication
# deduplication of alignments
rule piDedup:
input:
"out/{run}/alignment/{sample}.sorted.bam"
......@@ -121,7 +113,7 @@ rule readgr:
shell:
"(picard AddOrReplaceReadGroups I={input} O={output} ID={params.Flowcell}.{params.Lane} LB=KapaBiosystems-{params.Library} PL=illumina PU={params.Flowcell}.{params.Lane}.{params.Barcode} SM={wildcards.sample} CREATE_INDEX=true VALIDATION_STRINGENCY=SILENT SORT_ORDER=queryname) 2> {log}"
# merge files
# merge deduplicated alignments
rule merge:
input:
R2018="out/seq2018/alignment/{sample}.deduplicated.withRG.bam",
......@@ -135,4 +127,3 @@ rule merge:
threads: 1
shell:
"(picard MergeSamFiles I={input.R2018} I={input.R2020} O={output} SORT_ORDER=queryname) 2> {log}"
Markdown is supported
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