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 have been using singleCellTK to import some CellRanger output into R for downstream analysis with DecontX and Seurat, following this vignette. I am aware that is it possible to either first run decontX on a SingleCellExperiment object and then create the Seurat object, or it is possible to create the Seurat object and then run decontX on the counts slot. I decided to begin with the former as it suited my needs the most.
When importing data using the importCellRanger function, my matrix is read in with Ensembl gene IDs instead of gene symbols. I would like to convert the Ensemble gene ID to gene symbols for easier visualisation before I generate my Seurat object. However, after a lot of trial and error I have realised that the setRowNames is interfering with my UMAP clustering.
In the image below, the first row illustrates the effetct of running decontX without renaming the genes. In the second row, I have replaced the GeneIDs with a unique number from 1 to 36,601. I tried to number both before and after applying decontX, without any impact on the data. In the third row, I have applied setRowNames with dedup set to TRUE. However, this notably changes the shape of the data of my UMAP plot. What could be a possible cause for this?
I am including my code at the bottom of this post, if it should interest anybody.
# Set start time
start.time <- Sys.time()
# Import the filtered matrix using singleCellTK
filtered_matrix <- importCellRanger(sampleDirs = "../Raw Files/2023 Sequencing/PDX2 #5 (Bone Marrow, CH)/",
dataType = "filtered")#
# Import the raw matrix using singleCellTK
raw_matrix <- importCellRanger(sampleDirs = "../Raw Files/2023 Sequencing/PDX2 #5 (Bone Marrow, CH)/",
dataType = "raw")
# View cell names
head(rownames(filtered_matrix))
I have been using singleCellTK to import some CellRanger output into R for downstream analysis with DecontX and Seurat, following this vignette. I am aware that is it possible to either first run
decontX
on aSingleCellExperiment
object and then create the Seurat object, or it is possible to create the Seurat object and then rundecontX
on the counts slot. I decided to begin with the former as it suited my needs the most.When importing data using the
importCellRanger
function, my matrix is read in with Ensembl gene IDs instead of gene symbols. I would like to convert the Ensemble gene ID to gene symbols for easier visualisation before I generate my Seurat object. However, after a lot of trial and error I have realised that thesetRowNames
is interfering with my UMAP clustering.In the image below, the first row illustrates the effetct of running
decontX
without renaming the genes. In the second row, I have replaced the GeneIDs with a unique number from 1 to 36,601. I tried to number both before and after applyingdecontX
, without any impact on the data. In the third row, I have appliedsetRowNames
withdedup
set toTRUE
. However, this notably changes the shape of the data of my UMAP plot. What could be a possible cause for this?I am including my code at the bottom of this post, if it should interest anybody.
The text was updated successfully, but these errors were encountered: