Unverified Commit 43a696e3 authored by Marius van den Beek's avatar Marius van den Beek Committed by GitHub
Browse files

Merge pull request #19774 from mvdbeek/fix_anndata_with_integer_observations

[24.2] Fix anndata metadata setting for data with integer indexes
parents a1a133f6 3ce6b601
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -1612,7 +1612,10 @@ class Anndata(H5):
                obs = get_index_value(tmp)
                # Determine cell labels
                if obs is not None:
                    dataset.metadata.obs_names = [n.decode() for n in obs]
                    # This is super expensive because the number of observations is unbounded.
                    # https://github.com/galaxyproject/tools-iuc/blob/8341270dd36185ebf59d15282bc79f1215e936a4/tools/anndata/import.xml#L53
                    # seems to be the only tool to consume this in the IUC. drop and make tool compute this?
                    dataset.metadata.obs_names = [util.unicodify(n) for n in obs]
                else:
                    log.warning("Could not determine observation index for %s", self)