navinlabcode / copykat

Other
214 stars 55 forks source link

dist(0) problem #38

Closed eric423627 closed 2 years ago

eric423627 commented 3 years ago

Hi,

I am new to scRNA data analysis. copyKAT-heatmap

I was trying use this default code: tumor.cells <- pred.test$cell.names[which(pred.test$copykat.pred=="aneuploid")] tumor.mat <- CNA.test[, which(colnames(CNA.test) %in% tumor.cells)] hcc <- hclust(parallelDist::parDist(t(tumor.mat),threads =4, method = "euclidean"), method = "ward.D2")

However, it says error: Error in hclust(parallelDist::parDist(t(tumor.mat), threads = 4, method = "euclidean"), : must have n >= 2 objects to cluster

The program runs well and i got the heatmap from the step 4 is like: How should I solve this problem?

Thanks

gaobio commented 2 years ago

aneuploid

sorry about the confusion. It looked like you didn't extract any tumor cells using 'which(pred.test$copykat.pred=="aneuploid")', which must be caused by the use of "nondiploid" in your version and "aneuploid" in other versions. Now I have made it consistent, named "aneuploid" throughout the codes.