advweb-grp1 / advanced-web-final-year-project

Final year advanced web develop unit project
MIT License
1 stars 0 forks source link

Gene info #48

Closed advweb-grp1 closed 1 year ago

advweb-grp1 commented 1 year ago

Need to find a way to integrate the gene info api to the application

advweb-grp1 commented 1 year ago

https://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?db=gene&id=4606&retmode=xml

LiamSingh64 commented 1 year ago

find ID's for all genes and post here

advweb-grp1 commented 1 year ago

Create a composable that returns an object that has

{
  "GeneName": "Description"
}
LiamSingh64 commented 1 year ago
Gene ID Endpoint
MYBPC3 4606 https://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?db=gene&id=4606&retmode=xml
MYH7 4625 https://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?db=gene&id=4625&retmode=xml
MYL2 4633 https://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?db=gene&id=4633&retmode=xml
TNNC1 7134 https://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?db=gene&id=7134&retmode=xml
TNNI3 7137 https://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?db=gene&id=7137&retmode=xml
TNNT2 7139 https://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?db=gene&id=7139&retmode=xml
TPM1 7168 https://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?db=gene&id=7168&retmode=xml
TTN 7273 https://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?db=gene&id=7273&retmode=xml
ACTC 70 https://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?db=gene&id=70&retmode=xml
LiamSingh64 commented 1 year ago

Description of Gene (very short - sentence)

<Entrezgene-Set>
  <Entrezgene>
    <Entrezgene_gene>
      <Gene-ref>
        <Gene-ref_desc>DESCRIPTION HERE</Gene-ref_desc>

Summary of Gene (Long - paragraph)

<Entrezgene-Set>
  <Entrezgene>
    <Entrezgene_summary>SUMMARY PARAGRAPH HERE</Entrezgene_summary>
AymanReh commented 1 year ago

make composable with all the mutations fetch the api and place the data inside of an array

AymanReh commented 1 year ago

Currently implemented a version which gets all the xml data for each ID Need to parse the xml to only retrieve the Gene-ref_desc and Entrezgene_summary Then need to put that data into the array

LiamSingh64 commented 1 year ago
LiamSingh64 commented 1 year ago

Change Composable so only 'Gene Description' and 'Gene Summary' is extracted and added to array as object!

LiamSingh64 commented 1 year ago

Initial Approach and Issues Faced with Fetching Data

Tried creating 'gene' store that would populate itself on user login, like hcm store., so there would have been a 'bulk' API call with the gene ID's. This store would have then been used in the MutationsView. But ran into errors with the API not reliably reaching an endpoints while looping through a list of ID'S, @AymanReh couldn't find a solution for this so for now, this approach has been abandoned.

Less-Optimal But Working Solution

Due to issues faced with the original approach we will, FOR NOW, just have an API call made for each time the user clicks the button to retrieve data. The page passes in the GeneID for the call and successfully parsing the necessary info returned (https://github.com/advweb-grp1/advanced-web-final-year-project/issues/48#issuecomment-1518812862), and displays it in a simple card. Has been manually tested but could also write some unit/e2e tests for this