cellgeni / sceasy

A package to help convert different single-cell data formats to each other
GNU General Public License v3.0
346 stars 52 forks source link

Error: Cannot find 'class' in this Seurat object #73

Closed ShanSabri closed 1 year ago

ShanSabri commented 1 year ago

I'm experiencing this error when trying to export a Seurat object to h5ad format:

INFO [2023-05-23 14:49:26] Exporting data object to /compbio/data/users/ssabri/SC451_cell_atlases/ATLAS_V3_nFeaturesThres3000/data/INTEGRATED/SEURAT-OBJ-FILT.rds
Error: Cannot find 'class' in this Seurat object
In addition: Warning message:
In .regularise_df(obj@meta.data, drop_single_values = drop_single_values) :
  Dropping single category variables:extra_metadata.cell_sample_stage, extra_metadata.cell_line_source, qc_params.low_nFeature_RNA, qc_params.high_nFeature_RNA, qc_params.low_nCount_RNA, qc_params.high_nCount_RNA, qc_params.high_percent_mito, qc_params.high_percent_ribo, qc_params.contamination_thresho
ld, qc_params.scrublet_doublet_threshold, qc_params.downsample_ncells, qc_params.remove_low_qc_cells, qc_params.remove_scrublet_doublets, qc_params.remove_scdblfinder_doublets, qc_params.remove_contaminated_cells, qc_params.regress_cell_cycle, qc_params.remove_empty_drops, Sample_Description, scrublet_
call, DropletQC_Empty_Status, pass_qc, DropletQC_Damaged_Status_decontxcounts_snn_res.0.1, SingleR_SANA_INTERNAL_CELL_ATLAS_V1_high_conf_0.4, SingleR_SANA_INTERNAL_CELL_ATLAS_V1_high_conf_0.45, SingleR_SANA_INTERNAL_CELL_ATLAS_V1_high_conf_0.5
Execution halted

Code:

  sceasy::convertFormat(
    obj,
    main_layer = "data",
    assay = "SCT",
    from = "seurat",
    to = "anndata",
    outFile = file.path(outdir_obj, "SEURAT-OBJ-FILT.h5ad")
  )

Any ideas?

ShanSabri commented 1 year ago

Fault on my end with incorrectly setting meta.data column names. Closing issue!