Skip to main content

ATACofthesnake

Project description

ATACofthesnake

Downstream processing of ATAC data, including QC's and differential accessibility. Starting point are deduplicated bam or cram files.

Important

All samples in a 'run' have to belong to the same group. That means that out of all peaks/sample, a union will be made. In case this is not relevant, you can run the workflow multiple times. Fasta headers un field 0 (space delimited) are not allowed to contain a pipe character '|' (as peaks will be delimited as such).

Installation

From pypi:

pip install ATACofthesnake or with uv: uv pip install ATACofthesnake

From github:

git clone git@github.com:maxplanck-ie/ATACofthesnake.git
pixi run ATAC -h

Quickstart

standard analysis:

ATAC --bamdir folder/with/bamfiles/ --outputdir outputfolder
--gtf genes.gtf --genomefasta genome.fa
--snakemakeprofile profile -b read_attracting_regions.bed

Note that this pipeline depends on snakemake. Additionally, the snakemake environments are managed using conda, which means you need to have conda installed and configured. Make sure this is set in your snakemake profile (if you use one), when not using a profile, snakemake will be ran with the --use-conda flag by default.

The default analysis will generate:

  • sieved bamfiles. (cfr. --fragsize/-f & --read_attracting_regions/-b). Note that read attracting regions are obliged. At minimum this should contain the mitochondrial genome. Note that the mitochondrial contig is assumed to be named 'MT'. You can change this using --mitostring.
  • peaks called per bamfile (under peaks/) and a union of all peaks (peakset/).
  • bigwigs normalized using scalefactors and RPKM.
  • a number of QC plots (figures/) and metrics (qc/)

Differential analysis

Differential analysis requires an additional yaml file specifying the comparison (comparison.yaml) and the samplesheet.

ATAC --bamdir folder/with/bamfiles/ --outputdir outputfolder
--gtf genes.gtf --genomefasta genome.fa --genomesize 1.87e9
--snakemakeprofile profile -b read_attracting_regions.bed
--comparison comparison.yaml --samplesheet samplesheet.tsv

The samplesheet has to be a tab-separated file with the first column containing the sample names (as the bam files are named), and the other columns containing the factors that will make up the design. For example:

sample genotype treatment
sample1 WT DMSO
sample2 WT DMSO
sample3 WT drug
sample4 WT drug
sample5 KO DMSO
sample6 KO DMSO
sample7 KO drug
sample8 KO drug

will result in the following design:

~ genoype + treatment

or if --interaction is set:

~ genotype * treatment

Note the comparisons made need to be specified in the comparison.yaml file, a samplesheet alone is not enough. An example together with the above samplesheet would be:

comparison1:
  group1:
    genotype: 'WT'
  group2:
    genotype: 'KO'
wtdmso_vs_wtdrug:
  wtdmso:
    genotype: 'WT'
    treatment: 'DMSO'
  wtdrug:
    genotype: 'WT'
    treatment: 'drug'

In this case, 2 analyses would be performed (under folders 'comparison1' & 'wtdmso_vs_wtdrug'). In both cases all of the factor columns in the samplesheet will be used in the design.

A motif file in meme format can be supplied as well. If this is the case, the motifs will first be clustered, and motif enrichments will be calculated for all differential regions (using ame). Note that the 'reciprocal' differential peaks will be used as background. E.g. group2 differential peaks are background for group1 enrichments and vice versa. Note that this approach could be biased if there is a strong disbalance between those groups.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

atacofthesnake-0.4.0.tar.gz (62.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

atacofthesnake-0.4.0-py3-none-any.whl (25.3 kB view details)

Uploaded Python 3

File details

Details for the file atacofthesnake-0.4.0.tar.gz.

File metadata

  • Download URL: atacofthesnake-0.4.0.tar.gz
  • Upload date:
  • Size: 62.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for atacofthesnake-0.4.0.tar.gz
Algorithm Hash digest
SHA256 54c0a69375d137dac2adb248dc4265806234aa2067392194a131318a902bfe80
MD5 b0e891abc410574363810b499d65c4f0
BLAKE2b-256 e2697a1ad7d123b162694036b2798fd8582255c39e55852300f8d0c07ab05e55

See more details on using hashes here.

File details

Details for the file atacofthesnake-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: atacofthesnake-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 25.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for atacofthesnake-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 eafbd73a318faaa972ab6185f7e87dfe9c5e0ca04e8144772eca1236772149f1
MD5 e14790ff8aacc1dd890cc3d941285834
BLAKE2b-256 385250dc11721a2c185d20e7c59d461ab76222e5b1f8e6c0ec10018bb4e2f80f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page