PHI-base / PHI5_web_display

PHI5_web_display will allow to display PHI-Canto data
1 stars 0 forks source link

Show allele description in genotype display names #86

Closed jseager7 closed 1 year ago

jseager7 commented 1 year ago

The description property of alleles in the PHI-Canto JSON export is currently not shown in the PHI-base 5 UI. We want this information to be shown, since it captures important information about some allele types.

For example, the following allele on PHIG:337 has no description:

cyp51C-C1325A

In PHI-Canto, this allele appears as follows:

cyp51C-C1325A(aaP419T)

The description is stored in the description property of the allele object, as shown below:

"B8NUK6:92ed9bf55f48e444-12": {
  "allele_type": "amino_acid_mutation",
  "description": "P419T",
  "gene": "Aspergillus flavus B8NUK6",
  "name": "cyp51C-C1325A",
  "primary_identifier": "B8NUK6:92ed9bf55f48e444-12",
  "synonyms": []
},

The complete genotype display name in PHI-base 5 should appear as follows:

cyp51C-C1325A(aaP419T) (amino acid mutation) [Wild type product level]

More generally, the format is:

name(description) (allele_type) [expression]

The allele description should be shown in genotype display names and metagenotype display names: it should be shown in any annotation type that includes an allele with a description.

The description is an optional property. If it is not found, then the genotype display name should be shown without the parentheses for the description, following the existing display logic:

name (allele_type) [expression]

For multi-allele genotypes, each allele name should be followed by its description:

name1(description1) (allele_type) [expression] name2(description2) (allele_type) [expression]

jseager7 commented 1 year ago

The description is now shown for Pathogen Phenotype annotations:

image

And also PHI Phenotypes:

image

Note that the description is not shown in the details popup yet, but that's a separate issue and isn't high priority.