Question: ATAC-seq DE analysis
1
gravatar for collmerr
14 months ago by
collmerr20
collmerr20 wrote:

Hello all. I'm trying to do differential expression analysis using ATAC-seq data sets, but I'm having trouble getting HTseq-count or featureCounts to actually count the data. Any good protocols to accomplish this?

Thanks!

ADD COMMENTlink modified 14 months ago by trausch1.4k • written 14 months ago by collmerr20
1

HT-seq or featureCounts are not really suitable (tedious work to prepare an input format with bed regions) for ChIP/ATAC data. Use bamCoverage or multiBamSummary from deeptools. All you need is BAMs and a bed file.

ADD REPLYlink modified 14 months ago • written 14 months ago by venu6.2k

Disagreed. See my comment below. bedtools does not really support paired-end data, while featureCounts perfectly does. Preparing a featureCounts input file from BED is as easy as:

awk 'OFS="\t" {print $1"."$2+1"."$3, $1, $2+1, $3, "."}' peaks.narrowPeak > peaks.saf
ADD REPLYlink written 14 months ago by ATpoint21k
3
gravatar for Devon Ryan
14 months ago by
Devon Ryan91k
Freiburg, Germany
Devon Ryan91k wrote:

Differential accessibility, not differential expression.

We tend to use CSAW for this. The full pipeline is here, which is essentially:

  1. Fragments are filtered (alignmentSieve) so only those <=150 bases (i.e., likely from open chromatin) are present.
  2. MACS2 is run on that.
  3. CSAW is run in R and given the peaks from 2 and the unfiltered BAM files that were input into step 1.

Alternatively, you could use diffBind in the last step. As Venu pointed out, you can use multiBamSummary with a BED file to get your counts, but CSAW at least has functions that also do that.

ADD COMMENTlink written 14 months ago by Devon Ryan91k
1

Your link does not work anymore. Could you update it? Thanks!

ADD REPLYlink written 9 months ago by tiago2112871.1k
2

Here's the general snakePipes link.

ADD REPLYlink written 9 months ago by Devon Ryan91k

Just a quick question: Would it be possible to identify allele specific chromatin accessibility regions (ATAC-Seq) through snakePipes

ADD REPLYlink written 7 months ago by ancient_learner610

You should be able to, yes. The DNA-mapping workflow has an allele-specific mode, which should produce two BAM files. You can then input them as different groups. I've never personally tried this though.

ADD REPLYlink written 7 months ago by Devon Ryan91k
2
gravatar for trausch
14 months ago by
trausch1.4k
Germany
trausch1.4k wrote:

Another ATAC-Seq pipeline is available here. As part of the pipeline a count matrix is generated and an Rscript template for differential peak calling is part of the pipeline (script is here).

ADD COMMENTlink written 14 months ago by trausch1.4k
1
gravatar for Benn
14 months ago by
Benn7.5k
Netherlands
Benn7.5k wrote:

The way I approach this, is to first use MACS2 for peak calling using all BAM files together. This will generate a bed file with coordinates of all peaks. Then I use bedtools, something like this:

bedtools coverage -b ${bamFile} -a All_peaks.bed > CoverageFiles/${bamFile%.bam}.txt

And then merge all columns with the read counts from the files for edgeR.

ADD COMMENTlink modified 14 months ago • written 14 months ago by Benn7.5k

The issue with bedtools is one can not input multiple bam files at once. With multiBamSummary from deeptools, you can input as many BAM files as possible, it will generate one counts table for all BAMs.

ADD REPLYlink written 14 months ago by venu6.2k
1

Bedtools can count alignments from multiple BAM files (see http://bedtools.readthedocs.io/en/latest/content/tools/multicov.html)

ADD REPLYlink written 14 months ago by James Ashmore2.6k

+1. I completely forgot about multicov function. Thanks for adding.

ADD REPLYlink written 14 months ago by venu6.2k

As ATAC-seq is typically paired-end, I recomennd featureCounts from the subread package, which can handle this (bedtools cannot as far as I know), and is multithreaded.

ADD REPLYlink written 14 months ago by ATpoint21k

It would be helpful then to show how you do it with featureCount, see OP's remark in the question: "but I'm having trouble getting HTseq-count or featureCounts to actually count the data".

ADD REPLYlink written 14 months ago by Benn7.5k
1

Sorry, did not notice that sentence. There we go:

featureCounts cannot take bed or narrowPeak files directly, but wants a custom format called SAF:

## Make SAF file (+1 because SAF is 1-based, BED/narrowPeak is 0-based)
awk 'OFS="\t" {print $1"."$2+1"."$3, $1, $2+1, $3, "."}' peaks.narrowPeak > peaks.saf

## Then run fc:
featureCounts -a peaks.saf -F SAF -T <int> -p -o peaks_countMatrix.txt *.bam

-T = number of threads; -p indicates paired-end data

ADD REPLYlink written 14 months ago by ATpoint21k

When I use the featureCount for ATAC-seq. Should I set the length of reads? For now, I just consider reads shorter than 100bp.

subread-1.6.3-source/bin/featureCounts -F SAF -T 64 -P -p -d 0 -D 100 -a test.saf -o count.txt test.bam
ADD REPLYlink written 8 weeks ago by vw20

In my current pipeline I typically only use the 5' end of each read (so of both the forward and reverse read) as this is the cutting site of the transposome and treat reads as single-end for this purpose. Limiting reads to those with a certain insert size imho throws away the majority of reads so I take all of them. featureCounts has an option to only count 5' ends.

ADD REPLYlink modified 8 weeks ago • written 8 weeks ago by ATpoint21k

Thank for your reply. Could you please provide your command line?

ADD REPLYlink written 8 weeks ago by vw20
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1601 users visited in the last hour