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

each element of 'reducedDims' must be a matrix-like object with nrow equal to 'ncol(object) #96

Open
makimenkova opened this issue Aug 19, 2019 · 1 comment

Comments

@makimenkova
Copy link

makimenkova commented Aug 19, 2019

Hello! I tried to use SC3 and this error occured:

    each element of 'reducedDims' must be a matrix-like object with nrow equal to 'ncol(object)'

My code:

dat = read.csv("/home/makimenkova/test/merge_with_astrocytes.csv", header = TRUE)
rownames(dat) <- dat[ , 1]
dat <- dat[ , 2:dim(dat)[2]]
dat <- as.matrix(dat)
dat[dat<0] <- 0
dat <- dat[apply(dat[,-1], 1, function(x) !all(x==0)), ]
labs <- as.character(names(data.frame(dat[0,])))
ann <- data.frame(clust_id = labs)

sce2_dataset <- create_sce_from_counts(dat, ann)

sce <- sc3_prepare(sce2_dataset, gene_filter = FALSE)
counts(sce) <- as.matrix(counts(sce))
logcounts(sce) <- as.matrix(logcounts(sce))
sce <- sc3_calc_dists(sce)
sce <- sc3_calc_transfs(sce)

My Session info:

─ Session info ──────────
 setting  value                       
 version  R version 3.6.1 (2019-07-05)
 os       Ubuntu 18.04.2 LTS          
 system   x86_64, linux-gnu           
 ui       RStudio                     
 language en_GB:en                    
 collate  en_GB.UTF-8                 
 ctype    en_GB.UTF-8                 
 tz       Europe/Moscow               
 date     2019-08-19  
______________
SC3                  * 1.9.1      2019-08-15 [1] Github (hemberg-lab/SC3@eaae33b)

What I did wrong?

@zgyaru
Copy link

zgyaru commented Oct 20, 2019

I encountered same problem when I running the example code. Did you solve it?

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