Skip to content

Store the organism per cell in raw scRNA-seq datasets - #18

Merged
rcannood merged 16 commits into
mainfrom
organism-in-obs
Nov 19, 2026
Merged

rcannood merged 16 commits into
mainfrom
organism-in-obs

Conversation

@rcannood

@rcannood rcannood commented Nov 18, 2026 •

Copy link
Copy Markdown
Member

Describe your changes

Store the organism of raw scRNA-seq datasets per cell, as an ontology term in obs, instead of as free text in uns.

  • file_raw: obs['organism_ontology_term_id'] is required (NCBI Taxonomy), next to the optional obs['organism'] label. uns['dataset_organism'] is removed. Per cell, so a dataset can mix organisms.
  • cellxgene_census: fills both columns from --species (homo_sapiens → NCBITaxon:9606, mus_musculus → NCBITaxon:10090); --dataset_organism is removed.
  • cellxgene_census_from_source_h5ad: CELLxGENE schema >= 6.0.0 moved the organism from obs to uns, so it's copied back to obs when needed; --dataset_organism is removed.
  • openproblems_op3: sets NCBITaxon:9606 with the other sample-level ontology terms; --dataset_organism is removed.
  • load_cellxgene_census, the cxg_* notebooks and create_resources/cellxgene_census.sh no longer pass dataset_organism. Test resources regenerated (mouse pancreas Ajn1Lo8zZomVzKtQ0004).

Multimodal and spatial datasets keep uns['dataset_organism'] until they're migrated. Task repos that read uns['dataset_organism'] (e.g. scGPT, Geneformer, UCE, scPRINT and the cell cycle conservation metric in batch integration) will need to switch to obs['organism_ontology_term_id'] when they move to the new datasets.

Issue ticket number and link

n/a

Checklist before requesting a review

  • I have performed a self-review of my code

  • Check the correct box. Does this PR contain:

    • Breaking changes
    • New functionality
    • Major changes
    • Minor changes
    • Bug fixes
    • Documentation
  • Proposed changes are described in the CHANGELOG.md

  • CI Tests succeed and look good!

Base automatically changed from scrnaseq-workflows to main November 18, 2026 15:37
@rcannood
rcannood merged commit 0ca9c8c into main Nov 19, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant