Forge Tools ncbi_datasets

ncbi_datasets read

scidex.forge.ncbi_datasets

Query NCBI Datasets v2 for canonical gene summaries, RefSeq transcript IDs (NM_/NR_ lists), chromosome coordinates, and gene type classification. Richer and more reliable than legacy Entrez eUtils for RefSeq accession retrieval — returns the full list of NM_/NR_ accessions from reference standards, not just the first one. Input: 1–20 HGNC gene symbols. Not-found symbols are collected in the not_found list. Set NCBI_API_KEY env var for 10 rps (default 3 rps anonymous). API: https://api.ncbi.nlm.nih.gov/datasets/v2/gene/symbol/{symbols}/gene_summary

HTTP: POST /api/scidex/forge/ncbi_datasets

Invoke

Calls scidex.tool.invoke on the substrate with this tool name. Edit the JSON below — it must match the input schema. The substrate runs the tool, records the call in substrate_tool_calls, and returns a structured envelope.

Sign in to invoke this tool. Schema and curl snippet are visible to anyone.

Schemas

Input schema
{
  "additionalProperties": false,
  "description": "Input schema for ``scidex.forge.ncbi_datasets``.",
  "properties": {
    "gene_symbols": {
      "description": "HGNC gene symbols to query (e.g. ``['TP53', 'BRCA1']``). Between 1 and 20 symbols per call.",
      "items": {
        "type": "string"
      },
      "title": "Gene Symbols",
      "type": "array"
    },
    "species": {
      "default": "human",
      "description": "Species taxon name or common name passed to NCBI Datasets. Default ``'human'``. Use ``'mouse'`` for Mus musculus, etc.",
      "maxLength": 128,
      "title": "Species",
      "type": "string"
    },
    "include_transcripts": {
      "default": true,
      "description": "When True (default), populate refseq_accessions with NM_/NR_ accessions from the gene's reference standards.",
      "title": "Include Transcripts",
      "type": "boolean"
    }
  },
  "required": [
    "gene_symbols"
  ],
  "title": "ForgeNCBIDatasetsIn",
  "type": "object"
}
Output schema
{
  "$defs": {
    "NCBIGeneDataset": {
      "description": "One NCBI Datasets v2 gene record.",
      "properties": {
        "gene_symbol": {
          "description": "HGNC gene symbol.",
          "title": "Gene Symbol",
          "type": "string"
        },
        "gene_id": {
          "description": "NCBI Gene numeric ID.",
          "title": "Gene Id",
          "type": "integer"
        },
        "description": {
          "default": "",
          "description": "Official full gene name / description.",
          "title": "Description",
          "type": "string"
        },
        "gene_type": {
          "default": "other",
          "description": "Normalised gene biotype: protein_coding, lncRNA, miRNA, pseudogene, or other.",
          "title": "Gene Type",
          "type": "string"
        },
        "chromosome": {
          "default": "",
          "description": "Chromosome designator (e.g. '17', 'X', 'MT').",
          "title": "Chromosome",
          "type": "string"
        },
        "start_position": {
          "default": 0,
          "description": "Genomic start coordinate (1-based).",
          "title": "Start Position",
          "type": "integer"
        },
        "end_position": {
          "default": 0,
          "description": "Genomic end coordinate.",
          "title": "End Position",
          "type": "integer"
        },
        "orientation": {
          "default": "",
          "description": "Strand orientation: 'plus' or 'minus'.",
          "title": "Orientation",
          "type": "string"
        },
        "refseq_accessions": {
          "description": "RefSeq transcript accessions (NM_/NR_) from NCBI reference standards.",
          "items": {
            "type": "string"
          },
          "title": "Refseq Accessions",
          "type": "array"
        },
        "omim_ids": {
          "description": "OMIM MIM IDs cross-referenced to this gene.",
          "items": {
            "type": "string"
          },
          "title": "Omim Ids",
          "type": "array"
        },
        "summary": {
          "default": "",
          "description": "Official gene summary (up to 1000 chars).",
          "title": "Summary",
          "type": "string"
        }
      },
      "required": [
        "gene_symbol",
        "gene_id"
      ],
      "title": "NCBIGeneDataset",
      "type": "object"
    }
  },
  "description": "Response shape for ``scidex.forge.ncbi_datasets``.",
  "properties": {
    "genes": {
      "description": "NCBI Datasets gene records, one per gene found.",
      "items": {
        "$ref": "#/$defs/NCBIGeneDataset"
      },
      "title": "Genes",
      "type": "array"
    },
    "not_found": {
      "description": "Input symbols that were not found in NCBI Datasets.",
      "items": {
        "type": "string"
      },
      "title": "Not Found",
      "type": "array"
    },
    "took_ms": {
      "description": "Wall-clock time for the upstream API call.",
      "title": "Took Ms",
      "type": "integer"
    }
  },
  "required": [
    "took_ms"
  ],
  "title": "ForgeNCBIDatasetsOut",
  "type": "object"
}

curl snippet

Replace $SCIDEX_JWT with a valid bearer token. Read verbs are usually accessible without auth in dev; production requires a JWT.

curl -sS -X POST '/api/scidex/forge/ncbi_datasets' \
  -H 'authorization: Bearer $SCIDEX_JWT' \
  -H 'content-type: application/json' \
  -d '{
  "gene_symbols": []
}'

Discussion

Posting anonymously. Sign in for attribution.

No comments yet — be the first.