navinlabcode / copykat

Other
193 stars 54 forks source link

Error in write.table(res, paste(sample.name, "prediction.txt", sep = ""), : #52

Closed Roger-GOAT closed 1 year ago

Roger-GOAT commented 2 years ago

Thank you for the great software! In some samples, I run copykat and get an error like this.

copykat.test <- copykat(rawmat=as.matrix(seuratobject@assays$RNA@counts), id.type="S", ngene.chr=5, 
                        win.size=25, KS.cut=0.05, sam.name="test", 
                        distance="euclidean", norm.cell.names="",
                        output.seg="FLASE", plot.genes="TRUE", 
                        genome="mm10",n.cores=8)

[1] "running copykat v1.0.8 updated 02/25/2022 introduced mm10 module, fixed typos"
[1] "step1: read and filter data ..."
[1] "20339 genes, 7494 cells in raw data"
[1] "8827 genes past LOW.DR filtering"
[1] "step 2: annotations gene coordinates ..."
[1] "start annotation ..."
[1] "step 3: smoothing data with dlm ..."
[1] "step 4: measuring baselines ..."
number of iterations= 2163 
number of iterations= 1003 
number of iterations= 525 
number of iterations= 1504 
number of iterations= 4235 
WARNING! NOT CONVERGENT! 
number of iterations= 5000 
[1] "low confidence in classification"
[1] "cell: 1"
WARNING! NOT CONVERGENT! 
number of iterations= 500 
[1] "cell: 2"
WARNING! NOT CONVERGENT! 
number of iterations= 500 
[1] "cell: 3"
......
[1] "step 5: segmentation..."
[1] "step 8: final prediction ..."
[1] "step 9: saving results..."
Error in write.table(res, paste(sample.name, "prediction.txt", sep = ""),  : 
  object 'res' not found

I only get the "test_copykat_CNA_raw_results_gene_by_cell.txt" file. I guess it may be due to the sample having no tumor cells. However, other similar samples can get the result and one sample is run several times and get the result and the error disappears.

mabaoweireadingene commented 2 years ago

I got the same problems with more than 10000 cells, Do you know how to do?

BertramLoong commented 2 years ago

I got the same problems with more than 10000 cells, Do you know how to do?

Hello, have you find some ways to solve this?

Li-ZhiD commented 2 years ago

I got the same problems in 1 sample out of 4, how to fix it?

BertramLoong commented 2 years ago

Hello, I guess there are some mistakes in this tools. And I find someone fix the functions, and I can run successfully using that way. Maybe you can try it : ) https://www.jianshu.com/p/f5bce8feca65

Li-ZhiD commented 2 years ago

Hello, I guess there are some mistakes in this tools. And I find someone fix the functions, and I can run successfully using that way. Maybe you can try it : ) https://www.jianshu.com/p/f5bce8feca65

it doesn't work.

gaobio commented 1 year ago

This issue should has been addressed in v1.0.9.