ncborcherding / scRepertoire

A toolkit for single-cell immune profiling
https://www.borch.dev/uploads/screpertoire/
MIT License
297 stars 48 forks source link

"clonalHomeostasis" and "clonalProportion" #254

Closed saramoein372 closed 12 months ago

saramoein372 commented 12 months ago

Good morning,

Would you please provide some details about how two functions "clonalHomeostasis" and "clonalProportion" per sample and per seurat clusters, are working?

Thanks!

ncborcherding commented 12 months ago

Hey saramoein372,

Both are visualizations of the space occupied by specifc categories within the repertoire. Per sample or per cluster is really just organizing the definition of repertoire (changing the denominator) - for sample, you are looking across the TCR sequences recovered by sample and for cluster you are looking across the TCR sequences that are recovered within the indicated cluster.

In terms of the functions themselves - clonalHomeostasis() shows the relative repertoire space per cluster occupied clones at specific levels of expansion. clonalProportion() shows the relative repertoire space per cluster occupied by clones ordered from largest (1) to smallest (n).

Hope that helps and let me know if you have any other questions.

Nick

saramoein372 commented 12 months ago

Thanks Nick.

saramoein372 commented 12 months ago

Nick, Would you please provide some details about the clonal_diversity plot and the index scores? How we should interpret this plot per each of the measures (shannon,...)?

ncborcherding commented 12 months ago

Hey saramoein372,

I think the first major consideration for the diversity plots is the default setting is for bootstrapping - meaning the function will take the lowest number of TCRs across all sample/group, then sample that number across all samples iteratively, and then calculate the diversity.

The diversity metrics themselves are an evolution of information theory and ecology - you can read more on this wiki. scRepertoire calculates diversity through the vegan R package. Each of the metrics have some underlying assumptions.

Nick

saramoein372 commented 12 months ago

Thanks Nick! One more question if you don't mind:

That Clone Network plot looks very interesting! Can I ask how the directions of arrows are determined?

Best, Sara

On Fri, Jul 28, 2023 at 6:06 AM theHumanBorch @.***> wrote:

Hey saramoein372,

I think the first major consideration for the diversity plots is the default setting is for bootstrapping - meaning the function will take the lowest number of TCRs across all sample/group, then sample that number across all samples iteratively, and then calculate the diversity.

The diversity metrics themselves are an evolution of information theory and ecology - you can read more on this wiki https://en.wikipedia.org/wiki/Diversity_index. scRepertoire calculates diversity through the vegan https://github.com/vegandevs/vegan R package. Each of the metrics have some underlying assumptions.

Nick

— Reply to this email directly, view it on GitHub https://github.com/ncborcherding/scRepertoire/issues/254#issuecomment-1655428228, or unsubscribe https://github.com/notifications/unsubscribe-auth/AVVJONVCAFIZSVP7OXDFVZ3XSOFK3ANCNFSM6AAAAAA22CDQTQ . You are receiving this because you authored the thread.Message ID: @.***>

ncborcherding commented 11 months ago

As a default the clonal network will show both arrow directions - where the arrow originated is the numerator and denominator is the original cluster plus the end cluster (in terms of TCR space).

Nick