read_structure_consensus
Read the consensus RNA secondary structure a Stockholm alignment states in its #=GC SS_cons line (WUSS, the notation Rfam and Infernal write), and measure how well the aligned rows actually support it. Reports the base pairs, what each unpaired column is (hairpin, bulge, multifurcation, external, insertion, local end), and per pair the fraction of rows whose two bases form a canonical or GU wobble pair. Use it to check whether a family's published structure is borne out by the sequences, or to pull a pair table out of an alignment for drawing. Reading only, and it REFUSES a Pfam alignment by name: SS_cons is two alphabets, and Pfam writes protein DSSP states in the same field, where C/H/E are pseudoknot letters in WUSS — parsing one as the other would invent base pairs for a protein.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | the alignment file's contents. Stockholm is the only format that records `#=GC` annotation, so a CLUSTAL or PHYLIP file is refused by name rather than returning an empty structure. | |
| _files | No | The project: record references shaped like _subject. Their records become library documents a tool names in sequences/parts/document; a trace or alignment is found by file name. | |
| _subject | No | The record to act on: exactly one of sequence, accession (+source), sample (an id from list_samples) or file ({name, text} or {name, base64}); record_index picks one record of several. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rows | Yes | aligned sequences the support was measured over | |
| pairs | Yes | base pairs the consensus states | |
| roles | Yes | per column, what its glyph said: pair, hairpin, bulge, multifurcation, external, insertion or missing | |
| columns | Yes | alignment width the annotation covers | |
| support | Yes | per column, {observed, paired} or null where the column is unpaired — the denominator travels so a caller can say "no evidence" instead of drawing a zero | |
| alphabet | Yes | which alphabet the `SS_cons` line was written in: `wuss`, `protein-dssp`, or `unknown` | |
| pairList | Yes | every pair as {i, j}, plus `knotLetter` when it came from a pseudoknot letter rather than a bracket | |
| pairTable | Yes | per column, its partner column or -1 — the same shape `pairTable` returns, so it wires straight into an arc drawing | |
| medianSupport | Yes | the median, over pairs that any row spans, of the fraction of those rows forming a canonical or wobble pair. The panel's own headline number — a family whose structure is real sits high here, and a low value means the rows do not do what the annotation says |