diazlab / CONICS

CONICS: COpy-Number analysis In single-Cell RNA-Sequencing
73 stars 28 forks source link

Issue Running CONICSMat Tutorial Due To Deprecated SCRAN Function #25

Open MayaTalukdar opened 4 years ago

MayaTalukdar commented 4 years ago

Hello,

I am working through the SmartSeq2 scRNA seq of Oligodendroglioma tutorial for CONICSMat and running into an issue with this part:

vg=detectVarGenes(suva_expr,500) ts=calculateTsne(suva_expr,vg) plotTsneGene(ts,suva_expr,c("MBP","CSF1R","ALDOC","OLIG1"))

It appears that detectVarGenes calls a scran function TrendVar, which is deprecated. SCRAN suggests replacement with fitTrendVar, but this takes in both a matrix of counts and a vector of variances, while TrendVar only takes in the count matrix. How can we generate this vector of variances in order to successfully run fitTrendVar and therefore visualize CNVs on a tSNE?

Thank you!

UmairSeemab commented 3 years ago

I have the same issue

nlaillerbms commented 3 years ago

Same problem

Bakr-Mo commented 2 years ago

same here

andynkili commented 2 years ago

same here

jcostea commented 1 year ago

same problem

Aggarwal-Ayush commented 5 months ago

Hi

If anyone's still interested in the solution for this or comes looking for it in the future, they can use the below modified function to detect variable genes.

detectVarGenes_custom = function(mat,ngenes=500,FDR=0.00001){ var.out = scran::modelGeneVar(mat) hvg.out = var.out[which(var.out$FDR <= FDR),] hvg.out = hvg.out[order(hvg.out$bio, decreasing=TRUE),] genes=rownames(hvg.out)[1:ngenes] return(genes) }