satijalab / azimuth

A Shiny web app for mapping datasets using Seurat v4
https://satijalab.org/azimuth
GNU General Public License v3.0
108 stars 31 forks source link

Results differ between App and local run #160

Open seb951 opened 1 year ago

seb951 commented 1 year ago

Hi,

Thanks for the great tool. I have run different scRNA datasets (human-lung-v2) using the App and then re-running it locally using the Analysis script template supplied in the Download section of the App.

I noticed that with the same dataset (reference data obtained through SeuratData), and with the same QC filter settings, I obtain different results (i.e. mapping.scores or predicted.ann_level_N.scores run through the App and locally and still highly correlated, but definitely different).

Anyone has tested/experienced this ? Any reason why results would be different and which one to trust?

I am using Seurat v4.3.0 & Azimuth v0.4.6.

Thanks a lot.

seb951 commented 1 year ago

Here is a minimal example to illustrate my point. I mean results are pretty similar in this example, but not the same. Any reason why this is or which one to trust?

#setup
packageVersion(pkg = "Seurat")
#[1] ‘4.3.0’
packageVersion(pkg = "Azimuth")
#[1] ‘0.4.6’

SeuratData::InstallData('pbmc3k')
pbmc3k = SeuratData::LoadData('pbmc3k')
SeuratDisk::SaveH5Seurat(pbmc3k,'pbmc3k.h5Seurat')

#run Azimuth locally 
pbmc3k = RunAzimuth(pbmc3k,reference = 'pbmcref')

#Upload pbmc3k.h5Seurat through Shiny App (https://app.azimuth.hubmapconsortium.org/app/human-pbmc) , map cells to reference, then download the azimuth predictions.
azimuth_pred_App <- read.delim('azimuth_pred.tsv', row.names = 1)

#make sure we have the same cells
all.equal(rownames(azimuth_pred_App),rownames(pbmc3k@meta.data))

#plot
plot(pbmc3k@meta.data$mapping.score,azimuth_pred_App$mapping.score)

Rplot