Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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

@makimenkova

Description

@makimenkova

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions