PHI-base / PHI5_web_display

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

Show background in genotype and metagenotype details popup #85

Closed jseager7 closed 11 months ago

jseager7 commented 1 year ago

The JSON export includes a background property on genotype objects that currently isn't shown anywhere in the PHI-base 5 UI. This property has become important for capturing the genetic background for some genotypes now, so we want to display it.

Here is an example of a genotype in the JSON export that has a background:

"bd02fdb6831712ca-genotype-26": {
  "background": "GFP",
  "loci": [
    [
      {
        "expression": "Not assayed",
        "id": "A9JX75:bd02fdb6831712ca-42"
      }
    ]
  ],
  "organism_strain": "Sn79-1087",
  "organism_taxonid": 13684
},

The background does not need to be shown in the genotype or metagenotype display names. It only needs to be shown in the details popup, as an extra column.

The background should be shown for pathogen genotypes and host genotypes, both when they appear in a metagenotype and not in a metagenotype.

Here is a mockup of background shown in a single genotype:

image

And background shown in a metagenotype:

image

The column can be hidden if a genotype does not have a background, or if neither of the genotypes in a metagenotype have a background.

Note that the background is a property of the genotype, so for multi-allele genotypes, the background value will need to be repeated for each allele row, in the same way that the value of Species and Strain is repeated. Here is a hypothetical example:

image

jseager7 commented 1 year ago

@CuzickA I've included the background column after the strain column in the mockups above since the background is a property of the genotype instead of the individual alleles.

If you feel strongly that the background column should be put somewhere else, please say.

CuzickA commented 1 year ago

@CuzickA I've included the background column after the strain column in the mockups above since the background is a property of the genotype instead of the individual alleles.

If you feel strongly that the background column should be put somewhere else, please say.

Looks good to me.

jseager7 commented 1 year ago

@jashobanta-mcpl There was some confusion about the following requirement:

The background should be shown for pathogen genotypes and host genotypes, both when they appear in a metagenotype and not in a metagenotype.

To clarify, this means that the Background column should be shown for the following annotation type sections:

Note that for annotation types that have a pathogen and host, the pathogen row in the details popup should show the pathogen background, and the host row should show the host background, as illustrated in the image below.

image

jseager7 commented 1 year ago

PHIG:258 is an example of a gene page where the Background column should be in the PHI Phenotype section. According to the JSON export, at least one of the metagenotypes in this section should have a pmk1+ pathogen genotype with the background "Sep5-GFP".

jseager7 commented 11 months ago

I've confirmed that this is fixed for PHIG:258.

image

Here's an example of a host background from PHIG:360,

image

and a Host Phenotype annotation for PHIG:276,

image

and a Pathogen phenotype for PHIG:269.

image