8hk / AEK

SWE 574 Group 2 Fall 2020
1 stars 0 forks source link

Testing Entrez API #11

Closed 8hk closed 4 years ago

8hk commented 4 years ago

The Entrez has very powerful API for query the medical publications. Its API should be tested in the basic level and the notes should be taken from these tests. The Entrez will be implemented into project. That's why it has very significant role on this project. The test results will be discussed during 3th Group Meeting.

heobu commented 4 years ago

Quick Start Sample Code E-Utilities: 1 2

Example

Search abstracts with the "cancer" keyword in PubMed and retrieve the IDs of 60 of them: https://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi?db=pubmed&term=cancer&retmax=60

Fetch 2 of these abstracts with the given IDs in the text format: https://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?db=pubmed&id=33147463,33147101&retmode=text&rettype=abstract

8hk commented 4 years ago

sample postman collection for simple Entrez api call for pubmed

{
    "info": {
        "_postman_id": "c05d2c34-b3e6-409a-b9f4-eb5c3b9e29db",
        "name": "entrez",
        "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
    },
    "item": [
        {
            "name": "simplerequest",
            "event": [
                {
                    "listen": "test",
                    "script": {
                        "id": "c80db599-76fd-4814-a549-73725ba35d5c",
                        "exec": [

                            "pm.environment.set(\"api_key_var\", \"\");"
                        ],
                        "type": "text/javascript"
                    }
                }
            ],
            "request": {
                "method": "GET",
                "header": [],
                "url": {
                    "raw": "https://eutils.ncbi.nlm.nih.gov/entrez/eutils/esummary.fcgi?db=pubmed&id=123456&api_key={{api_key_var}}",
                    "protocol": "https",
                    "host": [
                        "eutils",
                        "ncbi",
                        "nlm",
                        "nih",
                        "gov"
                    ],
                    "path": [
                        "entrez",
                        "eutils",
                        "esummary.fcgi"
                    ],
                    "query": [
                        {
                            "key": "db",
                            "value": "pubmed"
                        },
                        {
                            "key": "id",
                            "value": "123456"
                        },
                        {
                            "key": "api_key",
                            "value": "{{api_key_var}}"
                        }
                    ]
                }
            },
            "response": []
        }
    ],
    "protocolProfileBehavior": {}
}
8hk commented 4 years ago

we can use the following features of Entrez

  1. Execute a search from database - ESearch (text searches),
  2. Upload UID(Unique ID) to Entrez - EPost (UID uploads),
  3. Download document summary or full record - ESummary (document summary downloads),
  4. Find related data between Entrez Links - ELink (Entrez links),
  5. Get database statics - EInfo (database statistics),
  6. Searching over global Entrez - EGQuery (global query),
  7. Getting spelling suggestions - ESpell (spelling suggestions)

We mostly will use 1,3,4,5,7. They can be found in here briefly. And Esma shared the Quick Start link at her comment below.

Quick Start Sample Code E-Utilities: 1 2

Example

Search abstracts with the "cancer" keyword in PubMed and retrieve the IDs of 60 of them: https://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi?db=pubmed&term=cancer&retmax=60

Fetch 2 of these abstracts with the given IDs in the text format: https://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?db=pubmed&id=33147463,33147101&retmode=text&rettype=abstract

heobu commented 4 years ago

In addition to the ones above mentioned EFetch will also be useful in retrieving abstracts.

Do we want to use the Entrez History server / Web Environment functionality and how can we make use of it.... Something to think about.

aysegulsari commented 4 years ago
aysegulsari commented 4 years ago

Summary of the comments is added to the Entrez wiki page