Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Chouaref
Snakemake_ATAC_2020
Commits
c0085bb1
Commit
c0085bb1
authored
Nov 23, 2020
by
WJH58
Browse files
Successuful running on mac
parent
c5de0d34
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
ATAC-seq_pipeline/.DS_Store
View file @
c0085bb1
No preview for this file type
ATAC-seq_pipeline/labjournal/19-11-2020.md
View file @
c0085bb1
```
rule trimmomatic:
input:
reads = get_fastq,
adapters = config['trimmomatic']["adapters"]
output:
forward_reads = WORKING_DIR + "trimmed/{samples}_forward.fastq.gz",
reverse_reads = WORKING_DIR + "trimmed/{samples}_reverse.fastq.gz",
forwardUnpaired = temp(WORKING_DIR + "trimmed/{samples}_forward_unpaired.fastq.gz"),
reverseUnpaired = temp(WORKING_DIR + "trimmed/{samples}_reverse_unpaired.fastq.gz"),
log:
RESULT_DIR + "logs/trimmomatic/{samples}.log"
params:
seedMisMatches = str(config['trimmomatic']['seedMisMatches']),
palindromeClipTreshold = str(config['trimmomatic']['palindromeClipTreshold']),
simpleClipThreshhold = str(config['trimmomatic']['simpleClipThreshold']),
LeadMinTrimQual = str(config['trimmomatic']['LeadMinTrimQual']),
TrailMinTrimQual = str(config['trimmomatic']['TrailMinTrimQual']),
windowSize = str(config['trimmomatic']['windowSize']),
avgMinQual = str(config['trimmomatic']['avgMinQual']),
minReadLen = str(config['trimmomatic']['minReadLength']),
phred = str(config["trimmomatic"]["phred"])
threads: 10
conda:
"envs/trimmomatic.yaml"
shell:
"""
trimmomatic PE \
-threads 10 \
-phred33 \
{input.reads} \
{output.forward_reads} {output.forwardUnpaired} {output.reverse_reads} {output.reverseUnpaired} \
ILLUMINACLIP:{input.adapters}:{params.seedMisMatches}:{params.palindromeClipTreshold}:{params.simpleClipThreshhold} \
LEADING:3 \
TRAILING:3 \
SLIDINGWINDOW:4:15 \
MINLEN:40 &>{log}
"""
```
####Trimmomatic Arguments####
ATAC-seq_pipeline/results/trimmed_fastqc/WT8_forward_fastqc.html
0 → 100644
View file @
c0085bb1
This diff is collapsed.
Click to expand it.
ATAC-seq_pipeline/results/trimmed_fastqc/WT8_forward_fastqc.zip
0 → 100644
View file @
c0085bb1
File added
ATAC-seq_pipeline/results/trimmed_fastqc/WT8_reverse_fastqc.html
0 → 100644
View file @
c0085bb1
This diff is collapsed.
Click to expand it.
ATAC-seq_pipeline/results/trimmed_fastqc/WT8_reverse_fastqc.zip
0 → 100644
View file @
c0085bb1
File added
ATAC-seq_pipeline/snakefile
View file @
c0085bb1
...
...
@@ -46,9 +46,11 @@ wildcard_constraints:
FASTQC = expand(RESULT_DIR + "fastqc/{samples}_{R}_2000reads_fastqc.html", samples = SAMPLES, R=['R1', 'R2']),
FORWARD_READS = expand(WORKING_DIR + "trimmed/{samples}_forward.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 + "
trimmed_fastqc/WT8_{direction}_fastqc.html", direction=['forward', 'reverse
']),
MAPPED = expand(WORKING_DIR + "mapped/{samples}.bam", samples = SAMPLES),
UNMAPPED = expand([WORKING_DIR + "unmapped/{samples}.fq." + str(i) +".gz" for i in range(1,2)], samples = SAMPLES),
MAP_SORTED = expand(WORKING_DIR + "sort/{samples}.sorted.bam", samples = SAMPLES),
SORTED_INDEXED = expand(WORKING_DIR + "index/{samples}.sorted.bam.bai", samples = SAMPLES)
rule all:
input:
...
...
@@ -61,7 +63,9 @@ rule all:
REVERSE_READS,
TRIMMED_FASTQC,
MAPPED,
UNMAPPED
UNMAPPED,
MAP_SORTED,
SORTED_INDEXED
message : "Analysis is complete!"
shell:""
...
...
@@ -127,18 +131,18 @@ rule trimmomatic:
rule trimmed_fastqc:
input:
forward
_reads
= WORKING_DIR + "trimmed/
{samples}
_forward.fastq.gz",
reverse
_reads
= WORKING_DIR + "trimmed/
{samples}
_reverse.fastq.gz"
WT8
forward = WORKING_DIR + "trimmed/
WT8
_forward.fastq.gz",
WT8
reverse = WORKING_DIR + "trimmed/
WT8
_reverse.fastq.gz"
output:
RESULT_DIR + "fastqc/{samples}_{R}_trimmed_fastqc.html"
log:
RESULT_DIR + "logs/fastqc/{samples}.trimmed_fastqc.log"
RESULT_DIR + "trimmed_fastqc/WT8_{direction}_fastqc.html"
params:
RESULT_DIR + "fastqc/"
RESULT_DIR + "
trimmed_
fastqc/"
conda:
"envs/fastqc.yaml"
log:
RESULT_DIR + "logs/trimmed_fastqc/WT8_{direction}.fastqc.log"
shell:
"fastqc --outdir={params} {input.forward
_reads
} {input.reverse
_reads
} &>{log}"
"fastqc --outdir={params} {input.
WT8
forward} {input.
WT8
reverse} &>{log}"
rule fastqc:
input:
...
...
@@ -178,3 +182,27 @@ rule mapping:
"""
bowtie2 {params.bowtie} --threads {threads} -x {params.index} -1 {input.forward_reads} -2 {input.reverse_reads} -U {input.forwardUnpaired},{input.reverseUnpaired} --un-conc-gz {params.unmapped} | samtools view -Sb - > {output.mapped} 2>{log}
"""
rule sort:
input:
mapped = WORKING_DIR + "mapped/{samples}.bam"
output:
map_sorted = WORKING_DIR + "sort/{samples}.sorted.bam"
conda:
"envs/samtools_bowtie.yaml"
log:
RESULT_DIR + "logs/sort/{samples}.log"
shell:
"samtools sort {input} -o {output}"
rule index:
input:
map_sorted = WORKING_DIR + "sort/{samples}.sorted.bam"
output:
sorted_indexed = WORKING_DIR + "index/{samples}.sorted.bam.bai"
conda:
"envs/samtools_bowtie.yaml"
log:
RESULT_DIR + "logs/index/{samples}.log"
shell:
"samtools index {input} {output}"
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment