class jade.nnk.NNKEnrichments.NNKEnrichments(data_dir, zeros=-2.0, class_type='VRC01', antibody='glCHA31', antigen='GT81', sort='S1')[source]

Bases: object

Simple class that holds all the enrichment data for a particular class, antibody, and antigen.

calculate_factors()[source]

Return a dataframe of calculated factors

Factor is Sergeys definition:

(P-M)/MAD = scaling factor; where
P - total propensity for amino acid at this position, M - mean total propensity for all amino acids at this position MAD - mean average deviation for propensities at this position.
Return type:pandas.DataFrame
max(position)[source]

Get the maximum enrichment at a particular position, and the amino acid

Parameters:position
Returns:
mean(position)[source]
min(position)[source]

Get the minimum enrichment at a particular position, and the amino acid

Note: There may be multiple minumum amino acids - this is not yet accounted for!

Parameters:position
Returns:
value(position, three_letter_code)[source]

Get the enrichment value of a particular position and code.

Parameters:
  • position
  • three_letter_code
Returns:

jade.nnk.NNKEnrichments.combine_enrichments(list_of_nnk_enrichments, additive_combine=False)[source]

Combine a list of nnk_enrichments to populate this one. @type list_of_nnk_enrichments: [NNKEnrichments] :rtype: NNKEnrichments