MarioniLab / scran

Clone of the Bioconductor repository for the scran package.
https://bioconductor.org/packages/devel/bioc/html/scran.html
40 stars 22 forks source link

fastMNN compute.variances #31

Closed johnmous closed 5 years ago

johnmous commented 5 years ago

In the fastMNN function description I read:

If compute.variances=TRUE, the function will compute the percentage of variance that is parallel to the average correction vectors at each merge step.

As I understand it, for n batches I should get n-1 percentages as there are n-1 merge steps. For example, for 2 batches there is a single merge step and I should get 1 percentage. What I get from the function though is n percentages, that is 2 percentages in the case of 2 batches.

Will you please explain this?

LTLA commented 5 years ago

It's the percentage of variance that is lost from each batch across all merge steps, so you'll get one value per batch. Admittedly, the documentation could be clearer about this. I guess I could also compute the percentage of variance lost at each batch at each merge step, but no one's needed that level of detail yet.

FYI, the MNN functions are to be moved to a new package that should be available in the next Bioconductor release, so the documentation updates will take place there.

johnmous commented 5 years ago

Thanks a lot for the informative and quick reply