PHI-base / PHI5_web_display

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

The host gene pages should also show the metagenotypes and annotations #15

Closed CuzickA closed 2 years ago

CuzickA commented 2 years ago

image

image

From this host gene page how can a user identify the corresponding pathogen avirulence effector eg 'AvrStb6'?

Currently one directional 'pathogen avr gene' -> 'host resistance gene'. eg page https://poc.molecularconnections.com/phibase-v3/#/search-detail-page/PHIG:256

CuzickA commented 2 years ago

We would like this to look like the pathogen pages containing metagenotype annotations.

jseager7 commented 2 years ago

Removing the 'discuss' label since we've decided on a mockup for this now.

Molecular-Connections commented 2 years ago

Need more information on how to populate metagenotype in Gene-for-gene-phenotype section . Is this the same way how Phi-phenotype is populated ?

jseager7 commented 2 years ago

Is this the same way how Phi-phenotype is populated?

@Molecular-Connections Yes, the gene-for-gene phenotypes should be populated in the same way as the PHI phenotypes.

The only difference with host gene pages is that you should ignore wild type metagenotypes, meaning metagenotypes where there is no host gene. In the JSON export, wild type metagenotypes have identifiers that look like the following:

Hordeum-vulgare-wild-type-genotypeGolden-Promise

Their genotype objects also have an empty loci array:

"genotypes": {
  "Hordeum-vulgare-wild-type-genotypeGolden-Promise": {
    "loci": [],
    "organism_strain": "cv. Golden Promise",
    "organism_taxonid": 4513
  },

As a reminder, here's a simple procedure for finding all the metagenotype annotations for host genes in the JSON export:

  1. For each curation session object in the curation_sessions object, search the annotations array for all annotation objects where the value of the type property equals "gene_for_gene_phenotype".
  2. The metagenotype property of the annotation object has a metagenotype identifier as its value. Look up this identifier in the metagenotypes object for the session.
  3. Check the host_genotype property of the metagenotype object. This property contains the identifier for a host genotype. If the identifier contains "wild-type-genotype", skip this metagenotype (and skip displaying the annotation). Otherwise, look up the identifier in the genotypes object for the session.
  4. Loop through the loci array of the genotype object. Each sub-array in the loci array is a locus containing one or more allele objects. The id property of each allele object is an allele identifier. Look up each allele identifier in the alleles object for the session.
  5. The gene property of an allele object has a gene identifier as its value. Look up this gene identifier in the genes object for the session.
  6. The uniquename property of a gene object contains the UniProtKB ID for the gene. Now you can display the annotation on the gene page corresponding to that UniProtKB ID.

You can also do this search in reverse, going from gene → allele → genotype → metagenotype → annotation, but you will need to take care to stop the search if the genotype identifier is found in the pathogen_genotype property of a metagenotype object.

Note that if a metagenotype links to a genotype that links to multiple alleles (and thus multiple genes), then the annotation for the metagenotype should be displayed on each gene page for each gene referenced by the genotype.

jseager7 commented 2 years ago

I think this issue is fixed now, since I can see metagenotype annotations on the pages for host genes that are part of metagenotypes. The stb6 page has the annotations, and so does another gene I chose at random (Cf-4A).

The metagenotypes aren't showing for the Gene for Gene Phenotype annotations, but that's covered by issue #16.