This is a
snakemake
workflow for:
-
Performing sample QC
-
Calling ChIP peaks
-
Performing Differential Binding Analysis
-
Comparing results across ChIP targets
Code Snippets
26 27 28 29 | shell: """ Rscript --vanilla {input.r} {params.annot_path} &>> {log} """ |
59 60 61 62 63 | shell: """ cp {input.rmd} {output.rmd} R -e "rmarkdown::render_site('{output.rmd}')" &>> {log} """ |
13 14 15 16 17 18 19 20 21 22 23 24 | shell: """ ## Sort the file echo -e "Started sorting at $(date)" >> {log} sort \ -k1,1 -k2,2n \ -S {resources.mem_mb}M \ --parallel {threads} \ {input} | \ egrep $'^chr[0-9XY]+\t' > {output} echo -e "Finished sorting at $(date)" >> {log} """ |
41 42 43 44 45 46 | shell: """ echo -e "Started conversion at $(date)" >> {log} bedGraphToBigWig {input.bedgraph} {input.chrom_sizes} {output.bigwig} echo -e "Finished conversion at $(date)" >> {log} """ |
60 61 62 63 64 65 66 67 | shell: """ ## Create the summary tsv Rscript --vanilla \ {params.script} \ {input.bw} \ {output} &>> {log} """ |
14 15 16 17 18 19 20 21 | shell: """ Rscript --vanilla \ {input.r} \ {input.bam} \ {input.seqinfo} \ {output.bed} &>> {log} """ |
49 50 51 52 53 54 55 56 57 58 59 60 61 62 | shell: """ ## Create the generic markdown header Rscript --vanilla \ {input.r} \ {wildcards.target} \ {wildcards.ref} \ {wildcards.treat} \ {params.threads} \ {output.rmd} &>> {log} ## Add the remainder of the module as literal text cat {input.db_mod} >> {output.rmd} """ |
172 173 174 175 | shell: """ R -e "rmarkdown::render_site('{input.rmd}')" &>> {log} """ |
62 63 64 65 66 67 68 69 70 71 72 73 74 75 | shell: """ macs2 callpeak \ -t {input.bam}\ -c {input.control[0]} \ -f BAM \ -g {params.gsize} \ --keep-dup {params.keep_duplicates} \ -q {params.fdr} \ -n {params.prefix} \ --bdg --SPMR \ --outdir {params.outdir} 2> {log} cp {log} {output.log} """ |
105 106 107 108 109 110 111 112 | shell: """ ## Run the QC script Rscript --vanilla \ {input.r} \ {wildcards.target} \ {threads} &>> {log} """ |
151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 | shell: """ QC_PASS=$(egrep 'pass' {input.qc} | egrep {wildcards.treat} | cut -f1) SAMPLES=$(for f in $QC_PASS; do echo {params.bamdir}/$f.bam; done) ## Get the input column I=$(head -n1 {input.qc} | sed -r 's/\\t/\\n/g' | egrep -n '[Ii]nput' | sed -r 's/([0-9]+):[Ii]nput/\\1/g') INPUT_PASS=$(egrep 'pass$' {input.qc} | egrep "{wildcards.treat}\s" | cut -f$I | uniq) INPUT=$(for f in $INPUT_PASS; do echo {params.bamdir}/$f.bam; done) macs2 callpeak \ -t $SAMPLES\ -c $INPUT \ -f BAM \ -g {params.gsize} \ --keep-dup {params.keep_duplicates} \ -q {params.fdr} \ -n {params.prefix} \ --bdg --SPMR \ --outdir {params.outdir} 2> {log} cp {log} {output.log} """ |
193 194 195 196 197 198 199 200 | shell: """ macs2 bdgcmp \ -t {input.bdg} \ -c {input.ctrl} \ -m FE \ -o {output} 2> {log} """ |
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | shell: """ ## Create the generic markdown header Rscript --vanilla \ {input.r} \ {wildcards.t1} \ {wildcards.ref1} \ {wildcards.treat1} \ {wildcards.t2} \ {wildcards.ref2} \ {wildcards.treat2} \ {params.threads} \ {output.rmd} &>> {log} ## Add the remainder of the module as literal text cat {input.module_pw} >> {output.rmd} """ |
101 102 103 104 | shell: """ R -e "rmarkdown::render_site('{input.rmd}')" &>> {log} """ |
9 10 11 12 | shell: """ Rscript --vanilla {input} {output} {params.version} &>> {log} """ |
24 25 26 27 | shell: """ Rscript --vanilla {input.r} {output} &>> {log} """ |
39 40 41 42 | shell: """ Rscript --vanilla {input.r} {output.rmd} &>> {log} """ |
51 52 53 54 | shell: """ cat {input} > {output} """ |
70 71 72 73 | shell: """ R -e "rmarkdown::render_site('{input.rmd}')" &>> {log} """ |
90 91 92 93 94 95 96 97 98 99 100 101 | shell: """ ## Create the generic markdown Rscript --vanilla \ {input.r} \ {wildcards.target} \ {params.threads} \ {output.rmd} &>> {log} ## Add the module directly as literal code cat {input.module} >> {output.rmd} """ |
168 169 170 171 | shell: """ R -e "rmarkdown::render_site('{input.rmd}')" &>> {log} """ |
8 9 10 11 | shell: """ samtools index -@ {threads} {input.bam} {output.bai} """ |
Support
Do you know this workflow well? If so, you can
request seller status , and start supporting this workflow.
Created: 1yr ago
Updated: 1yr ago
Maitainers:
public
URL:
https://smped.github.io/GRAVI_PRJNA509779/
Name:
gravi_prjna509779
Version:
1
Downloaded:
0
Copyright:
Public Domain
License:
None
- Future updates
Related Workflows

ENCODE pipeline for histone marks developed for the psychENCODE project
psychip pipeline is an improved version of the ENCODE pipeline for histone marks developed for the psychENCODE project.
The o...

Near-real time tracking of SARS-CoV-2 in Connecticut
Repository containing scripts to perform near-real time tracking of SARS-CoV-2 in Connecticut using genomic data. This pipeli...

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 ...

ATLAS - Three commands to start analyzing your metagenome data
Metagenome-atlas is a easy-to-use metagenomic pipeline based on snakemake. It handles all steps from QC, Assembly, Binning, t...
raw sequence reads
Genome assembly
Annotation track
checkm2
gunc
prodigal
snakemake-wrapper-utils
MEGAHIT
Atlas
BBMap
Biopython
BioRuby
Bwa-mem2
cd-hit
CheckM
DAS
Diamond
eggNOG-mapper v2
MetaBAT 2
Minimap2
MMseqs
MultiQC
Pandas
Picard
pyfastx
SAMtools
SemiBin
Snakemake
SPAdes
SqueezeMeta
TADpole
VAMB
CONCOCT
ete3
gtdbtk
h5py
networkx
numpy
plotly
psutil
utils
metagenomics

RNA-seq workflow using STAR and DESeq2
This workflow performs a differential gene expression analysis with STAR and Deseq2. The usage of this workflow is described ...

This Snakemake pipeline implements the GATK best-practices workflow
This Snakemake pipeline implements the GATK best-practices workflow for calling small germline variants. The usage of thi...