https://github.com/cfsan-biostatistics/ncbi-pathogen-api-docs

Repository for samizdat about NCBI's undocumented Pathogen API.

https://github.com/cfsan-biostatistics/ncbi-pathogen-api-docs

Science Score: 10.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
    Links to: ncbi.nlm.nih.gov
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (4.3%) to scientific vocabulary
Last synced: 10 months ago · JSON representation

Repository

Repository for samizdat about NCBI's undocumented Pathogen API.

Basic Info
  • Host: GitHub
  • Owner: CFSAN-Biostatistics
  • Language: Shell
  • Default Branch: main
  • Size: 4.88 KB
Statistics
  • Stars: 0
  • Watchers: 8
  • Forks: 1
  • Open Issues: 0
  • Releases: 0
Created over 5 years ago · Last pushed over 5 years ago

https://github.com/CFSAN-Biostatistics/ncbi-pathogen-api-docs/blob/main/

# ncbi-pathogen-api-docs
Repository for [samizdat](http://www.catb.org/jargon/html/S/samizdat.html) about NCBI's undocumented Pathogen API.

*note* For large batch jobs, please download from the ftp site and run operations locally.
ftp://ftp.ncbi.nlm.nih.gov/pathogen/

## API Endpoint URL


[https://www.ncbi.nlm.nih.gov/Structure/pathogen/tree/tree_srv.cgi](https://www.ncbi.nlm.nih.gov/Structure/pathogen/tree/tree_srv.cgi)


# Parameters

## Action

### getneighbors

Retrieve neighboring nodes in the tree within `distance` from `accessions`.

[https://www.ncbi.nlm.nih.gov/Structure/pathogen/tree/tree_srv.cgi?action=getneighbors&distance=4&accessions=PDT000608728.1,SAMN13035591,PDT000608727.1,FSIS21821478,qqq](https://www.ncbi.nlm.nih.gov/Structure/pathogen/tree/tree_srv.cgi?action=getneighbors&distance=4&accessions=PDT000608728.1,SAMN13035591,PDT000608727.1,FSIS21821478,qqq)

# Schema

JSON Schema to follow if we can figure out what it is.

# Using APIs

```python

import requests # seriously, use requests

accessions = [
    'PDT000608728.1',
    'SAMN13035591',
    'PDT000608727.1',
    'FSIS21821478',
    'qqq'
]

response = requests.get(
    "https://www.ncbi.nlm.nih.gov/Structure/pathogen/tree/tree_srv.cgi",
    params=dict(
        action='getneighbors',
        distance=4,
        accessions=",".join(accessions)
    )
)

records = response.json()

```

Owner

  • Name: CFSAN (Center for Food Safety and Applied Nutrition)
  • Login: CFSAN-Biostatistics
  • Kind: organization

GitHub Events

Total
  • Fork event: 1
Last Year
  • Fork event: 1