Velocyto.R
I'm not sure that your issues is from RStudio cloud but more about how you are trying to open the file. The file that you are trying to import is not a velocyto
file but a .loom
file that can be open using the velocyto.R
package.
I'm not very familiar with this kind of of .loom
file but on the velocyto.R
tutorial, it is specified to do the following:
library(velocyto.R)
ldat <- read.loom.matrices("SCG71.loom")
And you have the following file structures:
> str(ldat)
List of 3
$ spliced :Formal class 'dgCMatrix' [package "Matrix"] with 6 slots
.. ..@ i : int [1:2822201] 74 130 178 192 202 223 225 258 353 418 ...
.. ..@ p : int [1:6668] 0 464 786 1469 2502 3290 3760 4974 5388 5659 ...
.. ..@ Dim : int [1:2] 24421 6667
.. ..@ Dimnames:List of 2
.. .. ..$ : chr [1:24421] "Xkr4" "Rp1" "Sox17" "Mrpl15" ...
.. .. ..$ : chr [1:6667] "SCG71:AAACGATCCTACTTGT" "SCG71:AAACACTACGTAGAAG" "SCG71:AAACACGGCATCGCAG" "SCG71:AAACAAACAGCAGAAC" ...
.. ..@ x : num [1:2822201] 1 1 1 1 1 1 1 1 1 4 ...
.. ..@ factors : list()
$ unspliced:Formal class 'dgCMatrix' [package "Matrix"] with 6 slots
.. ..@ i : int [1:528048] 61 100 339 352 377 445 465 528 617 758 ...
.. ..@ p : int [1:6668] 0 115 188 283 431 580 696 994 1127 1232 ...
.. ..@ Dim : int [1:2] 24421 6667
.. ..@ Dimnames:List of 2
.. .. ..$ : chr [1:24421] "Xkr4" "Rp1" "Sox17" "Mrpl15" ...
.. .. ..$ : chr [1:6667] "SCG71:AAACGATCCTACTTGT" "SCG71:AAACACTACGTAGAAG" "SCG71:AAACACGGCATCGCAG" "SCG71:AAACAAACAGCAGAAC" ...
.. ..@ x : num [1:528048] 1 3 1 1 1 1 1 1 1 1 ...
.. ..@ factors : list()
$ ambiguous:Formal class 'dgCMatrix' [package "Matrix"] with 6 slots
.. ..@ i : int [1:47846] 11915 13649 13830 15638 18068 19585 23490 24345 8142 8767 ...
.. ..@ p : int [1:6668] 0 8 13 25 42 56 64 87 97 100 ...
.. ..@ Dim : int [1:2] 24421 6667
.. ..@ Dimnames:List of 2
.. .. ..$ : chr [1:24421] "Xkr4" "Rp1" "Sox17" "Mrpl15" ...
.. .. ..$ : chr [1:6667] "SCG71:AAACGATCCTACTTGT" "SCG71:AAACACTACGTAGAAG" "SCG71:AAACACGGCATCGCAG" "SCG71:AAACAAACAGCAGAAC" ...
.. ..@ x : num [1:47846] 2 1 1 1 1 2 1 2 1 1 ...
.. ..@ factors : list()
Alternative 1 - LoomExperiment
On bioconductor, you can also find LoomExperiment
. On my computer, once I get it install, I was able to load your SCG71.loom
file using:
library(LoomExperiment)
scle <- import("SCG71.loom",type = "LoomExperiment", rownames_attr = NULL, colnames_attr = NULL)
Then, you can find the output here:
> head(scle)
class: LoomExperiment
dim: 6 6667
metadata(4): chunks creation_date velocyto.__version__ velocyto.logic
assays(4): matrix ambiguous spliced unspliced
rownames: NULL
rowData names(6): Accession Chromosome ... Start Strand
colnames: NULL
colData names(1): CellID
rowGraphs(0): NULL
colGraphs(0): NULL
You can then load some data
> scle$CellID[c(1:5)]
[1] "SCG71:AAACGATCCTACTTGT" "SCG71:AAACACTACGTAGAAG" "SCG71:AAACACGGCATCGCAG"
[4] "SCG71:AAACAAACAGCAGAAC" "SCG71:AAACAAACTTTGGGAG"
After that, I don't know what to do with that but I think your issue of importing a datafile is because you don't have the right package to open it.
Alternative - using LoomR
Alternatively, you can also install the package loomR
and then enter:
library(loomR)
lfile = connect(filename = "SCG71.loom", mode = "r+")
And you get the output:
> lfile
Class: loom
Filename: /***my_directory***/SCG71.loom
Access type: H5F_ACC_RDWR
Attributes: creation_date, chunks, velocyto.__version__, velocyto.logic, version
Listing:
name obj_type dataset.dims dataset.type_class
col_attrs H5I_GROUP <NA> <NA>
col_graphs H5I_GROUP <NA> <NA>
layers H5I_GROUP <NA> <NA>
matrix H5I_DATASET 6667 x 24421 H5T_FLOAT
row_attrs H5I_GROUP <NA> <NA>
row_graphs H5I_GROUP <NA> <NA>
Then, for manipulating these files, you should refer to their tutorial (it's beyond my skills and the scope of your question).
Hope it helps you to figure the solution of your question