scverse / scirpy

A scanpy extension to analyse single-cell TCR and BCR data.
https://scirpy.scverse.org/en/latest/
BSD 3-Clause "New" or "Revised" License
220 stars 34 forks source link

Where has UMI count for AIR chains gone? #478

Closed adamwoolfe closed 9 months ago

adamwoolfe commented 10 months ago

Describe the bug I am looking to access UMI count for each chain of a set of antibodies read into the scirpy anndata frame. It appears that read count is present in the awkward array associated with the airr anndata obsm awkward array under the title 'consensus_count' like so:

adata["airr"].obsm['airr']['consensus_count']

but the UMI count is nowhere to be found. None of the available fields point to the UMI count.

where has this field gone (it is present in the original 10X filtered_contig_annotation.csv input file)?

System

Additional context Add any other context about the problem here.

grst commented 10 months ago

Hi Adam,

thanks for bringing this up! The UMI count goes to adata["airr"].obsm["airr"]["duplicate_count"].

I always found this a bit confusing, and I've just seen that there has been an update to the AIRR Rearrangement standard that introduces a dedicated umi_count field which is a lot clearer. I'll update scirpy to use this field instead in the future.

Best, Gregor