You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am new to differential expression. I am analysing a single cell dataset with three different conditions and ten cell types. I receive the following error as one cell type in one condition does not have any cells. The error seems to be with the edgeR package as I am able to get it to work when I change it to DESeq2 - however, then it overwrites the cell type to everything as 'nonPT epithelia'.
Error in `tbl_at_vars()`:
! Can't subset columns that don't exist.
✖ Column `replicate` doesn't exist.
If I subset that cell type out I then get the error, even though the cell type is in my metadata:
Error in `group_by()`:
! Must group by variables found in `.data`.
✖ Column `cell_type` is not found.
I have tried changing 'compartment' to 'cell_type', however I still receive the error.
# Packages
library(Seurat)
library(Libra)
# Filter to remove low gene counts and doublets
## pre filter to remove doublets
sobj <- subset(sobj, cells = which([email protected]$doublet_scores < 0.6))
dim(sobj)
## There were no nonPT epithelial cells in one condition so I had to remove this
sobj <- subset(sobj, subset = compartment != "nonPT epithelia")
# Extract raw counts and metadata
counts <- sobj@assays$RNA@counts
metadata <- [email protected]
#### LIBRA ####
# store pseudobulk
matrices = to_pseudobulk(input = counts,
meta = metadata,
replicate_col = "cart_patient_id", #as we have multiple samples from the same patient
cell_type_col = "compartment", #the cell type
label_col = "tissue_loc",
min_features = 5
)
saveRDS(matrices, "./psuedobulk.rds")
# Perform differential expression
DE <- run_de(input = counts,
meta = metadata,
replicate_col = "cart_patient_id", #as we have multiple samples from the same patient
cell_type_col = "compartment", #the cell type
label_col = "tissue_loc", # what you want to compare
min_features = 5, #minimum number of counts for inclusion of a feature
de_family = "pseudobulk", # need to do this as we are using single cell data
de_method = "edgeR", # can change this to whatever is needed
de_type = "LRT" # stats method
)
saveRDS(DE, "./differential_expression.rds")
The text was updated successfully, but these errors were encountered:
Error in `tbl_at_vars()`:
! Can't subset columns that don't exist.
✖ Column `replicate` doesn't exist.
如果我将该单元格类型子集化,则会收到错误,即使该单元格类型在我的元数据中也是如此:
Error in `group_by()`:
! Must group by variables found in `.data`.
✖ Column `cell_type` is not found.
我尝试将“compartment”更改为“cell_type”,但我仍然收到错误。
# Packages
library(Seurat)
library(Libra)
# Filter to remove low gene counts and doublets
## pre filter to remove doublets
sobj <- subset(sobj, cells = which([email protected]$doublet_scores < 0.6))
dim(sobj)
## There were no nonPT epithelial cells in one condition so I had to remove this
sobj <- subset(sobj, subset = compartment != "nonPT epithelia")
# Extract raw counts and metadata
counts <- sobj@assays$RNA@counts
metadata <- [email protected]
#### LIBRA ####
# store pseudobulk
matrices = to_pseudobulk(input = counts,
meta = metadata,
replicate_col = "cart_patient_id", #as we have multiple samples from the same patient
cell_type_col = "compartment", #the cell type
label_col = "tissue_loc",
min_features = 5
)
saveRDS(matrices, "./psuedobulk.rds")
# Perform differential expression
DE <- run_de(input = counts,
meta = metadata,
replicate_col = "cart_patient_id", #as we have multiple samples from the same patient
cell_type_col = "compartment", #the cell type
label_col = "tissue_loc", # what you want to compare
min_features = 5, #minimum number of counts for inclusion of a feature
de_family = "pseudobulk", # need to do this as we are using single cell data
de_method = "edgeR", # can change this to whatever is needed
de_type = "LRT" # stats method
)
saveRDS(DE, "./differential_expression.rds")
excuse me, did you solve the error? How? I meet it too.
Hi,
I am new to differential expression. I am analysing a single cell dataset with three different conditions and ten cell types. I receive the following error as one cell type in one condition does not have any cells. The error seems to be with the edgeR package as I am able to get it to work when I change it to DESeq2 - however, then it overwrites the cell type to everything as 'nonPT epithelia'.
If I subset that cell type out I then get the error, even though the cell type is in my metadata:
I have tried changing 'compartment' to 'cell_type', however I still receive the error.
The text was updated successfully, but these errors were encountered: