PHI-base / PHI5_web_display

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

Multi-allele genotypes not displayed on most gene pages #81

Closed jseager7 closed 7 months ago

jseager7 commented 1 year ago

Many genotypes in PHI-base 5 have more than one allele, but the PHI-base 5 UI is only showing one allele for many of these genotypes. Here's an example from PHIG:277:

image

Currently, both metagenotype display names are the same, but this is incorrect: one of these metagenotype display names should have two alleles in the pathogen genotype.

The correct display names would appear as follows:

Here is how the genotypes appear in the JSON export:

// single allele
"f41d30e250b8f9b0-genotype-42": {
  "background": "Citrine tag",
  "comment": "construct lacks SP and RXLR",
  "loci": [
    [
      {
        "expression": "Not assayed",
        "id": "M4B6G6:f41d30e250b8f9b0-48"
      }
    ]
  ],
  "organism_strain": "Emoy2",
  "organism_taxonid": 272952
},
// multiple alleles
"f41d30e250b8f9b0-genotype-44": {
  "background": "Citrine tag",
  "comment": "construct lacks SP and RXLR",
  "loci": [
    [
      {
        "expression": "Not assayed",
        "id": "M4B6G6:f41d30e250b8f9b0-48"
      }
    ],
    [
      {
        "expression": "Not assayed",
        "id": "M4B6G6:f41d30e250b8f9b0-49"
      }
    ]
  ],
  "organism_strain": "Emoy2",
  "organism_taxonid": 272952
},

The multi-allele display will have to be applied to all sections that display genotypes and metagenotypes (e.g. PHI Phenotype, Gene for Gene Phenotype, Pathogen Phenotype, Host Phenotype, and Disease name).

This bug might be caused by the fact that multi-allele display was only enabled for host genotypes.

Currently, multi-allele genotypes are only displayed correctly on the following gene pages:

Here's an example of multi-allele genotypes being correct displayed from PHIG:285:

image

See below for a list of multi-allele genotypes grouped by PHI ID.


sahujashobanta commented 10 months ago

Issue is fixed and deployed. image

jseager7 commented 10 months ago

@sahujashobanta I've confirmed that this is fixed for most cases, but there are still some pathogen genotypes that seem to be missing in the UI:

jseager7 commented 10 months ago

@sahujashobanta Here's a walkthrough of the JSON export for one of the missing multi-allele genotypes listed above.

The example below is for PHIG:324 (the rhlI gene).

Here is how the genotype name currently appears in the PHI-base 5 UI:

image

And here is how it should appear:

image

This annotation in the JSON export is as follows:

{
    "checked": "no",
    "conditions": [
        "PECO:0000102"
    ],
    "creation_date": "2019-09-11",
    "curator": {
        "community_curated": false
    },
    "evidence_code": "Cell growth assay",
    "extension": [],
    "figure": "Fig S3",
    "genotype": "11fa7733063e791c-genotype-10",
    "publication": "PMID:28715477",
    "status": "new",
    "submitter_comment": "",
    "term": "PHIPO:0001057",
    "type": "pathogen_phenotype"
},

The genotype object referenced in the genotype property is:

"11fa7733063e791c-genotype-10": {
    "loci": [
        [
            {
                "id": "P54291:11fa7733063e791c-1"
            }
        ],
        [
            {
                "expression": "Not assayed",
                "id": "Q51559:11fa7733063e791c-1"
            }
        ]
    ],
    "organism_strain": "PA14",
    "organism_taxonid": 287
}

Note that the loci array links to two allele objects. The first allele is rhlIdelta:

"P54291:11fa7733063e791c-1": {
    "allele_type": "deletion",
    "gene": "Pseudomonas aeruginosa P54291",
    "name": "rhlIdelta",
    "primary_identifier": "P54291:11fa7733063e791c-1",
    "synonyms": []
}

And the second allele is rhlAC11STOP:

"Q51559:11fa7733063e791c-1": {
    "allele_type": "nonsense_mutation",
    "description": "aaC11->stop",
    "gene": "Pseudomonas aeruginosa Q51559",
    "name": "rhlAC11STOP",
    "primary_identifier": "Q51559:11fa7733063e791c-1",
    "synonyms": []
}

Both these alleles need to be listed in the genotype name, not just the first one.

The multi-allele genotype name also has to be displayed on the PHIG:331 gene page (the rhlA gene), since that gene is the other allele in the genotype.

Currently, the genotype name on PHIG:331 looks like this:

image

But it should look like this:

image

Note that the expression level [Not assayed] is also missing in that genotype name on the current PHIG:331 gene page.

jseager7 commented 9 months ago

@sahujashobanta I've confirmed that the display of multi-allele genotypes is fixed, but the expression level is still missing from some genotypes with the nonsense_mutation allele type.

Currently, the genotype name on PHIG:331 looks like this:

image

But it should look like this:

image

Note that the expression [Not assayed] is missing in the first example.

Here's the genotype object in the JSON export for this genotype, showing the expression:

"11fa7733063e791c-genotype-10": {
  "loci": [
    [
      {
        "id": "P54291:11fa7733063e791c-1"
      }
    ],
    [
      {
        "expression": "Not assayed",
        "id": "Q51559:11fa7733063e791c-1"
      }
    ]
  ],
  "organism_strain": "PA14",
  "organism_taxonid": 287
}

As a reminder, any time the expression property is present in the array of allele objects in the genotype object, then the expression value should be shown in square brackets next to the corresponding allele in the genotype display name.

jseager7 commented 7 months ago

Confirmed this is fixed for every gene page.