hemberg-lab / SC3

A tool for the unsupervised clustering of cells from single cell RNA-Seq experiments
http://bioconductor.org/packages/SC3
GNU General Public License v3.0
119 stars 55 forks source link

All genes were removed after the gene filter! Stopping now... #44

Closed neocaleb closed 6 years ago

neocaleb commented 6 years ago

I ran SC3 a few weeks ago. At that time, it well works and I successfully found clusters.

However, after I update R and reinstalled the SC3, I cannot run SC3 with exactly same code and same data.

I got a message "All genes were removed after the gene filter! Stopping now...".

My R version is 3.4.2 and I install recent version of SC3.

Does anyone know this problem? My script is as follows:


ann <- data.frame(cell_type1 = rep(1,dim(temp2)[2])) pd <- new("AnnotatedDataFrame", data = ann)

colnames(temp2) <- rownames(ann) sceset <- newSCESet(countData = temp2, phenoData = pd, logExprsOffset = 1) is_exprs(sceset) <- exprs(sceset) >0.1 sceset <- calculateQCMetrics(sceset) sceset <- sc3(sceset, ks = 2:10, biology = TRUE) p_data <- pData(sceset)

wikiselev commented 6 years ago

Hi, what is your data? Is it scRNA-seq? Usually all genes are removed when there are no zero values in the expression matrix. Can you share your data with me?

neocaleb commented 6 years ago

Hi wikiselev,

Thank you for your answer. I used Pancreas scRNA-seq data obtained from Wang's 2016 diabetes paper.

As you mentioned, I found there is no zero in my input data. I think there was a normalization problem. I ran again with same data with different normalization (there exist zero now) and it well works.

Thanks for your help.

wikiselev commented 6 years ago

Great, I am glad it worked! Yes, Wang data has some strange normalisation. However, in general you can switch off the gene filter by setting gene_filter = FALSE in the sc3 function. Then all genes will be used for distance calculations. Some normalisation/imputation methods completely remove zeros from the expression matrix (sometimes even introduce negative values). It makes it hard to deal with in a very general way.

neocaleb commented 6 years ago

Thanks. I appreciate your help.