GIS-SP-Group / RCA

R package for robust clustering of single cell RNA sequencing data
MIT License
38 stars 24 forks source link

Missing values present in input variable 'x'. Consider using use = 'pairwise.complete.obs'. #6

Open DrLucyMac opened 5 years ago

DrLucyMac commented 5 years ago

Hi there, I am getting the following error but only when i use the SelfProjection method..

> #Run PCA Pipeline
> a <- data.frame(as.matrix(counts(macro)))
> ### construct data object
> data_obj = dataConstruct(a);
> ### filt out lowly expressed genes
> data_obj = geneFilt(obj_in = data_obj);
> ### normalize gene expression data (Note: default is no normalization).
> data_obj = cellNormalize(data_obj);
> ### log transform the data
> data_obj = dataTransform(data_obj,"log10");
> ### project the expression data into Reference Component space
> data_obj = featureConstruct(data_obj,method = "SelfProjection");
> ### generate cell clusters
> data_obj = cellClust(data_obj);
Error in cor(fpkm_temp, method = "pearson") : 
  Missing values present in input variable 'x'. Consider using use = 'pairwise.complete.obs'.
> #Plots generated in working directory as png files
> RCAPlot(data_obj);
Error in prcomp.default(t(scale(rca_obj$fpkm_for_clust))) : 
  cannot rescale a constant/zero column to unit variance
> rca_macro <- data_obj

Can you help please?

GIS-SP-Group commented 5 years ago

Dear Imacdonald12,

Could you try to reduce the number of input cells by applying a stricter QC criteria (e.g. high number of detected genes cutoff)? It is likely that the feature selection step had generated some NA values possibly caused by low quality cells which contains no feature genes after feature selection.