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
First of all, thanks for creating this amazing package.
I have one question. It seems that running Azimuth overrides my previous preprocessing results (such as SCTransform) and alters my gene expression matrix, and I want to understand what's going on under the hood of the RunAzimuth() function. For instance, when I check the maximum value of percent mitochondrial RNA (max(df[['percent.mt']])) before and after running Azimuth, the value always seems to increase after. My understanding is that RunAzimuth() uses the original RNA counts (the 'RNA' layer in my Seurat object) and runs SCTransform internally, but does it attach a new 'SCT' layer on my Seurat object, which would potentially override my previous 'SCT' layer?
Here is my typical analysis workflow (simplified), with the intention to use Azimuth soley for the cell annotation purposes:
df <- subset(df, subset = nFeature_RNA > 200 & nFeature_RNA < 2500 & percent.mt < 7) # Here, I filter the cells and set the "maximum" allowed percent.mt as 7.
max(df[['percent.mt]]) # I check the maximum mito % value right before running Azimuth, making sure they are less than 7.
6.995033
df <- RunAzimuth(df, reference = 'bonemarrowref')
max(df[['percent.mt]]) # The maximum mito % becomes larger after RunAzimuth(), even larger than what the object 'df' has been filtered previously
8.015861
What's going on here? Thanks in advance.
The text was updated successfully, but these errors were encountered:
yi6kim
changed the title
Does Azimuth overrides previous preprocessing (percent.mt differs after running Azimuth)
Does Azimuth override previous preprocessing results (percent.mt differs after running Azimuth)
Nov 16, 2024
yi6kim
changed the title
Does Azimuth override previous preprocessing results (percent.mt differs after running Azimuth)
Does Azimuth override w/ my previous preprocessing results (percent.mt differs after running Azimuth)
Nov 16, 2024
Hi,
First of all, thanks for creating this amazing package.
I have one question. It seems that running Azimuth overrides my previous preprocessing results (such as SCTransform) and alters my gene expression matrix, and I want to understand what's going on under the hood of the RunAzimuth() function. For instance, when I check the maximum value of percent mitochondrial RNA (max(df[['percent.mt']])) before and after running Azimuth, the value always seems to increase after. My understanding is that RunAzimuth() uses the original RNA counts (the 'RNA' layer in my Seurat object) and runs SCTransform internally, but does it attach a new 'SCT' layer on my Seurat object, which would potentially override my previous 'SCT' layer?
Here is my typical analysis workflow (simplified), with the intention to use Azimuth soley for the cell annotation purposes:
df <- Read10X_h5('my_sample.h5')
df <- CreateSeuratObject(counts = df,
min.cells = 3,
min.features = 200
)
df <- subset(df, subset = nFeature_RNA > 200 & nFeature_RNA < 2500 & percent.mt < 7) # Here, I filter the cells and set the "maximum" allowed percent.mt as 7.
df <- SCTransform(df, verbose = FALSE) # alternative to NormalizeData, FindVariableFeatures, ScaleData
df <- RunPCA(df)
df <- FindNeighbors(df, dims=1:20)
df <- FindClusters(df, algorithm= 1, resolution = 0.4)
df <- RunUMAP(df, dims=1:20)
max(df[['percent.mt]]) # I check the maximum mito % value right before running Azimuth, making sure they are less than 7.
df <- RunAzimuth(df, reference = 'bonemarrowref')
max(df[['percent.mt]]) # The maximum mito % becomes larger after RunAzimuth(), even larger than what the object 'df' has been filtered previously
What's going on here? Thanks in advance.
The text was updated successfully, but these errors were encountered: