ImmuneDynamics / Spectre

A computational toolkit in R for the integration, exploration, and analysis of high-dimensional single-cell cytometry and imaging data.
https://immunedynamics.github.io/spectre/
MIT License
56 stars 21 forks source link

Advice for automated cell classification workflow between datasets with different number of parameters #188

Open denvercal1234GitHub opened 4 months ago

denvercal1234GitHub commented 4 months ago

Hi there,

Thanks again for the tool.

I have 1 FCS that was acquired by the Aurora and 1 FCS that was acquired by Fortessa with much less number of markers. I aim to use the Aurora dataset to annotate the Fortessa dataset.

All markers in Fortessa are included in the Aurora.

My goal is to see whether a subset of my cells detected in the Aurora can be mapped onto any of the cells in the Fortessa data.

Q1. Should I first remove markers that are not present in the Fortessa for this workflow (https://immunedynamics.io/spectre/Automated-classification.html)?

Q2. If the Aurora was analysed by Catalyst and not Spectre, is it advisable to reanalyse the Aurora first with Spectre, or perhaps, convert the output somehow?

Thank you.

ghar1821 commented 4 months ago

Q1: Yes I would remove markers that are not present in the Fortessa. The markers have to exist in both datasets for the classification to work.

Q2: I don't think it matters what tools you used to analyse the Aurora data. Just convert the SCE object into a data.table (https://immunedynamics.io/spectre/tutorials/datatable_interoperability/sce_support.html) object, and run the workflow.

Before you run the classification workflow, please integrate ("batch correct") the Fortessa and the Aurora datasets first as these are acquired by different instruments and will most likely have batch effect on them. You can use Harmony to do the alignment (https://github.com/ImmuneDynamics/Spectre/blob/master/R/run.harmony.R).

tomashhurst commented 3 months ago

@denvercal1234GitHub you might like to use run.rpca instead -- Harmony will integrated the data in a new embedding, but not correct the expression values, whereas rPCA will. Have a look at the workflow in the v1.2 beta: https://github.com/ImmuneDynamics/Spectre/tree/v1.2.0-beta/workflows/Spectre%20rPCA.

denvercal1234GitHub commented 1 month ago

Thank you @ghar1821 and @tomashhurst !

I really like the batch correction workflow tutorial you have here at https://immunedynamics.io/spectre/cytonorm/. So, you think the https://github.com/ImmuneDynamics/Spectre/tree/v1.2.0-beta/workflows/Spectre%20rPCA is better integration approach as it directly correct the expression values? Is there a tutorial written up for it?

Also, it would be very helpful to have more tools to identify which marker contributing to a batch and whether a batch correction is needed?

Thank you again so much for your support and the tool!

ghar1821 commented 1 month ago

We will be making a big update to Spectre soon that will include some more tutorial on batch correction. So stay tuned!

denvercal1234GitHub commented 1 month ago

Thank you @ghar1821 ! While we are on the topic, as mentioned above, the current batch alignment workflow employing CytoNorm is great. I wonder if you guys could also consider adding in ability to interface with cyCombine package for batch alignment (https://github.com/biosurf/cyCombine)? There will always be newer package for tasks but I thought a lot of folks would find it very useful to have Spectre adaptable to allow usage of different tools as they come? Thank you again.

ghar1821 commented 1 month ago

There will be functions to run cycombine and other batch alignment tools in the new update ;)