Entering edit mode

3.2 years ago

Lucy
▴
140

Hi,

I would like to calculate the Gini coefficient for my TCR repertoire data. I have seen that this can be calculated using the DescTools and ineq packages in R, however from the package documentation, I am unclear what input is required in the context of TCR repertoire data.

Is anyone able to help with this?

Best wishes,

Lucy

Hi Kevin,

Thank you - yes I have paired scTCR-seq data and I would like to compare the clonality of the alpha vs. beta chain.

Best wishes,

Lucy

I see. The function in

DescToolsappears to just literally accept, at minimal, a vector of values, like`c(45,33,67, ..., 45)`

. I suppose that, technically, a Gini coefficient can be calculated from this, where each number represents usage (normalised read count?) of a particular clonotype.Based on this vignette (https://www.statology.org/gini-coefficient-in-r/), I think the required input would be the clonotype assignment for each cell rather than the abundances.