Snakemake Workflow for ATAC-seq Data Re-analysis on a Compute Cluster

public public 1yr ago 0 bookmarks

TP Snakemake The project is done in my master degree for the Parallel Calculations module. The objective is to re-analyse ATAC-seq data with a compute cluster. The analysis was on a B3 mouse cell line. The project is to make a workflow for the ATAC-seq

Code Snippets

51
52
53
54
55
shell:
    """
    mkdir -p results/fastqc_init
    fastqc {input} -o "results/fastqc_init" -t {threads} 2>{log}
    """
73
74
75
76
77
78
79
80
81
82
83
84
85
shell:
    """
    mkdir -p results/trim
    java -jar /opt/apps/trimmomatic-0.38/trimmomatic-0.38.jar PE -threads {threads} \
        -trimlog results/trim/trim.log -summary results/trim/stats \
        {input.fwd} {input.rev} \
        {output.fwd_paired} {output.fwd_unpaired} {output.rev_paired} {output.rev_unpaired} \
            ILLUMINACLIP:data/data/NexteraPE-PE.fa:2:30:10:2:keepBothReads \
           LEADING:3 \
            TRAILING:3 \
            SLIDINGWINDOW:4:15 \
            MINLEN:33
    """
SnakeMake From line 73 of main/Snakefile
100
101
102
103
104
shell:
    """
    mkdir -p results/fastqc_post
    fastqc {input} -o "results/fastqc_post" -t {threads} 2>{log}
    """
122
123
124
125
126
127
128
129
130
shell:
    """
    mkdir -p results/bowtie2
    bowtie2  --very-sensitive -p 8 -k 10  -x {databank}  \
        -1 {input.fwd}  -2 {input.rev}  \
          |  samtools view -q 2 -bS  -  |  samtools sort - -o {output.bam}
    samtools index -b {output.bam}
    samtools idxstats {output.bam} > {log}
    """
147
148
149
150
151
152
153
shell:
    """
    mkdir -p results/picard
    java -jar /opt/apps/picard-2.18.25/picard.jar MarkDuplicates I="{input}" O={output.bam} M={output.txt} REMOVE_DUPLICATES=true
    samtools index -b {output.bam}
    samtools idxstats {output.bam} > {log}
    """
167
168
169
170
171
shell:
    """
    mkdir -p results/deeptools
    multiBamSummary bins --bamfiles {input} -o {output}
    """
190
191
192
193
194
195
shell:
    """
    plotCorrelation -in {input.npz} -p heatmap -c pearson -o {output.heatmap} --removeOutliers
    bamCoverage -b {input.bam} -o {output.bedgraph} -of bedgraph
    bamPEFragmentSize -b {input.all} --samplesLabel 0h_R1 0h_R2 0h_R3 24h_R1 24h_R2 24h_R3 --table {output.tsv} -o {output.hist}
    """
210
211
212
213
214
shell:
    """
    mkdir -p results/macs2
    macs2 callpeak -t {input} -f BAM  -n {output.shortmane} --outdir {output.dir}
    """
235
236
237
238
239
240
241
242
243
244
245
shell:
    """
    mkdir -p results/deeptools
    cat {input.zero} > {output.Peakzero}
    cat {input.vingtquatre} > {output.Peakvingtquatre}
    sort -k1,1 -k2,2n {output.Peakzero} | bedtools merge -i - > {output.bedzero}
    sort -k1,1 -k2,2n {output.Peakvingtquatre} | bedtools merge -i - > {output.bedvingtquatre}
    bedtools intersect -wa -a {input.zero} -b {input.vingtquatre} > {output.common}
    bedtools intersect -wa -v -a {input.zero} -b {input.vingtquatre} > {output.uniquezero}
    bedtools intersect -wa -v -a {input.vingtquatre} -b {input.zero} > {output.uniquevingtquatre}
    """
ShowHide 3 more snippets with no or duplicated tags.

Login to post a comment if you would like to share your experience with this workflow.

Do you know this workflow well? If so, you can request seller status , and start supporting this workflow.

Free

Created: 1yr ago
Updated: 1yr ago
Maitainers: public
URL: https://github.com/arzonon/TP_snakemake
Name: tp_snakemake
Version: 1
Badge:
workflow icon

Insert copied code into your website to add a link to this workflow.

Downloaded: 0
Copyright: Public Domain
License: None
  • Future updates

Related Workflows

cellranger-snakemake-gke
snakemake workflow to run cellranger on a given bucket using gke.
A Snakemake workflow for running cellranger on a given bucket using Google Kubernetes Engine. The usage of this workflow ...