Giter Site home page Giter Site logo

Comments (10)

LTLA avatar LTLA commented on June 16, 2024

You're going to have to be more specific. Provide some code to reproduce the error. Also, this question doesn't go here, but on the simpleSingleCell repository (https://github.com/MarioniLab/simpleSingleCell).

from scran.

VVictorChen avatar VVictorChen commented on June 16, 2024

Here are the code. I will put the issue on the right place next time. :)

sc4 <- SingleCellExperiment(list(counts=as.matrix(ucb2)),
                           colData=DataFrame(Donor=name4))
#Quality control and normalization
set.seed(1000)
clusters <- quickCluster(sc4, method="igraph", min.mean=0.1)
table(clusters)
sc4 <- computeSumFactors(sc4, min.mean=0.1, clusters=clusters)
summary(sizeFactors(sc4))
sc4 <- normalize(sc4)
vg_seurat <- read.table(file = "*****.txt")
cor_vg <- Reduce(intersect, list(rownames(sc1), rownames(sc2), rownames(sc3), rownames(sc4),vg_seurat$x))
rescaled <- multiBatchNorm(sc1[cor_vg,], sc2[cor_vg,], sc3[cor_vg,], sc4[cor_vg,])
rescaled.sc1 <- rescaled[[1]]
rescaled.sc2 <- rescaled[[2]]
rescaled.sc3 <- rescaled[[3]]
rescaled.sc4 <- rescaled[[4]]
set.seed(100)
original <- list(
    GSEsc1=logcounts(rescaled.sc1)[cor_vg,],
    GSEsc2=logcounts(rescaled.sc2)[cor_vg,],
    GSEsc3=logcounts(rescaled.sc3)[cor_vg,],
    GSEsc4=logcounts(rescaled.sc4)[cor_vg,]
)
mnn.out <- do.call(fastMNN, c(original, list(k=50, d=50, approximate=TRUE, auto.order=TRUE)))

Thanks!

from scran.

LTLA avatar LTLA commented on June 16, 2024

I'm afraid that your latest post doesn't help; I can hardly reproduce the error when one of the file names is "*****.txt". See https://stackoverflow.com/help/mcve for the expected level of debugging information. The actual error message would also help.

from scran.

VVictorChen avatar VVictorChen commented on June 16, 2024

I am sorry for this stupid mistake. The real code is

#input variable genes which are found according to Seurat package
vg_seurat <- read.table(file = "vargene.txt")

from scran.

LTLA avatar LTLA commented on June 16, 2024

Your are missing the point here. I need a bit of code that I can run on my computer in order to get the same error that you did. Again, see the link to the StackOverflow page that I posted above. You should also describe the error message in more detail than you have currently provided (i.e., none).

from scran.

gxg2002cn avatar gxg2002cn commented on June 16, 2024

Hi, I met exactly the same error today when running fastMNN. Do you find a solution? Thanks!

from scran.

LTLA avatar LTLA commented on June 16, 2024

I don't have a solution because I can't reproduce the problem on my computer. I can't even try to reproduce it, because I don't have the data. If I had to guess, there are NAs somewhere in your input data. If you want to help to fix this problem, please provide an RDS file of the input data (anonymized as necessary) and the arguments with which you used to call fastMNN.

from scran.

gxg2002cn avatar gxg2002cn commented on June 16, 2024

from scran.

LTLA avatar LTLA commented on June 16, 2024

Thanks @gxg2002cn. As I suspected, you have NaNs in your matrix, corresponding to the spike-ins genes (presumably because you have no counts for the spike-ins). After removing these rows, the function works:

library(scran)
load("fastMNN_error.RData")

set.seed(1000)
not.erccs <- !grepl("ERCC", rownames(original[[1]]))
mnn.out <- do.call(fastMNN, c(original, list(k=20, d=50, approximate=TRUE, 
   subset.row=not.erccs)))

The output looks good, there seems to be decent mixing between batches on a t-SNE plot.

from scran.

gxg2002cn avatar gxg2002cn commented on June 16, 2024

from scran.

Related Issues (20)

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.