scImpute
scImpute copied to clipboard
error of 'missing value where TRUE/FALSE needed'
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",out_dir=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!
@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",out_dir=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