Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexpected number of cells produced in fastMNN #35

Open
Hrovatin opened this issue Apr 6, 2022 · 3 comments
Open

Unexpected number of cells produced in fastMNN #35

Hrovatin opened this issue Apr 6, 2022 · 3 comments

Comments

@Hrovatin
Copy link

Hrovatin commented Apr 6, 2022

I tried to run fastMNN (installed today from bioconductor), but I get more cells than expecte din the corrected object. Any idea why?

sobj <- subset(data, features=hvg)

print('sobj')

print(sobj)

expr <- GetAssayData(object = sobj ,slot = "data")

print('expr')

print(dim(expr))

sce <- fastMNN(expr, batch = sobj@meta.data[[batch]])

print('sce')

print(dim(sce))

[1] "sobj"
An object of class Seurat 
2000 features across 2730 samples within 1 assay 
Active assay: originalexp (2000 features, 0 variable features)
[1] "expr"
[1] 2000 2730
[1] "sce"
[1] 2000 9815
@LTLA
Copy link
Owner

LTLA commented Apr 10, 2022

I have no idea. I assume that expr is a matrix or dgCMatrix, and not some custom class that might be reinterpreted as a list.

@Hrovatin
Copy link
Author

Hrovatin commented Apr 10, 2022

Yes, it is a matrix

class(expr)

    'matrix''array'

image

@LTLA
Copy link
Owner

LTLA commented Apr 10, 2022

Well, I dunno. Works fine for me on batchelor 1.10.0.

library(batchelor)
x <- matrix(runif(2000000), ncol=1000)
dim(x)
## [1] 2000 1000

batch <- sample(2, ncol(x), replace=TRUE)
out <- fastMNN(x, batch=batch)
dim(out)
## [1] 2000 1000

Try modifying the example above to reproduce the error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants