Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

concat when some values of X are None #678

Open
ivirshup opened this issue Jan 11, 2022 · 0 comments
Open

concat when some values of X are None #678

ivirshup opened this issue Jan 11, 2022 · 0 comments

Comments

@ivirshup
Copy link
Member

Subpart of #467

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants