satijalab / sctransform

R package for modeling single cell UMI expression data using regularized negative binomial regression
GNU General Public License v3.0
212 stars 33 forks source link

Error in sort.int(x, na.last = na.last, decreasing = decreasing, ...) : 'x' must be atomic / sctransform #180

Open pstrangw opened 10 months ago

pstrangw commented 10 months ago

Hi,

When attempting to run sctransform in R I receive the following error:

Error in sort.int(x, na.last = na.last, decreasing = decreasing, ...) : 'x' must be atomic

Please could you help me troubleshoot this issue.

merged.seurat.object <- Seurat::SCTransform(merged.seurat.object)

This is a merged Seurat object composed of 10 layers.

Thanks for your help.

Best, Patrick

pstrangw commented 10 months ago

A quick update to this. I can perform sctransform on the merged seurat object without issue if there is only 1 layer present. If the object is split into 10 layers based on 'Sample' identifier in the meta data then I receive the above error. Code below re joining layers and splitting object into layers.

#join layers
merged.seurat.object<- JoinLayers(merged.seurat.object,  assay = "RNA")
#split into 10 layers based on Sample identifier in metadata
merged.seurat.object[["RNA"]] <- split(merged.seurat.object[["RNA"]], f = merged.seurat.object$Sample)

Is there a useful way I can share the merged.seurat.object.RDS file? It is too large even zipped to attach here.

saketkc commented 10 months ago

You can email them to me at schoudhary@nygenome.org

pstrangw commented 10 months ago

Thanks Saket - I have emailed you the merged seurat file.