muon icon indicating copy to clipboard operation
muon copied to clipboard

Count fragment function counts duplicates

Open lauradmartens opened this issue 2 years ago • 0 comments

Describe the bug The muon.atac.tl.count_fragments_features function uses the score in the fragment file to count fragments: https://github.com/scverse/muon/blob/31a45d76f7a1d97eee34866e525788f960e7d504/muon/_atac/tools.py#L860

This score also includes all duplicated read pairs: https://support.10xgenomics.com/single-cell-atac/software/pipelines/latest/output/fragments, but we only want to use the unique fragments for downstream analysis and not the duplicates.

Expected behaviour Only count the unique fragments by having: mx.data[i].append(int(1))

lauradmartens avatar Jun 12 '23 13:06 lauradmartens