draw_alignment
Draw a block of an alignment as an SVG figure: the rows named, the residues shaded by how much of their column agrees with them, the column numbers over the block and Easel's Clustal conservation line under it.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| from | No | first column drawn, 1-based and inclusive. Clamped into the alignment. | |
| rows | Yes | the ALIGNED rows, each {name, aligned}; every row must already be the same length. Wire `alignedSequences` from align_sequences. | |
| ruler | No | print the column numbers over the block. Advanced. | |
| _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. | |
| scheme | No | identity shades a residue by how much of its column agrees with it, which works for any alphabet; nucleotide paints QUEEN's own base colours and is IGNORED over protein rows, which the answer's `scheme` then says. Values: identity (Column identity), nucleotide (Base colours). | identity |
| columns | No | how many columns to draw. Past about 200 the letters are narrower than the strokes that make them. | |
| _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. | |
| cell_width | No | width of one column's cell. In px. Advanced. | |
| name_chars | No | how many characters of a row's name to print; a longer one is elided in the middle, keeping the tail where two rows of a family differ. Advanced. | |
| row_height | No | height of one row. In px. Advanced. | |
| conservation | No | print the conservation line under the block. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| svg | Yes | the alignment block as an SVG figure | |
| rows | Yes | rows drawn | |
| width | Yes | figure width in px | |
| height | Yes | figure height in px | |
| scheme | Yes | the scheme ACTUALLY used, which is `identity` whenever `nucleotide` was asked for over protein rows | |
| columns | Yes | columns in the WHOLE alignment, so the window can be read against it | |
| alphabet | Yes | the alphabet the conservation line was computed for — Easel marks the strong and weak groups for protein only | |
| lastColumn | Yes | last column drawn, 1-based inclusive | |
| firstColumn | Yes | first column drawn, 1-based inclusive, AFTER clamping | |
| meanIdentity | Yes | mean per-column identity over the window drawn, 0-1 — the window's, not the alignment's | |
| conservedColumns | Yes | columns in the window every row agrees on and none gaps — the `*` marks |