Code Monkey home page Code Monkey logo

Comments (4)

zhongguodiyidao avatar zhongguodiyidao commented on June 8, 2024

Hi
How to get mm_kappasim data?
thanks!

from slice.

acihanckr avatar acihanckr commented on June 8, 2024

Hi How to get mm_kappasim data? thanks!

data(mm_kappasim) command will load the data as variable km

from slice.

acihanckr avatar acihanckr commented on June 8, 2024

Hi team, great tool! I transit my Seurat to SLICE and get an error in 'getRDS', would you mind giving some tips? Thanks!

es <- as.matrix(Seurat@assays$RNA@counts)
meta <- [email protected]

sc <- construct(exprmatrix=as.data.frame(es), 
                cellidentity=factor(meta$SCT_snn_res.0.3, levels=c('1','2','3','4','5','6',
                '7','8','9','10','11')),projname='Seurat')
data(mm_kappasim)

sc <- getEntropy(sc, km=km,            # use the pre-computed kappa similarity matrix of mouse genes
                 calculation="bootstrap",               # choose the bootstrap calculation
                 B.num=100,                             # 100 iterations
                 exp.cutoff=1,                          # the threshold for expressed genes
                 B.size=1000,                           # the size of bootstrap sample
                 clustering.k=floor(sqrt(1000/2)),      # the number of functional clusters  
                 random.seed=201602)                    # set the random seed to reproduce the results in the paper

plotEntropies(sc)

# perform PCA using the expression of predicted signature genes and with a high variance (greater than 8 variance in log2 FPKM) 
# The predicted signature genes are stored in FB.sig in FB.rda in the data folder 
Seurat <- SCTransform(Seurat,variable.features.n = 3000)
gene <- VariableFeatures(Seurat)
sc <- getRDS(sc, genes.use = gene,
             method="pca", 
             num_dim=2, log.base=2, 
             do.center=TRUE, do.scale=FALSE, 
             use.cor=TRUE, 
             min.var=8, min.cells=0)
Performing dimension reduction
Error in reduceExpressionSpace(object@data[which(object@genenames %in%  : 
  Insufficent genes for dimension reduction.

I try FB.sig or 1000 VariableFeatures, it gets the same error. Thanks.

Hello,

I was able to reproduce this error and it seems like min.var=8 too large of a threshold. Is there any reason for this choice? When I changed min.var=0.8 for example code runs for pbmc data with no issues.

Best

from slice.

acihanckr avatar acihanckr commented on June 8, 2024

Hello,

After further investigation of this issue I realized that in the demo code, min.var is set to 8. However, the example data is not normalized hence gene expression variance 8 is a reasonable threshold. However, if you normalized the data before extracting the counts, no gene will pass this threshold.

Best

from slice.

Related Issues (3)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.