aertslab / SCopeLoomR

R package (compatible with SCope) to create generic .loom files and extend them with other data e.g.: SCENIC regulons, Seurat clusters and markers, ...
MIT License
38 stars 15 forks source link

Error during loom export from SCENIC #37

Open jeremycfd opened 2 years ago

jeremycfd commented 2 years ago

Hello, I've been running SCENIC in R successfully but running into problems with exporting the results in loom format, which is the format utilized in the tutorials for downstream analyses of the SCENIC results. Specifically, I'm hitting the hard threshold of 245 unique values in column attributes, but I'm unable to figure out exactly what that means, or how to reduce those column attributes, or how to export the data in a different manner.

export2loom(scenicOptions, exprMat)

The folowing cell metadata will be added:
                     type
orig.ident      character
nCount_RNA        numeric
nFeature_RNA      integer
Analysis        character
Library         character
GexCellLong     character
percent.mito      numeric
S.Score           numeric
G2M.Score         numeric
Phase           character
old.ident       character
nCount_SCT        numeric
nFeature_SCT      integer
SCT_snn_res.0.8    factor
seurat_clusters    factor
Samp            character
Px              character
SampNum         character
[1] "Adding global attributes..."
[1] "Adding matrix..."
  |======================================================================| 100%[1] "Adding column attributes..."
[1] "Adding default metrics nUMI..."
[1] "Adding default metrics nGene..."
[1] "Adding default embedding..."
[1] "Adding row attributes..."
[1] "Adding columns graphs..."
[1] "Adding row graphs..."
[1] "Adding layers..."
Error in add_col_attr(loom = loom, key = cn, value = cellInfo[, cn], as.annotation = isAnnotation,  :
  Cannot add column attribute as an annotation with more than 245 unique values.