Skip to content

Entity Viewer Sidebar Payload

Manoj Pandian Sakthivel edited this page Mar 3, 2020 · 19 revisions

Open questions:

  • A way to retrieve alternative assemblies { assemblies -> gene_id => {species, name}}
  • How do we retrieve homeologues?
  • How do we retrieve orthologues?
  • How do we retrieve alternative_alleles?
  • Should homeologues, orthologues & alternative_alleles be collectively called as relationships?
  • Should the field length be a part of Gene or Slice instead of Region?
  • How are we going to handle all the external references that doesn't exist anymore?
  • How are we going to build the working URI for external references? ( The current site does this but most of the links don't work anymore)

Previous discussions:

  • How do we specifically retrieve all the external references from the metadata?

    • External references will either part of the metadata or be a thing on its own. We are still not very sure whether it will have to be handled separately for it to have it's own type.
  • How do we get the display name for biotypes?

    • One solution that was discussed is to make the GraphQL server retrieve the displayName by sending a request to Sequence Ontology lookup while preparing the response for the client
  • What are the other attributes? Do we need to display them all?

    • The will be a lot of junk in the other attributes section if we need to display them all. Instead, we need to make a selected list of all the high-level attributes and display those instead.

Current GraphQL Schema:

type Assembly {
  name: String!
  accession_id: String!
  species: Species!
}

type Species {
  scientific_name: String!
  name: String
  strains: [Strain!]
}

type Allele = {
    allele_name: String!,
    stable_id: String!
}

type Homeologue = {
    type: string,
    stable_id: string
}

type Strain = {
    strain_name: string,
    stable_id: string
}

type Attribute = {
    description: String!
    displayName: String!
    code: String!
}

type Source {
  name: String!
  uri: String // may not exist
}

type Metadata {
  key: String! // external_reference
  value: String! // ENSG00000139618
    description: String
  source_uri: String // url to entity in Expression Atlas
  source: Source! // Expresion Atlas object
}

// reference to given entity in other source
// or use Metadata ?
// type ExternalReference {
//   source: Source!
//   display_name: String!
//     uri: String
// }

type Attribute {
    code:  String! // protein coding
    label: String! // Protein Coding
}

type Slice {
  region: Region!
}

type Region {
  name: String!
  strand: Strand
  assembly: String!
}

type SequenceOntologyTerm: {
    accession_id: String!
    code: String!
    display_name: String!
}


type Gene { 
    symbol: String!
    sequence_ontology_term: SequenceOntologyTerm
    name: String!
    alternative_names: [String!]
    metadata {
        external_references: [Metadata!]
        function: Metadata
        name:     Metadata!
        synonyms: [Metadata!]!
    }
    slice: Slice!


    ??? other_assemblies {}
    ??? alleles or allele_group { alternative_alleles: [Gene] }
    ??? homeologues: {} 
    ??? releated_genes/relationships: {homeologues, orthologues & alternative_alleles }
}

type Transcript {
    support_level: {
        code: 'tsl1'
    }
    something: [] // MANE select // Ensembl Select // string? { code: string, display_name: string }? 
}

Suggested structure of the transformed payload:

type Option = {
    "value": string,
    "label": string
};

type ExternalLink = {
    "label": string | null,
    "url": string,
    "anchor_text": string
}

type Assembly = {
    "species_name": string,
    "assembly_name": string,
    "stable_id": string
}

type Allele = {
    "allele_name": string,
    "stable_id": string
}

enum DataSetType{
    "Current assembly",
    "Gene",
    "Protein"
}

type DataSet = {
    "type": DataSetType,
    "stable_id": string
}

type Homeologue = {
    "type": string,
    "stable_id": string
}

type Strain = {
    "strain_name": string,
    "stable_id": string
}

type AdditionalAttribute = {
    description,
    displayName,
    code
}
type EntityViewerSidebarResponse = {
    "gene_symbol": string,
    "gene_name": string,
    "stable_id" : string,
    "dbprimary_acc" : string, // HGNC:1101
    "synonyms": string[],
    "additional_attributes" : AdditionalAttribute[],
    "function": {
        "description": string | null,
        "provider" : ExternalLink
    },
    "sequence": {
        "transcripts" : Option[],
        "gene": Option[], // Find out if there is any indication to enable these options
        "tark_url" : ExternalLink
    },
    "other_data_sets": DataSet[],
    "other_assemblies": {
        "assemblies": Assembly[],
        "strains": Strain[]
    },
    "homeologues": Homeologue[],
    "alternative_alleles" : Allele[],
    "external_references" : ExternalLink[]

}

Clone this wiki locally