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

Maximum Number of Batches? #134

Closed ramziabb closed 2 years ago

ramziabb commented 2 years ago

Hello,

I am wondering if the creators have optimized this batch correct for increasing numbers of batches.

Let's say I have 6-8 batches. All batches have a single sample in common. Should I just pump everything into Spectre Normalize in one go with the 6 batches appropriately labeled? This works and I have done it. Or, should I do them some other way - for example pairwise in a bracket manner: Like Batch 1 and 2 normalize to batch 1/2, which then sequentially gets paired with batch 3/4, etc etc.

tomashhurst commented 2 years ago

Hi @ramziabb,

You can go right ahead and run the batch alignment for all the batches at once. By default the alignment will aim for a kind of 'average' point between all 8 batches for the conversion targets, but you also have the option of electing one of the batches as the target (i.e. so batch 2-8 would be aligned to batch 1, and batch 1 would be unchanged etc).

Any issues getting it to run, let us know!

Tom

ramziabb commented 2 years ago

Thanks Tom.

In the latter case, of specifying a single "target" - would you get the same result if you ran a large batch or two sequential batches?

So if I set Batch 1 as the target, would the following give the same final results:

  1. Run all three at once.
  2. Run 1and 2 then run 1 and 3. If I understand correctly, the answer is yes - batch 1 fcs files would all be unchanged, and fcs files from batches 2 and 3 would be the same if you ran it all at once or in two batches.
tomashhurst commented 1 year ago

@ramziabb yes exactly!