trueDiversity returns a list containing diversity indices.
plotTrueDiversity gives an overview about the richness or diversity of sequences with the same length.trueDiversity(sequences = NULL, aaDistribution.tab = NULL, order = c(0,1,2))
plotTrueDiversity(trueDiversity.tab=NULL,color="black", PDF=NULL,...)AADistribution() (see Details)trueDiversity()AADistribution() as input. In first case AADistribution() is first applied to data set. Richness or diversity is calculated for sequences of the same length, for each position. Analysis of true diversity of order 0, 1 and 2 is possible.
Order 0: Richness (in this case it represents number of different amino acids per position).
Order 1: Exponential function of Shannon entropy using the natural logarithm as the base (weights all amino acids by their frequency).
Order 2: Inverse Simpson entropy (weights all amino acids by their frequency, but weights are given more to abundant amino acids).
These indices are very similar (Hill, 1973). For example the exponential function of Shannon index is linearly related to inverse Simpson.
plotTrueDiversity returns an image with diversity plots for each length. Each plot contains the richness or diversity (y-axis) for each position (x-axis).
The PDF character string should be only the project name (without ".pdf"). A figure called "PDF"_True-diversity_q"order".pdf will be saved to your working directory.aaDistribution, trueDiversity, diversitydata(aaseqtab)
trueDiv<-trueDiversity(sequences = aaseqtab$CDR3_IMGT, order = 1)
plotTrueDiversity(trueDiversity.tab=trueDiv,color="red")Run the code above in your browser using DataLab