Predict a gene's expression from the sequence around its TSS.
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 input rule is the same for every expression model: at least
9,198 bp, with the TSS at least 4,599 bp from each end, up to
500,000 bp. Longer TSS-centred sequence gives better predictions:
each model's bio_spec.recommended_flank_bp (see list_models) says how
many bp it reads on each side of the TSS, and flank beyond that is
ignored. Less flank, down to 4,599 bp, is accepted and scored, but
the model then reads less than it was trained on. Omit `model` for
the server's default.
- A 9,198 bp sequence with the TSS at offset 4,599 (the midpoint)
needs no `tss_index`.
- Any longer sequence needs `tss_index`: the 0-based offset of the
TSS into it (a fetch_gene_for_expression handle carries its own).
The API cuts what the model reads around that offset and never
scans for a TSS itself.
Under 9,198 bp, or a TSS closer than 4,599 bp to either end, is
rejected here and by the API (422). A locus with no offset is
rejected too, because it is indistinguishable from a mis-centred
window. A very N-rich or low-complexity window can also be refused
by the API (422).
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) already fetches a
long TSS-centred handle (as much flank as the listed models
recommend) and records its `tss_index`, which is sent for you when
you pass that handle without one; find_genes_and_predict_expression
takes a raw region and finds each TSS for you.