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

Remove title from cell metadata and move schema to object metadata #473

Merged
merged 3 commits into from
Oct 9, 2023

Conversation

allyhawkins
Copy link
Member

In working on the docs for AnnData contents, I noticed that we accidentally added the title and the schema_version to the cell metadata and not the object metadata. They both should be in metadata(sce) before converting to AnnData so they get saved in uns in the AnnData object. (see https://github.com/chanzuckerberg/single-cell-curation/blob/main/schema/3.0.0/schema.md#uns-dataset-metadata)

I moved the schema_version, but I didn't really like the idea of making a duplicate of the project ID and saving it to title. It seems silly and hard to explain in the docs. So because we already have project_id saved in the metadata, I'm leaving that as is and then removing title for now. As with the donor_id change if we submit to CZI we will need to add an actual title later anyways.

Copy link
Member

@jashapiro jashapiro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, with a suggestion to move the chunk setting the schema version up to the to the top to be near the comment about the schema/url.

I don't think this affects the use of metadata_to_coldata, since it looks like that only uses metadata(sce)$sample_metadata

Comment on lines 87 to 89
# add schema version
metadata(sce)$schema_version = "3.0.0"

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd move this up to the top of the function. That will hopefully remind us to update both the commend and the metadata element at the same time.

@allyhawkins allyhawkins merged commit 3bf3e71 into development Oct 9, 2023
3 checks passed
@allyhawkins allyhawkins deleted the allyhawkins/schema-to-metadata branch October 9, 2023 14:41
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.

2 participants