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
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions bin/sce_to_anndata.R
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ if (!(stringr::str_ends(opt$output_rna_h5, ".hdf5|.h5"))) {
# sure that the sce that is getting converted to AnnData is compliant with CZI
# CZI 3.0.0 requirements: https://github.com/chanzuckerberg/single-cell-curation/blob/b641130fe53b8163e50c39af09ee3fcaa14c5ea7/schema/3.0.0/schema.md
format_czi <- function(sce) {

# add schema version
metadata(sce)$schema_version = "3.0.0"

# add library_id as an sce colData column
# need this column to join in the sample metadata with the colData
sce$library_id <- metadata(sce)$library_id
Expand All @@ -71,12 +75,8 @@ format_czi <- function(sce) {
# create columns for assay and suspension ontology terms
assay_ontology_term_id = metadata(sce)$assay_ontology_term_id,
suspension_type = metadata(sce)$seq_unit,
# move project id to title slot in metadata list
title = metadata(sce)$project_id,
# add is_primary_data column; only needed for anndata objects
is_primary_data = FALSE,
# add schema version
schema_version = "3.0.0"
is_primary_data = FALSE
)

# add colData back to sce object
Expand Down