I have two anndata objects read in from two different sources:
prop1 prop2 prop3
cell1 1.0 0.0 1.0
cell2 0.0 2.0 0.0
prop4 prop5 prop6
cell4 4.0 0.0 0.0
cell5 0.0 5.0 0.0
cell1 0.0 0.0 1.0
Essentially information for cells are read in from two different sources but when the obs index/name is the same, they are the same cell (cell1 has prop1, prop3, and prop6).
I want to concatenate these and where I have the same cell observation index I want to merge the two rows. anndata.concat() doesn’t seem to do this at least using any of the parameters that I tried. The concatenate does what I want, but there doesn’t seem to be any way to merge the two ‘cell1’ rows together. I get this:
prop1 prop2 prop3 prop4 prop5 prop6
cell1 1.0 0.0 1.0 0.0 0.0 0.0
cell2 0.0 2.0 0.0 0.0 0.0 0.0
cell4 0.0 0.0 0.0 4.0 0.0 0.0
cell5 0.0 0.0 0.0 0.0 5.0 0.0
cell1 0.0 0.0 0.0 0.0 0.0 1.0
What I want is this:
prop1 prop2 prop3 prop4 prop5 prop6
cell1 1.0 0.0 1.0 0.0 0.0 1.0
cell2 0.0 2.0 0.0 0.0 0.0 0.0
cell4 0.0 0.0 0.0 4.0 0.0 0.0
cell5 0.0 0.0 0.0 0.0 5.0 0.0
Am I missing something? This seems like it should be easy (yes, relatively new to AnnData).
Brian