Filter loom file using cell ids in R using seurat.disk or with loompy in python
Trying to filter loom file in R.
I have done analysis with seurat and trying to add another layer with velocity analysis scvelo (python). I could probably also do it in python with loompy library.
From what I saw, the velocity analysis start from the 10x directory but I have already filtered seurat object and save it in an rds file. I ha ve a list of ids in a csv files. I want only use these cells for the analysis of velocity.
I’m using ReadVelocity to read the loom file and then convert to seurat but then I’m trying to subset the object .
I’m trying to keep only the cells I previously kept after cleaning by mito and ribo thresholds in seurat saving into rds and exported in csv file…
But loom file come into the game and it’s not fun.
Any help would be welcome. Thanks.
ldat <- ReadVelocity(file = "data.loom") bm <- as.Seurat(x = ldat) ids <- read.csv(file="daata_cellID_obs.csv", header = TRUE) bm[["RNA"]] <- bm[["spliced"]] dim(ids) colnames(ids) <- "cells" dim(bm) bm <- subset(object = bm, cells = ids$cells)
It says “argument x is missing with no default value.”
 11178 1  33694 12011 Error in UpdateSlots(object = x) :
l’argument “x” est manquant, avec aucune valeur par défaut Calls:
subset … subset.Seurat -> UpdateSlots -> sapply -> lapply ->
slotNames -> is Exécution arrêtée
• 21 views
Read more here: Source link