mojaveazure / loomR

An R-based interface for loom files
63 stars 16 forks source link

subsetting loom file #80

Open menage95 opened 1 year ago

menage95 commented 1 year ago

Hello,

I have connected to a loom file and would like to extract the matrix counts with gene names for 2 different column attributes. I can do it with one column attribute but ideally need both plus gene names. Below is what I have so far:

lfile <- connect(filename = "file.loom", mode = "r+", skip.validate = TRUE)
data<- lfile[["matrix"]][lfile$col.attrs$Tissue[] == "Midbrain",  ] 

Any help would be much appreciated as all the above returns is a large data frame with no cell numbers or gene names.

Thanks