Template snakemake project for the analysis of ATAC-Seq data

public public 1yr ago 0 bookmarks

Table of Contents

Setting up the compute environment

Running the pipeline


Setting up the compute environment

To bui

Code Snippets

87
88
89
90
shell:
    "bwa index {input.fasta_path}"
    " && check_directory -o {output.rc}"
    " {params.index_files} {params.index_dir}"
108
109
110
111
112
113
shell:
    "mkdir -p data/align/ &&"
    " bwa mem {params.extra_args} -t {params.threads}"
    " {params.ref_prefix} {input.reads1} {input.reads2}"
    " | samtools sort -@ {params.threads} -o {output.bam} -"
    " && samtools index {output.bam}"
135
136
137
138
139
140
141
142
shell:
    "mkdir -p {params.tmp_dir} {params.metrics_dir} && "
    "java -Xms{resources.java_mem_min}m -Xmx{resources.java_mem_max}m"
    " -jar $PICARD MarkDuplicates"
    " I={input.bam} M={output.metrics} TMP_DIR={params.tmp_dir}"
    " O={output.bam_dedup} REMOVE_DUPLICATES=true"
    " {params.extra_args} 2> {resources.logs}/{resources.job_id}.MD.log"
    " && samtools index {output.bam_dedup}"
165
166
167
168
169
170
171
172
173
shell:
    "samtools view -@ {resources.cpus_per_node}"
    " -b {input.dedup_bam} {params.allowed_chrs}"
    " > {output.prefilt_bam} && samtools index {output.prefilt_bam} && "
    "alignmentSieve -p max -b {output.prefilt_bam} -o {output.filt_bam}"
    " --ATACshift --blackListFileName {input.blacklist}"
    " --filterMetrics {output.filt_metrics} {params.extra_args} && "
    "samtools sort -@ {resources.cpus_per_node} -o {output.filt_sort_bam}"
    " {output.filt_bam} && samtools index {output.filt_sort_bam}"
192
193
194
195
196
shell:
    "mkdir -p {params.tmp_dir} && cd {params.tmp_dir} && "
    "samtools merge -@{resources.cpus_per_node}"
    " {output.merged_bam} {input.bams} && "
    "samtools index -@{resources.cpus_per_node} {output.merged_bam}"
213
214
215
216
217
218
219
shell:
    "mkdir -p {params.wig_dir} && "
    "bamCoverage --binSize {params.binsize}"
    " --normalizeUsing {params.norm_strategy}"
    " --effectiveGenomeSize {params.effective_gen_size}"
    " --numberOfProcessors {resources.cpus_per_node}"
    " -b {input.merged_bam} -o {output.bw}"
238
239
240
241
242
243
244
245
246
shell:
   "mkdir -p {params.peaks_dir} && "
   "macs2 callpeak -f BAMPE --call-summits"
   " -t {input.merged_bam} --outdir {params.peaks_dir}"
   " -g hs -B -q {params.qvalue_thresh}"
   " -n {resources.job_id} {params.extra_args} && "
   "bedtools slop -i {output.summits_bed}"
   " -g {input.genome_size} -b {params.fixed_width_ext}"
   " > {output.narrow_peak_fw}"
265
266
267
268
shell:
    "cat {input.sample_beds} | sort -k1,1V -k2,2n -k3,3n > {output.comb_sorted} && "
    "bedtools merge -i {output.comb_sorted} -c 4,5,5,5 -o collapse,min,max,mean -delim '|'"
    " > {output.merged_sorted}"
ShowHide 4 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/zwebbs/ATAC-Seq-pipeline
Name: atac-seq-pipeline
Version: 1
Badge:
workflow icon

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

Other Versions:
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 ...