diff --git a/bin/sce_to_anndata.R b/bin/sce_to_anndata.R index 19b912ec..cb6c9f48 100755 --- a/bin/sce_to_anndata.R +++ b/bin/sce_to_anndata.R @@ -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 @@ -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