GregorySchwartz / tooManyCellsR

An R wrapper for too-many-cells, for clustering single cells and analyzing cell clade relationships with colorful visualizations.
GNU General Public License v3.0
25 stars 4 forks source link

Issue running tooManyCells #1

Closed mads100tist closed 2 years ago

mads100tist commented 4 years ago

Hi!

I've been trying to run tooManyCells with R and all is good (it created the temporary folder, it creates the tsv and mtx files, etc) up to the point after running this line:

res = tooManyCells(mat, args = c("make-tree"))

when I get this error:

sh: too-many-cells: command not found Error in system2("too-many-cells", args = c(args, autoArgs), stdout = TRUE) : error in running command

I've been trying to troubleshoot it, but I am fairly new to programming. However, is it possible that 'too-many-cells' is the name corresponding to a function that was not originally for R and stayed as such in the code? Or that it needs to be defined in the code but for some reason it was not?

I'm mentioning this because lower in the code there's a similar line:

         _system2("docker", args = c(dockerArgs, args, autoArgs), stdout = TRUE)_

but in that case 'docker' is mentioned beforehand when the 'tooManyCells' function is first mentioned (e.g

tooManyCells = function( mat , args = c("make-tree") , labels = NULL , output = "out" , prior = NULL , docker = NULL , mounts = c() ) {

Thanks a lot for your help! I can't wait to use it.

GregorySchwartz commented 4 years ago

Did you install too-many-cells? If you want the docker, check out https://github.com/GregorySchwartz/too-many-cells for information on how to obtain it, then use the docker argument to specify which version of the docker to use.

mcfefa commented 4 years ago

I got the same issue. Do you need to install it in both R and Docker to use it in R?

mcfefa commented 4 years ago

So after installing with Docker (I think) and having already installed and loaded the R package, I tried again and got this error:

sh: too-many-cells: command not found
Error in system2("too-many-cells", args = c(args, autoArgs), stdout = TRUE) : 
  error in running command
In addition: Warning message:
In dir.create(output, recursive = TRUE) : 'out' already exists

However, it runs for several seconds before producing the error.

GregorySchwartz commented 4 years ago

@mcfefa You do need both (as the R program is a convenience wrapper around the program), although I don't know if this is the issue @mads100tist is running into, as there would have been a "system2" error with the command "too-many-cells" not being found.

GregorySchwartz commented 4 years ago

@mcfefa You need to specify the docker argument if you installed using docker.

mcfefa commented 4 years ago

@GregorySchwartz how/what do I need to specify in the docker argument? do I just specify this path: docker.io/gregoryschwartz/too-many-cells:0.2.2.0?

GregorySchwartz commented 4 years ago

@mcfefa The argument would be the image REPOSITORY:TAG in your docker image ls command.

mcfefa commented 4 years ago

@GregorySchwartz, so that seemed to help. I ran res <- tooManyCells(ctMtx, args=c("make-tree","--smart-cutoff","4","--min-size","1"),docker="gregoryschwartz/too-many-cells:0.2.2.0") but it still threw an error, but a different one this time:

docker: Error response from daemon: Mounts denied: 
The path /var/folders/y0/z7g7yf1x683637d6jv8mpqs00000gq/T/RtmpBkQqcu
is not shared from OS X and is not known to Docker.
You can configure shared paths from Docker -> Preferences... -> File Sharing.
See https://docs.docker.com/docker-for-mac/osxfs/#namespaces for more info.
.
time="2020-03-09T16:12:36-04:00" level=error msg="error waiting for container: context canceled"
Error in read.table(file = file, header = header, sep = sep, quote = quote,  : 
  no lines available in input
In addition: Warning message:
In system2("docker", args = c(dockerArgs, args, autoArgs), stdout = TRUE) :
  running command ''docker' run -i --rm -v /var/folders/y0/z7g7yf1x683637d6jv8mpqs00000gq/T//RtmpBkQqcu:/var/folders/y0/z7g7yf1x683637d6jv8mpqs00000gq/T//RtmpBkQqcu -v /Users/mcfefa/Dropbox/scRNAseq/too-many-cells/out:/Users/mcfefa/Dropbox/scRNAseq/too-many-cells/out gregoryschwartz/too-many-cells:0.2.2.0 make-tree --smart-cutoff 4 --min-size 1 --matrix-path /var/folders/y0/z7g7yf1x683637d6jv8mpqs00000gq/T//RtmpBkQqcu --output /Users/mcfefa/Dropbox/scRNAseq/too-many-cells/out' had status 125

It also appeared to create a folder name "out," but nothing is in that folder. Any advice on how to fix this?

mads100tist commented 4 years ago

Did you install too-many-cells? If you want the docker, check out https://github.com/GregorySchwartz/too-many-cells for information on how to obtain it, then use the docker argument to specify which version of the docker to use.

I tried to install the 'too-many-cells' following the steps in your page, but I'm not very familiar with the exact syntax required to update all the dependencies (I have a list, but I don't know what to do with it). I'll keep you updated. Thanks.

GregorySchwartz commented 4 years ago

@mads100tist Do you want the docker or do you want to compile from scratch?

GregorySchwartz commented 4 years ago

@mcfefa This looks like an issue with docker, like a permission issue. Did you configure the shared paths as it says in the error? I don't use MacOS so I'm not sure how to go about this.