scverse / scverse/SnapATAC2

The value of 'Fraction of high-quality fragments overlapping peaks' is greater than 1

Open
#362 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
323
Forks
43
PR merge metrics
No merged PRs in 30d

Description

Hi Kai Zhang:
I am using snapatac2 version 2.7.0.
After running snap.tl.macs3(), I can view the peaks in adata.uns['macs3_pseudobulk']. I noticed that there are some rows in the peaks with identical "chrom", "start", and "end", although their other columns like "score" differ. Since peaks should be unique, I deduplicated the peaks in adata.uns['macs3_pseudobulk'] to keep only rows with unique "chrom:start-end" combinations for subsequent calculations.
git1

Running snapatac2.metrics.frip(adata, {"n_frag_overlap_peak": peaks}, normalized=False) gives me adata.obs['n_frag_overlap_peak']. I then divided adata.obs['n_frag_overlap_peak'] by adata.obs['n_fragment'] to calculate the "Fraction of high-quality fragments overlapping peaks" for each barcode. I found that 2709 barcodes have a "Fraction of high-quality fragments overlapping peaks" greater than 1, which is clearly unreasonable. Although these barcodes are not identified as cells, the fragment counts for each barcode in adata.obs['n_fragment'] may be inaccurate. What could be the reason for this?
git2

Thank you!

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the reported result with snap.tl.macs3() and metrics.frip(adata, {"n_frag_overlap_peak": peaks}, normalized=False), then compare the relevant values in adata.uns['macs3_pseudobulk'] and adata.obs. Check how duplicate peak coordinates and fragment counts are handled; done should include a confirmed explanation for fractions above 1 and a clearly defined correction or usage guidance.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
bioinformatics
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.