predict_expression
Predict a gene's expression from a TSS-centred window.
Expression is cell-type-specific, so `description` (cell type /
assay context, e.g. 'K562 cell line') is REQUIRED — the API
rejects requests without it.
The model scores exactly 9,198 bp centred on the TSS (±4,599). Two
ways to supply that:
- A sequence of exactly 9,198 bp already centred on the TSS. No
`tss_index` needed — the midpoint is the only legal TSS.
- A longer locus, 9,198–500,000 bp, plus `tss_index`: the 0-based
offset of the TSS into it. The API cuts the window for you
(sequence[tss_index-4599 : tss_index+4599]) and never scans for a
TSS itself.
Anything under 9,198 bp is rejected, here and by the API (422) —
there is no padding or truncation fallback. `tss_index` is required
for every other length, because a locus with no offset is
indistinguishable from a mis-centred window.
An offset that is merely WRONG (e.g. counted over a wrapped FASTA's
characters, or against a chromosome coordinate instead of an offset
into THIS sequence) still succeeds and scores the wrong window —
verify meta.task_specific_counts.scored_window in the response.
Easiest paths: fetch_gene_for_expression(gene) returns a
ready-centred handle, and find_genes_and_predict_expression takes a
raw region and finds each TSS for you.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | No | Optional model id; omit for the task default. See list_models. | |
| sequence | No | DNA bases A/C/G/T/N (case-insensitive). Line breaks are ignored (a wrapped FASTA body may be pasted verbatim; a `>` header line may not). Mutually exclusive with `sequence_ref`. | |
| tss_index | No | 0-based offset of the transcription start site into the sequence, counted in bases (whitespace is ignored). Required unless the sequence is exactly 9,198 bp; must leave 4,599 bp on each side. The API scores only sequence[tss_index-4599 : tss_index+4599] and reports the slice it used as meta.task_specific_counts.scored_window — check it: a wrong-but-in-range offset scores the wrong window silently. | |
| description | No | REQUIRED experimental context — cell type / assay / conditions (e.g. 'K562 cell line', 'liver tissue'). Expression is cell-type-specific; the API rejects requests without it. | |
| sequence_ref | No | Handle (seq_…) from any acquisition tool (fetch_ensembl_sequence, fetch_region, fetch_gene_for_expression, load_demo_sequence, load_local_fasta, store_inline_sequence). Mutually exclusive with `sequence`. | |
| sequence_name | No | Label echoed back in the response (ignored when `sequence_ref` is used). | sequence |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||