digitalcytometry / cytotrace2

CytoTRACE 2 is an interpretable AI method for predicting cellular potency and absolute developmental potential from scRNA-seq data.
Other
85 stars 6 forks source link

Expression data from samples which are stored as layers. #5

Closed apal6 closed 5 months ago

apal6 commented 5 months ago

Hi,

Thank you for the wonderful package.

My seurat object stores multiple samples as layers. Should I merge the layers and then run cytotrace2? What would you recommend?

Also, after I defined my annotations and ran the plotData command, i get this error, Error in[.data.frame(annotation, "Phenotype") : undefined columns selected

code: `# extract annotation data annotation_test <- test$annotation

plots_test <- plotData(cytotrace2_result = cytotrace2_result_test, annotation = annotation_test, expression_data = expression_data_test)`

Thank you

yuyzha commented 5 months ago

To people who encountered the same error, please try: annotation_test <- data.frame(test$annotation)

apal6 commented 5 months ago

Yes, I was able to fix it after converting it to a dataframe.

merged_obj$Phenotype <- Idents(merged_obj)

extract annotation data

annotation <- as.data.frame(merged_obj$Phenotype) annotation$Phenotype <- annotation$merged_obj$Phenotype annotation$merged_obj$Phenotype <- NULL annotation <- as.data.frame(annotation)

savagyan00 commented 5 months ago

Hi and thank you for using CytoTRACE 2!

Thank you all for taking the time to suggest a solution to this issue! Your input is greatly appreciated. I’d like to add some clarification to ensure that the solution covers all aspects of the problem:

Thanks again for reaching out!

savagyan00 commented 5 months ago

Hi,

It appears that this issue has been successfully resolved, and no further questions have come up given the clarifications we provided. Consequently, I am closing this issue ticket.

Thank you for reaching out to us!