Target intent resolution

sirnaforge.core.target_intent.resolve_target_intent converts a caller’s TargetIntentRequest into a frozen TargetIntent using the producer’s complete annotation transcript IDs and TranscriptInfo records. The request accepts declared required/excluded transcript IDs, target species, independently selected off-target-screen species, and selectivity. It rejects fields such as annotation_universe or coverage_denominator; those are derived from the annotation IDs before any design enumeration subset is applied.

Transcript version suffixes such as .2 are removed when identities are resolved. If two annotation IDs or records collapse to the same versionless ID, resolution fails rather than selecting one. Requested IDs and enumeration inputs must belong to the annotation universe. Records may omit sequence; the transcript remains in the frozen universe and can make an eligibility result unknown.

Pan-isoform intent requires a full-length exact complementary guide match in every annotated transcript except explicitly excluded IDs. Isoform-selective intent requires matches to the declared required transcripts and rejects any exact match in other annotated transcripts, including explicit exclusions. Both evaluate against the full sequence universe even when only a subset was sent to design enumeration. A missing sequence among a required or forbidden transcript yields unknown unless a known missing required match or forbidden hit already makes the result fail.

evaluate_target_intent_guide normalizes U/T and searches the full guide reverse complement in each transcript’s cDNA. It performs no scoring or network access. The result carries covered, uncovered required, excluded-hit, and sequence-missing transcript IDs alongside a three-valued verdict. Target species and screening species are stored independently and do not infer one another.

The workflow accepts the request as JSON through sirnaforge workflow --target-intent-config intent.json. The JSON fields match TargetIntentRequest (selectivity, target_species, offtarget_screen_species, required_transcript_ids, and excluded_transcript_ids). The workflow writes the frozen resolver output to target_intent/resolved_intent.json and one observation per candidate to target_intent/guide_observations.json; it records unknown when required sequence evidence is incomplete.