dgrun / StemID

Algorithm for the inference of cell types and lineage trees from single-cell RNA-seq data.
39 stars 19 forks source link

projcells command error #1

Closed blin100 closed 7 years ago

blin100 commented 7 years ago

Hi, apologies if this might be a naive mistake I'm running into, however, when I run the command projcells(ltr) I get the error Error in .local(x, ...) : arguments must have same length This occurs with the sample data, as well as my own dataset. Traceback shows:

6.
stop("arguments must have same length") 
5.
.local(x, ...) 
4.
aggregate(pdil, by = list(lp), median) 
3.
aggregate(pdil, by = list(lp), median) at RaceID2_StemID_class.R#890
2.
projcells(ltr) at RaceID2_StemID_class.R#868
1.
projcells(ltr) 

Traceback highlights:

  nrx <- NROW(x)
  if (any(lengths(by) != nrx)) 
    **stop("arguments must have same length")**
  y <- as.data.frame(by, stringsAsFactors = FALSE)
  keep <- complete.cases(by)
  y <- y[keep, , drop = FALSE]
  x <- x[keep, , drop = FALSE]

To be completely honest, I have no idea what this means, being a novice at R and programming in general. Please let me know if I can provide any additional information.

My software versions: RStudio Version 1.0.136 R version 3.3.2 (2016-10-31) 64bit Win10

Any insight into why this is failing at the beginning of StemID would be much appreciated. Thanks!

dgrun commented 7 years ago

I tried from scratch with R version 3.3.2 after downloading the StemID code from github, but I don't get an error message. The code runs without any error. The message itself seems a bit cryptic to me, so I'm afraid I cannot help here.

tjnitram commented 7 years ago

This might be the issue #2

blin100 commented 7 years ago

I don't know if it was the fix for Lakon's issue, or if it was me clearing out my workspace from earlier raceID1 runs, but now it's works perfectly fine. Thanks for your timely help!