Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TSS heatmap inconsistency between ChIPseeker and nf-core ATAC-seq pipeline #193

Closed
hyjforesight opened this issue Sep 12, 2022 · 6 comments
Labels
enhancement New feature or request
Milestone

Comments

@hyjforesight
Copy link

Hello ATAC-seq pipeline,
Previously, we did the ATAC-seq analysis manually by trimming adapters (Adapterremoval), alignment (Bowtie2), QC (remove blacklist, duplicates, unmapped reads, mito genes…), peak calling (MACS2), and peak annotation (ChIPseeker).

Luckily, we found this amazing and easy-to-use ATAC-seq pipeline on nf-core. We tried this pipeline and it works super great.

However, we are confused with 2 issues:

  1. The TSS heatmaps are inconsistent between our ChIPseeker results and nf-core ATAC-seq pipeline. In our hands, we can see heatmaps with signals, but the pipeline shows no signal at all. Which heatmap is right?
    Heatmap

  2. We found that the pipeline only calls broad peak, but ENCODE ATAC-seq pipeline calls narrow peak. Why does nf-core pipeline only call broad peak?
    broadpeak

Thank you!
Best,
Yuanjian Huang

@bjlang
Copy link
Contributor

bjlang commented Nov 3, 2022

With respect to your 2nd issue:
The pipeline defaults to calling broad peaks. To activate narrowPeak mode, use --narrow_peak (see https://nf-co.re/atacseq/1.2.2/parameters#peak-calling-options)

@lnblum
Copy link

lnblum commented Nov 14, 2022

I've experienced the same issue. I think it has to do with the genes.tss.bed file. I ran deeptools manually and swapped it out for refTSS (attached below - refTSS_v3.1_human_coordinate.hg38.bed) and got a result that makes sense. I have not been able to diagnose the problem with genes.tss.bed but maybe deeptools is looking at the wrong columns in the bed file?
50K-15-S-40-CEB_R1.plotHeatmap.pdf
50K-15-S-40-CEB_R1.mLb.clN.plotHeatmap.pdf
refTSS_v3.1_human_coordinate.hg38.bed.txt

@drpatelh drpatelh added this to the 2.0 milestone Nov 15, 2022
@drpatelh drpatelh added the enhancement New feature or request label Nov 15, 2022
@robsyme
Copy link
Contributor

robsyme commented Nov 21, 2022

There are three issues, I think:

  1. We are supplying the gene bed rather than a TSS bed, which is the primary cause of the poor results.
  2. We are not using the --missingDataAsZero parameter to computeMatrix scale-regions
  3. Even if we switched the bed file to the TSS bed emitted in PREPARE_GENOME.out.tss_bed, that would not work as the bin width in computeMatrix scale-regions is 10bp and so the 1bp wide regions in PREPARE_GENOME.out.tss_bed would all be filtered out.

I'd suggest that we use the PREPARE_GENOME.out.tss_bed file, but expand all regions to at least 10 bp. This would involve either some awk magic in the DEEPTOOLS_COMPUTEMATRIX process, or an upstream bedtools process that then feeds into DEEPTOOLS_COMPUTEMATRIX.

If we expand the PREPARE_GENOME.out.tss_bed so that it meets the computeMatrix bin width minimum, we get sensible results that look like the heatmap attached.

expanded GM12878_FAST_1 mLb clN

@robsyme robsyme mentioned this issue Nov 21, 2022
8 tasks
@drpatelh
Copy link
Member

Fixed in #228

Be great if you can confirm by trying out the code on the dev branch. We are still fixing some stuff there but the plots should be generated as expected.

nextflow pull nf-core/atacseq -r dev
nextflow run nf-core/atacseq <YOUR_OPTIONS> -r dev

@lnblum
Copy link

lnblum commented Nov 28, 2022

Can confirm. I ran the dev version on some data last week and the heatmaps were generated as expected.

@hyjforesight
Copy link
Author

Hello @drpatelh
Thank you for fixing the issue!

Could you please let me know how to adjust the scale bars to the same scale between different samples? Now they're 1.6, 1.72, 1.2 and 1.2.

image

Thank you in advance!

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants