cole-trapnell-lab / monocle-release

280 stars 116 forks source link

Error in reduceDimension @ monocle 3 alpha #202

Open gungne opened 6 years ago

gungne commented 6 years ago

R command line:

my_cds_subset <- reduceDimension(my_cds_subset,reduction_method = 'DDRTree',auto_param_selection= FALSE, verbose=TRUE) Retrieving normalized data ... DDRTree will be eventually deprecated in reduceDimension call and be used in RGE function instead. We are calling RGE for you now. the condition has length > 1 and only the first element will be usedError in rownames<-(x, value) : attempt to set 'rownames' on an object with no dimensions

Traceback:

Error in rownames<-(x, value) : attempt to set 'rownames' on an object with no dimensions

  1. stop("attempt to set 'rownames' on an object with no dimensions")
  2. rownames<-(x, value)
  3. row.names<-.default(*tmp*, value = colnames(cds))
  4. row.names<-(*tmp*, value = colnames(cds))
  5. learnGraph(cds, RGE_method = "DDRTree", ...)
  6. reduceDimension(my_cds_subset, reduction_method = "DDRTree", auto_param_selection = FALSE, verbose = TRUE)

Background: It's imported cellranger matrix with one column of cell stage annotation in phenodata. It went through addition filter by gene expresssion: my_cds_filter <- my_cds[,exprs(my_cds)["ENSDARG00000038852",]>1] Everything else is pretty much the workflow on the Tutorial 1 on http://cole-trapnell-lab.github.io/monocle-release/monocle3/

Some thoughts: I have encounter similar error before. When you are section only one column(barcodes) from a dataframe(which the rowname is also the barcodes), it will some how become a character list. I am thinking if it's the same issue...

gungne commented 6 years ago

reduceDimension with UMAP worked fine for me. So I assume it's just the RGE/Learngraph error.

agranado commented 5 years ago

I get the same error when running learnGraph()

learnGraph(cds,rge_method = 'DDRTree') traceback() 4: stop("attempt to set 'colnames' on an object with less than two dimensions") 3: colnames<-(*tmp*, value = colnames(X_subset)) 2: multi_component_RGE(cds, scale = scale, rge_method = rge_method, partition_group = partition_group, irlba_pca_res = irlba_pca_res, max_components = max_components, extra_arguments = extra_arguments, close_loop = close_loop, euclidean_distance_ratio = euclidean_distance_ratio, geodestic_distance_ratio = geodestic_distance_ratio, prune_graph = prune_graph, minimal_branch_len = minimal_branch_len, verbose = verbose) 1: learnGraph(cds, rge_method = "DDRTree")

Seesion Info : [1] monocle_2.99.3 L1Graph_0.1.1 lpSolveAPI_5.5.2.0-17 [4] DDRTree_0.1.5 irlba_2.3.3 igraph_1.2.4
[7] ggplot2_3.1.0 Biobase_2.42.0 DelayedArray_0.8.0
[10] BiocParallel_1.16.6 IRanges_2.16.0 S4Vectors_0.20.1
[13] BiocGenerics_0.28.0 matrixStats_0.54.0 Matrix_1.2-15