← Về thư mục
📄 / / profiles / r-and-d / raw_evidence / scientific-agent-skills / skills / genomic-intelligence / references / sequence-acquisition.md

Sequence Acquisition (Ensembl)

Turn a gene symbol or a genomic region into reference sequence so users don't have to bring a FASTA. Ensembl REST (rest.ensembl.org) is public — no key; only the prediction step needs a key (and only over REST).

On MCP, the acquisition tools (fetch_ensembl_sequence, fetch_region, fetch_gene_for_expression, find_genes) do this for you and return a handle. Over REST, query Ensembl yourself, then feed the sequence to /v1/tasks/....

Modes

TSS-centring (why expression is special)

The expression model always scores exactly 9,198 bp centred on the transcription start site (TSS). You can either hand it a pre-cut 9,198 bp window, or hand it up to 500,000 bp plus tss_index — the 0-based TSS offset into the whitespace-stripped sequence — and let the server slice sequence[tss_index-4599 : tss_index+4599]. Either way you must know where the TSS is; the endpoint never discovers it, never pads, and never reverse-complements. You cannot reliably build this from gene-body coordinates: the annotated gene start/end can sit far from the real TSS (HBB's gene end is 2,324 bp from its canonical TSS; ACTB's is 33,301 bp). Mis-centring tanks the prediction.

The correct construction: resolve the gene's canonical transcript (Ensembl expand=1), take the TSS from it (transcript start on the + strand, end on the − strand), and take 4,599 bp upstream + 4,598 bp downstream on the gene's strand = 9,198 bp; validate the length exactly. On MCP, fetch_gene_for_expression(gene=...) does all of this. Because it needs a transcript, it works from a gene, not a bare region.

If instead you submit a wider locus with tss_index, the offset must be counted on the stripped nucleotide string (no newlines, no FASTA header) and satisfy 4599 ≤ tss_index ≤ len(sequence) − 4599. An offset that is out of range 422s; one that is merely wrong but in range silently scores the wrong window, so check meta.task_specific_counts.scored_window on the response.

Species & assembly

When to skip acquisition

Supply sequence directly when it is not reference genome — variant-bearing, edited, synthetic, or from a non-Ensembl assembly. Acquisition only returns reference sequence for the requested coordinates.

Limits

Bounded by the task's own cap (500,000 bp for every task) and its floor: promoter 300, splice 100, enhancer 50, chromatin 200, annotation 1,000, expression 9,198 bp. Clearing the floor only gets the request accepted — fetch at least the model's context_window_bp (promoter 2,000, splice 15,000, enhancer 249, chromatin 1,000) if you want the score to reflect real sequence rather than padding. Ensembl enforces its own per-request size limits; fetch very large ranges in pieces.