A workflow for ChIP-seq analyses in Snakemake

public public 1yr ago Version: 4 0 bookmarks

A workflow for ChIP-seq analysis in Snakemake.

Table of Contents

Introduction

This workflow is a bioinformatics analysis pipeline for ChIP sequencing data. The workflow is built using Snakemake - a scalabale bioinformatics workflow engine

Requirements

This workflow requires the following software to run:

  • [Snakemake][snakemake]

  • [Conda][code]

Usage

Clone workflow into working directory:

git clone https://github.com/jma1991/chipseq.git

Execute workflow and deploy software dependencies via conda:

snakemake --use-conda

Configuration

Configure the workflow by editing the files in the config directory:

  • config.yaml is a YAML file containing the workflow metadata.

  • samples.csv is a CSV file containing the sample metadata.

  • units.csv is a CSV file contains the unit metadata.

Contributing

To contribute to the workflow, clone this repository locally and commit your code on a separate branch. Please generate unit tests for your code, and run the linter before opening a pull-request:

snakemake --generate-unit-tests # generate unit tests
snakemake --lint # run the linter

You can find more detail in our Contributing Guide . Participation in this open source project is subject to a Code of Conduct .

Thanks

I would like to thank Johannes Köster for developing the Snakemake workflow engine and Istvan Albert for writing the biostar handbook.

License

This workflow is licensed under the MIT license.
Copyright © 2020, James Ashmore

Code Snippets

8
9
shell:
    "bowtie2 -x {params.idx} -U {input.fqz} -S {output.sam}"
16
17
shell:
    "samtools sort -o {output.bam} {input.sam}"
24
25
shell:
    "samtools merge {output.bam} {input.bam}"
32
33
shell:
    "samtools sort -n -o {output} {input}"
40
41
shell:
    "samtools fixmate -m {input} {output}"
48
49
shell:
    "samtools sort -o {output} {input}"
56
57
shell:
    "samtools markdup {input} {output}"
64
65
shell:
    "bioawk -t '$1 !~ /(M|_)/ {{print $1,0,$2}}' {input.fai} | gzip > {output.bed}"
73
74
shell:
    "samtools view -b -L {input.bed} -q 30 -F 3844 {input.bam} > {output.bam}"
83
84
shell:
    "bedtools intersect -v -g {input.fai} -sorted -a {input.bam} -b {input.bed}"
91
92
shell:
    "samtools sort -@ {threads} -n {input.bam} > {output.bam}"
 99
100
shell:
    "samtools fixmate {input.bam} {output.bam}"
107
108
shell:
    "samtools sort {input.bam} > {output.bam}"
115
116
shell:
    "samtools view -b -f 2 {input.bam} > {output.bam}"
6
7
shell:
    "bamCoverage -b {input.bam} -o {output.wig} --normalizeUsing None --ignoreForNormalization chrX chrM --extendReads 146"
14
15
shell:
    "bamCoverage -b {input.bam} -o {output.wig} --normalizeUsing CPM --ignoreForNormalization chrX chrM --extendReads 146"        
23
24
shell:
    "bigwigCompare -b1 {input.bw1} -b2 {input.bw2} --pseudoCount 0.01 --operation log2 -p {threads} -o {output.bw0}"
32
33
shell:
    "bigwigCompare -b1 {input.bw1} -b2 {input.bw2} --pseudoCount 0.01 --operation log2 -p {threads} -o {output.bw0}"
41
42
shell:
    "bigwigCompare -b1 {input.bw1} -b2 {input.bw2} --operation subtract -p {threads} -o {output.bw0}"
6
7
shell:
    "fasterq-dump -O {params.out} {wildcards.run}"
14
15
shell:
    "cutadapt -a AGATCGGAAGAGCACACGTCTGAACTCCAGTCAC -o {output} {input}"
ShowHide 15 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/jma1991/chipseq
Name: chipseq
Version: 4
Badge:
workflow icon

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

Downloaded: 0
Copyright: Public Domain
License: MIT License
  • 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 ...