Neurosurgery-Brain-Tumor-Center-DiazLab/CONICS

Issue Running CONICSMat Tutorial Due To Deprecated SCRAN Function

Opened this issue · 6 comments

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!

I have the same issue

Same problem

same here

same here

same problem

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)
}