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

Error in base::rowMeans(x, na.rm = na.rm, dims = dims, ...) : 'x' must be an array of at least two dimensions #276

Closed
corticaltone opened this issue Dec 9, 2020 · 5 comments

Comments

@corticaltone
Copy link

Hi
I'm trying to run inferCNV on 10x genomics data and keep getting the following error message
INFO [2020-12-09 11:45:38] Adding h-spike
INFO [2020-12-09 11:45:38] -hspike modeling of Epithelial_C5
Error in base::rowMeans(x, na.rm = na.rm, dims = dims, ...) :
'x' must be an array of at least two dimensions

I read through Issue #156 but was not able to find a solution there. Here is the full output:

infercnv_obj = infercnv::run(infercnv_obj,

  •                          cutoff=0.1, # cutoff=1 works well for Smart-seq2, and cutoff=0.1 works well for 10x Genomics
    
  •                          out_dir=tempfile(), 
    
  •                          cluster_by_groups=TRUE, 
    
  •                          denoise=TRUE,
    
  •                          HMM=TRUE,
    
  •                          resume_mode = FALSE)
    

INFO [2020-12-09 11:38:53] ::process_data:Start
INFO [2020-12-09 11:38:53] Creating output path /var/folders/sq/fdhpv_c14b514x7q1ygn2mgc0000gp/T//RtmpBLfKfH/file451d3b86438b
INFO [2020-12-09 11:38:53]

STEP 1: incoming data

INFO [2020-12-09 11:41:02]

STEP 02: Removing lowly expressed genes

INFO [2020-12-09 11:41:02] ::above_min_mean_expr_cutoff:Start
INFO [2020-12-09 11:41:07] Removing 8916 genes from matrix as below mean expr threshold: 0.1
INFO [2020-12-09 11:41:13] validating infercnv_obj
INFO [2020-12-09 11:41:13] There are 9352 genes and 43972 cells remaining in the expr matrix.
INFO [2020-12-09 11:42:06] no genes removed due to min cells/gene filter
INFO [2020-12-09 11:44:23]

STEP 03: normalization by sequencing depth

INFO [2020-12-09 11:44:23] normalizing counts matrix by depth
INFO [2020-12-09 11:45:37] Computed total sum normalization factor as median libsize: 3570.000000
INFO [2020-12-09 11:45:38] Adding h-spike
INFO [2020-12-09 11:45:38] -hspike modeling of Epithelial_C5
Error in base::rowMeans(x, na.rm = na.rm, dims = dims, ...) :
'x' must be an array of at least two dimensions

@corticaltone
Copy link
Author

In case this is helpful:

sessionInfo()
R version 4.0.3 (2020-10-10)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Big Sur 10.16

InferCNV version 1.4.0

@Momomocheng
Copy link

In annotations_file of CreateInfercnvObject() ,you'd better make each label in annotations_file has at least two cells.
when reRun the infercnv::run method, delete those files generated last time.
That works for me.

@qins
Copy link

qins commented Jul 13, 2021

Try to remove this line:
"HMM=TRUE"

@GeorgescuC
Copy link
Collaborator

Hi ,

Annotation groups are indeed expected to have more than 1 cell as it does not make sense to have a unique cell of a given type sequenced when taking into account the level of noise present in single cell data.

Regards,
Christophe.

@mailmrcai
Copy link

In annotations_file of CreateInfercnvObject() ,you'd better make each label in annotations_file has at least two cells. when reRun the infercnv::run method, delete those files generated last time. That works for me.

this works for me

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

5 participants