Problem running on R
guillermoturiel opened this issue · 6 comments
Good afternoon,
I am trying to run toomanycells on R but I get the following error:
Error in read.table(file = file, header = header, sep = sep, quote = quote, :
no lines available in input
I get this error while trying to run it with the example provided in the reference manual in R package so it should not be a file format problem.
This is what I tried to run:
input <- system.file("extdata", "mat.csv", package="TooManyCellsR")
inputLabels <- system.file("extdata", "labels.csv", package="TooManyCellsR")
df = read.csv(input, row.names = 1, header = TRUE)
mat = Matrix::Matrix(as.matrix(df), sparse = TRUE)
labelsDf = read.csv(inputLabels, header = TRUE)
tooManyCells(mat, args = c("make-tree"), labels = NULL,
output = "out", prior = NULL, docker = NULL, mounts = c())
Those commands demonstrate an example use case with mat.csv
and labels.csv
files. You probably do not have those files, so nothing is being read into R.
I have the files and I get this
mat
6 x 6 sparse Matrix of class "dgCMatrix"
cell1 cell2 cell3 cell4 cell5 cell6
feature1 1 3 2 . . 8
feature2 8 6 6 . . 10
feature3 . . . 10 8 .
feature4 . . . 4 5 .
feature5 . . . 4 7 .
feature6 8 7 8 . . 13
labelsDf
item label
1 cell1 a
2 cell2 a
3 cell3 a
4 cell4 b
5 cell5 b
6 cell6 b
But when running the function I get the error that I said in the first message
How did you install TooManyCells? Docker or from source?
I installed it as any other R package using:
install.packages("devtools")
library(devtools)
install_github("GregorySchwartz/tooManyCellsR")
I also installed the other packages that tooManyCells uses:
cowplot
ggplot2
edgeR
jsonlite
Did you install the TooManyCells program (https://gregoryschwartz.github.io/too-many-cells/)?
Did installing the command line program work?