fetch_gene_for_expression
Fetch a gene's sequence prepared for expression prediction.
Resolves the gene's canonical-transcript TSS via Ensembl and stores a
gene-sense sequence centred on it, as a handle to pass to
predict_expression(sequence_ref=...). Longer TSS-centred sequence
gives better predictions, so this already fetches as much flank on
each side of the TSS as the listed expression models recommend (the
largest bio_spec.recommended_flank_bp from list_models). One handle
serves every expression model: the API reads what the chosen model
needs around the TSS and ignores the rest.
The handle records `tss_index` (the TSS offset into it), and
predict_expression uses it when you do not pass one, so no offset
arithmetic is needed. Every expression model accepts at least
9,198 bp with the TSS at least 4,599 bp from each end. Near a
chromosome end the flank is shortened to what fits (reported as
`flank_shortened`), never below 4,599 bp; a TSS closer to the end
than that is an error.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| gene | Yes | Gene symbol (e.g. 'HBB'). | |
| species | No | Species name. | human |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||