feiyoung / PRECAST

an efficient data integration method for multiple spatial transcriptomics data with non- cluster-relevant effects such as the complex batch effects.
GNU General Public License v3.0
9 stars 3 forks source link

How to setup with multiple samples per condition #11

Open ChangqingW opened 1 year ago

ChangqingW commented 1 year ago

We have multiple treatment group and multiple samples per treatment group. I was wondering how we should organise the seuList for CreatePRECASTObject. Do we merge the samples by treatment group and have one Seurat object per treatment group? Will the batch effect of spots from the same sample be taken into account if we merge samples?

feiyoung commented 1 year ago

There is no requirement to merge the samples into one Seurat object based on the treatment groups. When utilizing the IntegrateSpaData() function, it is crucial to specify the argument covariates_use and set it to the treatment status. This will ensure proper integration while considering the treatment information for the analysis.

mei-du commented 1 year ago

Hi @feiyoung, I've added the treatment status to each Seurat object's metadata - 4 samples in 1 group, 2 samples in another group. I then followed the tutorial and created the PRECAST object and fitted the data, then integrated all samples. I used "Treatment" with covariates_use but the downstream results appear to be the same as without including covariates. Please advise, thanks!

feiyoung commented 1 year ago

You can verify whether seuInt[['PRE_CAST']]@data is the same for both scenarios.

Ryeeeeeeeeee commented 1 year ago

Hello @feiyoung , I also meet the same problem as @mei-du . However I achieved group comparisons by matching seuInt with the input sample barcode. But I wonder if adding groups via the covariates_use function will have a large impact on the results.

feiyoung commented 1 year ago

In our paper, the analyzed datasets were not from the case-control design, i.e., no treatment group and control group, so we do not explore this impact. However, we do advocate for the incorporation of group information during the integration process, achieved by including the 'covariates_use' parameter. Additionally, you can also try two methods, then see the difference.