I am working on an scRNA-seq pipeline in which the transcripts for each cell are tagged with two different barcodes, instead of one. So, after running Kallisto, the count matrix (that I store as an anndata object) will have twice as many "observations" or barcodes than real cells.
I would like to collapse each pair of observations into a single observation. I know how to identify and extract which observations I want to join to which. But how do I add them up and replace the two observations by the new one?