You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What should we do when we concat multiple anndata objects where some of them have None for their X value?
While I think we should broadly do the same thing that we do for values in layers, I think this could have some weird behaviour.
Here is my current proposal for the behavior:
All AnnData's have X – current behavior
No AnnData's have X – same as if no AnnData had this key. It remains None.
Some AnnData's have X and it's an outer join. We use the fill_value and create .X arrays for the objects missing them
Some AnnData's have X and it's an inner join. Result has X = None.
The final case feels off to me, but it's the least weird behavior I could think of. I personally would expect this to result in an inner join on the variables with an outer join on the values for X. That is, we still take the intersection of the alternative axis, but we fill the Xs which were missing.
But this would inconsistent with the behavior for layers (#244), which I think is worse.
I think this leads to the broader issue of the join argument controlling both combining the dimensions and which elements are kept (#591).
The text was updated successfully, but these errors were encountered:
Subpart of #467
What should we do when we
concat
multiple anndata objects where some of them haveNone
for theirX
value?While I think we should broadly do the same thing that we do for values in
layers
, I think this could have some weird behaviour.Here is my current proposal for the behavior:
AnnData
's haveX
– current behaviorAnnData
's haveX
– same as if noAnnData
had this key. It remainsNone
.AnnData
's haveX
and it's an outer join. We use thefill_value
and create.X
arrays for the objects missing themAnnData
's haveX
and it's an inner join. Result hasX = None
.The final case feels off to me, but it's the least weird behavior I could think of. I personally would expect this to result in an inner join on the variables with an outer join on the values for
X
. That is, we still take the intersection of the alternative axis, but we fill theX
s which were missing.But this would inconsistent with the behavior for
layers
(#244), which I think is worse.I think this leads to the broader issue of the
join
argument controlling both combining the dimensions and which elements are kept (#591).The text was updated successfully, but these errors were encountered: