Open helianthuszhu opened 4 years ago
@Vivianstats Hi Vivian, this error might be raised when there are NA or empty values in the input file. It would be very helpful if you could add a function to check the input file or give a warning message that tells users to remove genes containing NAs or replace NAs with real numbers.
Hi Vivian, .Thank you very much for providing such wonderful tools for us. Actually, some of my data sets worked really well but not all of them. Here is my script: scimpute(file.path(outDir,"tumor.tpm"),infile="csv",outfile="csv",outdir=file.path(outDir,"malignant"), labeled=TRUE,labels=as.vector(labels_tumor), type="TPM",genelen=genelen,drop_thre=0.5,ncores=num_cores) And I got error like this when run one data set: [1] "reading in raw count matrix ..." [1] "number of genes in raw count matrix 21985" [1] "number of cells in raw count matrix 317" Error in if (min(raw_count) < 0) { : missing value where TRUE/FALSE needed
Do you have any suggestion on this error? Thanks in advance!
Hello xutongran,
Can you check if your tumor.tpm file is in the csv format? Does it contain any missing or negative values?
You probably have Inf
TPM values, due to having large log2(TPM+1)
values
Same problems met, and I checked the tumor.tpm file, no NAs or negative values existed.
Hello @Bing978,
If you could directly try min(count)
in R, where count
is the raw count matrix, that might tell us what the issue is.
Hi Vivian, I am using scImpute on my several scRNA data sets. Thank you very much for providing such wonderful tools for us. Actually, some of my data sets worked really well but not all of them. Here is my script: scimpute(file.path(outDir,"tumor.tpm"),infile="csv",outfile="csv",outdir=file.path(outDir,"malignant"), labeled=TRUE,labels=as.vector(labels_tumor), type="TPM",genelen=genelen,drop_thre=0.5,ncores=num_cores) And I got error like this when run one data set: [1] "reading in raw count matrix ..." [1] "number of genes in raw count matrix 21985" [1] "number of cells in raw count matrix 317" Error in if (min(raw_count) < 0) { : missing value where TRUE/FALSE needed
Do you have any suggestion on this error? Thanks in advance!