archaeopteryx 3.20.0 → 3.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +165 -18
- package/archaeopteryx.d.ts +24 -0
- package/archaeopteryx.js +971 -91
- package/forester.js +541 -2
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -33,6 +33,7 @@ config key live and shows the exact config JSON to copy into your own
|
|
|
33
33
|
* [Caliciviridae (186 strains)](https://cmzmasek.github.io/archaeopteryx-js/demo.html?tree=caliciviridae_500)
|
|
34
34
|
* [Adenoviridae (321 strains)](https://cmzmasek.github.io/archaeopteryx-js/demo.html?tree=adenoviridae)
|
|
35
35
|
* [Apaf-1 gene family (domain architectures)](https://cmzmasek.github.io/archaeopteryx-js/demo.html?tree=apaf)
|
|
36
|
+
* [Genome regions (gene arrows, anchored)](https://cmzmasek.github.io/archaeopteryx-js/demo.html?tree=genome_regions)
|
|
36
37
|
* [Clustergram (heat map + column clustering)](https://cmzmasek.github.io/archaeopteryx-js/demo.html?tree=clustergram)
|
|
37
38
|
* [Nucleotide alignment (600 columns)](https://cmzmasek.github.io/archaeopteryx-js/demo.html?tree=alignment_nt)
|
|
38
39
|
* [Genome alignment (150 × 30,000 columns)](https://cmzmasek.github.io/archaeopteryx-js/demo.html?tree=genome_alignment)
|
|
@@ -166,7 +167,7 @@ using `viewer.destroy()` to switch trees in place.
|
|
|
166
167
|
## Using the visualizations
|
|
167
168
|
|
|
168
169
|
A tree opens **already coloured** by its most informative field — the viewer
|
|
169
|
-
inspects what the tree carries (taxonomy, sequence fields,
|
|
170
|
+
inspects what the tree carries (taxonomy, sequence fields, metadata)
|
|
170
171
|
and decides by itself what is worth showing. There is nothing to configure.
|
|
171
172
|
|
|
172
173
|
* The **Color** and **Shape** menus (top of the control panel) list every
|
|
@@ -589,6 +590,81 @@ warning, never fatal. The tracks ride into the SVG, PDF and PNG exports.
|
|
|
589
590
|
This is the desktop's domain display, drawn to the same numbers
|
|
590
591
|
(`test/domain_test.js` holds them).
|
|
591
592
|
|
|
593
|
+
## Genome regions
|
|
594
|
+
|
|
595
|
+
A tree whose tips are genomes can carry (part of) each genome: its genes as
|
|
596
|
+
`<sequence>` elements, one per gene, each with a `<location>` on a contig and
|
|
597
|
+
its family in an `<annotation ref="…">`, plus one `<sequence type="dna">`
|
|
598
|
+
record per contig. The viewer draws them as a **gene track** beside the
|
|
599
|
+
tips: a thin backbone per genome with an **arrow per gene**, pointing by
|
|
600
|
+
strand, coloured by family, on one scale shared by the whole tree so
|
|
601
|
+
distances compare across genomes. The rows are **anchored**: the anchor
|
|
602
|
+
family's gene sits at the same place in every row, pointing right, and the
|
|
603
|
+
neighbours follow — a genome carrying it on the other strand is mirrored —
|
|
604
|
+
so gene order, inversions, insertions and deletions read down the tree, as
|
|
605
|
+
in BV-BRC's Compare Region Viewer. A family met in one genome only is grey,
|
|
606
|
+
a gene with no family lighter grey, so conserved order stands out. A bar at
|
|
607
|
+
the end of a backbone marks a contig end; the track's own scale bar under
|
|
608
|
+
the rows reads in kb. The track appears from the start whenever a tree
|
|
609
|
+
carries regions; the **Genes** checkbox under Display Data toggles it, and
|
|
610
|
+
the **Genome regions** section holds the controls:
|
|
611
|
+
|
|
612
|
+
* **Track width** `−` / `+` — the widest row starts at a quarter of the
|
|
613
|
+
window and scales by 0.8 / 1.2 per press (hold to repeat).
|
|
614
|
+
* **Anchor** — `Auto` (the family single-copy in the most genomes, at least
|
|
615
|
+
half of them; the choice is named), any family that can anchor two
|
|
616
|
+
genomes or more, or `None`, which left-aligns the rows.
|
|
617
|
+
* **Family** — which annotation namespace colours the genes and anchors the
|
|
618
|
+
rows, offered when the genes carry more than one (a BV-BRC export carries
|
|
619
|
+
both PGfams and PLfams).
|
|
620
|
+
* **Labels** — `On genes` (the symbol, when it fits), `Legend` (a card of
|
|
621
|
+
the families with their commonest product and genome counts, draggable,
|
|
622
|
+
double-click to send it home), or `None`.
|
|
623
|
+
|
|
624
|
+
**Hovering an arrow** reads the gene out: symbol, product, family, location,
|
|
625
|
+
length, the genome it belongs to and its accession; **clicking** opens its
|
|
626
|
+
BV-BRC feature page for a BV-BRC accession (`fig|…`) or NCBI's protein page
|
|
627
|
+
for a GenBank / RefSeq one. In the circular and unrooted layouts the arrows
|
|
628
|
+
ride each named tip's spoke, as the domain tracks do, and both tracks can
|
|
629
|
+
show at once, the genes past the domains. Whole genomes are for viruses; a
|
|
630
|
+
bacterial genome is shown as a window of a few dozen genes around a gene of
|
|
631
|
+
interest, chosen by whoever writes the file. The tree is labelled by node
|
|
632
|
+
name: a genome's sequences describe the region beside the tip, not the tip.
|
|
633
|
+
|
|
634
|
+
The file needs nothing phyloXML has not got — `<location>` is the schema's
|
|
635
|
+
"location of a sequence on a genome/chromosome", an annotation's `ref` its
|
|
636
|
+
reference to an external database:
|
|
637
|
+
|
|
638
|
+
```xml
|
|
639
|
+
<clade>
|
|
640
|
+
<name>Brucella melitensis bv. 1 str. 16M</name>
|
|
641
|
+
<sequence type="dna"> <!-- the contig record, FIRST -->
|
|
642
|
+
<accession source="RefSeq">NC_003317.1</accession>
|
|
643
|
+
<name>chromosome I</name>
|
|
644
|
+
<location>NC_003317.1:1-2117144</location>
|
|
645
|
+
</sequence>
|
|
646
|
+
<sequence type="protein"> <!-- one per gene, any order -->
|
|
647
|
+
<accession source="BV-BRC">fig|224914.11.peg.1021</accession>
|
|
648
|
+
<symbol>dnaK</symbol>
|
|
649
|
+
<name>Chaperone protein DnaK</name>
|
|
650
|
+
<location>NC_003317.1:1055720-1057636(-)</location>
|
|
651
|
+
<annotation ref="pgfam:PGF_00019355"></annotation>
|
|
652
|
+
</sequence>
|
|
653
|
+
</clade>
|
|
654
|
+
```
|
|
655
|
+
|
|
656
|
+
A location is `contig:start-end(+)`, 1-based and inclusive, split on its
|
|
657
|
+
last colon; a located sequence **with** a strand is a gene, one **without**
|
|
658
|
+
is the contig's record, whose span says where the contig ends. The record
|
|
659
|
+
comes first because a tip's first sequence is "the" sequence to every other
|
|
660
|
+
reader. A tip's genes on a second contig are not drawn (one contig per
|
|
661
|
+
genome: the one with the most genes) and a location not in the grammar is
|
|
662
|
+
skipped; both are counted in a console warning. The demo is synthetic
|
|
663
|
+
([Genome regions](https://cmzmasek.github.io/archaeopteryx-js/demo.html?tree=genome_regions),
|
|
664
|
+
twelve genomes with one row per rule: an inversion, a deletion, two
|
|
665
|
+
insertions, a mirrored genome, a contig end, two contigs, overlapping genes,
|
|
666
|
+
a doubled anchor); `test/gene_test.js` pins its numbers.
|
|
667
|
+
|
|
592
668
|
## Sequence alignments
|
|
593
669
|
|
|
594
670
|
A tree whose tips carry `<mol_seq is_aligned="true">` shows the alignment as
|
|
@@ -1072,7 +1148,7 @@ a popup any more, and nothing fails silently.
|
|
|
1072
1148
|
| **Newick** / New Hampshire (`.nwk`, `.nh`, `.tre`) | in / out | The base tree: topology, names, branch lengths, and bracketed confidence values. | [1] |
|
|
1073
1149
|
| **NHX** — New Hampshire eXtended | in | `[&&NHX:...]` tags riding on Newick: taxonomy (`S=`, `T=`), sequence (`GN=`, `AC=`), support (`B=`), duplication/speciation events (`D=`). | [2] |
|
|
1074
1150
|
| **Nexus** (`.nex`, `.nexus`) | in / out | One file for the tree(s) and, in a `CHARACTERS`/`DATA` block, an aligned protein/DNA/RNA matrix (sequential or interleaved) — the tree and its alignment together. | [3] |
|
|
1075
|
-
| **phyloXML** (`.xml`) | in / out | The richest native format: taxonomy, sequences and alignments, dates, confidences, branch colours and arbitrary custom properties. | [4] |
|
|
1151
|
+
| **phyloXML** (`.xml`) | in / out | The richest native format: taxonomy, sequences and alignments, dates, confidences, branch colours and arbitrary metadata (custom properties). | [4] |
|
|
1076
1152
|
| **Auspice / Nextstrain** `dataset.json` (v2) | in | Phylodynamic builds: sampling dates and their confidence, cumulative divergence, and discrete traits (country, clade, host, ...) with their posterior distributions. | [5] |
|
|
1077
1153
|
| **BEAST** / BEAST 2 / TreeAnnotator annotations | in (embedded in Newick/Nexus) | `[&posterior=...,height_95%_HPD={lo,hi},rate=...]`-style blobs: posterior clade support, node-age confidence intervals, per-branch rates and other traits. FigTree's `!color` is read the same way. | [6, 7] |
|
|
1078
1154
|
| **MrBayes** annotations | in (embedded in Newick/Nexus) | `prob=`/`prob.stddev=` blobs: posterior-probability clade support. | [8] |
|
|
@@ -1100,7 +1176,7 @@ when the sequences are of unequal length, why it cannot.
|
|
|
1100
1176
|
size* (the default) is the whole tree, re-laid-out large enough that no tip
|
|
1101
1177
|
name has to be hidden — in rows in the rectangular layout, around the ring in
|
|
1102
1178
|
the circular one — and cropped to the drawing, with the legends (colour,
|
|
1103
|
-
shape, domains, the heat-map ring's scale) stacked beside the tree rather
|
|
1179
|
+
shape, domains, gene families, the heat-map ring's scale) stacked beside the tree rather
|
|
1104
1180
|
than over it. The window itself is left exactly as it was. An unrooted fan
|
|
1105
1181
|
is enlarged only while that still frees names: tips on very short branches
|
|
1106
1182
|
can collide at any size. An alignment track is drawn as its window, the
|
|
@@ -1379,8 +1455,8 @@ copy-pastable JSON.
|
|
|
1379
1455
|
| `layout` | `'rectangular'` | The starting layout: `'rectangular'`, `'circular'`, or `'unrooted'`. |
|
|
1380
1456
|
| `ladderizeTree` | `true` | Ladderize the tree on load: at each node, the larger clade first (any number of children, so a polytomy sorts too). |
|
|
1381
1457
|
| `showMsa` | tree-derived | Open with the alignment track shown. Default: on when the tree carries an aligned `mol_seq`, off otherwise — an explicit `true`/`false` overrides that. |
|
|
1382
|
-
| `showProperties` | tree-derived | Open with the nodes'
|
|
1383
|
-
| `labelProperties` | tree-derived | Which
|
|
1458
|
+
| `showProperties` | tree-derived | Open with the nodes' metadata (their phyloXML properties) in their labels — the **Metadata** checkbox. Default: off, unless the file's figure setting (`show.SHOW_PROPERTIES=true`) says on. See [Metadata in the label](#metadata-in-the-label). |
|
|
1459
|
+
| `labelProperties` | tree-derived | Which metadata fields the label shows, in order, as an array of refs (`['BVBRC:species', 'BVBRC:host_name']`). Default: the figure setting's `labelprops`, else `null` — every property but the heat map's columns. |
|
|
1384
1460
|
| `showMsaLogo` | `false` | Open with the alignment summarised as a sequence logo instead of a conservation bar: a stack of letters per column, as tall as its information content, over the tips currently on screen. Only drawn while the alignment track is shown. |
|
|
1385
1461
|
| `showHeatmap` | tree-derived | Open with the heat map shown. Offered whenever the tree carries two or more numeric per-tip fields, but off unless asked for — almost any annotated tree has such fields, so turning it on by itself would be an opinion about the tree rather than a service — or unless the file's own figure setting (`aptx:figure`, see [Heat maps](#heat-maps)) draws them as a matrix. |
|
|
1386
1462
|
| `heatmapColumnOrder` | tree-derived | How the heat map's columns are ordered: `'document'` (as the file lists them), `'clustered'` (Euclidean), `'clustered-presence'` (Bray–Curtis), `'alphabetical'`, `'frequency'`. The clustered modes also draw the dendrogram. Default: a **clustered** order, with the distance chosen from the values — Bray–Curtis where the matrix has zeros to ignore and nothing negative, Euclidean otherwise. An explicit value always wins and is never re-derived. |
|
|
@@ -1389,6 +1465,10 @@ copy-pastable JSON.
|
|
|
1389
1465
|
| `domainLabels` | `'domains'` | Where domain names go: `'domains'` (on the boxes), `'legend'` (a card), or `'none'`. |
|
|
1390
1466
|
| `domainGlow` | `false` | Open with the glow around each domain box on. |
|
|
1391
1467
|
| `domainEvalueExponent` | `-3` | The E-value threshold's exponent at launch, an integer from `-20` to `3`: domains with an E-value at or under `10^exponent` are drawn. |
|
|
1468
|
+
| `showGenes` | tree-derived | Open with the gene track shown. Default: on when any tip carries a genome region (two or more located genes), off otherwise — an explicit `true`/`false` overrides that. |
|
|
1469
|
+
| `geneAnchor` | `'auto'` | The family the gene track's rows line up on: `'auto'` (the family single-copy in the most genomes), `'none'` (left-aligned rows), or a family ref such as `'pgfam:PGF_00019355'`. |
|
|
1470
|
+
| `geneFamily` | `'auto'` | The annotation namespace that colours the genes and anchors the rows: `'auto'` (the one most genes carry) or a prefix such as `'pgfam'`. |
|
|
1471
|
+
| `geneLabels` | `'genes'` | Where gene symbols go: `'genes'` (on the arrows), `'legend'` (a card of the families), or `'none'`. |
|
|
1392
1472
|
| `showScaleAxis` | tree-derived | Open with the scale axis shown: the time axis on a time tree whose branches show time, a distance axis on any other phylogram. Default: on when the tree carries `<date>` elements and opens shown in time, off otherwise (a dated tree that opens in divergence is a divergence tree on screen) — an explicit `true`/`false` overrides that. |
|
|
1393
1473
|
| `showScaleGrid` | `false` | Open with the Scale Grid lines on (only meaningful — and only offered as a checkbox — while the scale axis itself is shown). |
|
|
1394
1474
|
| `showSupportDots` | `false` | Open with the Support Dots marks on (the checkbox appears whenever the tree has confidences). |
|
|
@@ -1877,24 +1957,26 @@ rather than 300 identical "Influenz.." labels).
|
|
|
1877
1957
|
Both menus live in the single control panel, above Display Data, which is where
|
|
1878
1958
|
the desktop puts them.
|
|
1879
1959
|
|
|
1880
|
-
###
|
|
1960
|
+
### Metadata in the label
|
|
1881
1961
|
|
|
1882
1962
|
A tip's other fields — a species, a host, a country, anything a node carries
|
|
1883
|
-
as a `<property>` — can go into its label, as
|
|
1884
|
-
under Display Data (offered when nodes carry
|
|
1885
|
-
|
|
1963
|
+
as a `<property>` — are its **metadata**, and they can go into its label, as
|
|
1964
|
+
on the desktop. **Metadata** under Display Data (offered when nodes carry
|
|
1965
|
+
any, off by default) adds the **values** after the rest of the label, joined by ` | ` as the rest of the
|
|
1886
1966
|
label is: `255457.3 | Brucella lupini | host`, or `Brucella lupini` alone with
|
|
1887
1967
|
Node Name off. (The desktop joins them with `, `; a pipe was chosen here
|
|
1888
1968
|
because values often contain commas — a host such as `Bottlenose dolphin,
|
|
1889
|
-
Tursiops truncatus`.) A unit follows its value. With nothing chosen, every
|
|
1890
|
-
node's own order, except the heat map's columns while it is
|
|
1891
|
-
has one display role. **
|
|
1892
|
-
|
|
1893
|
-
a
|
|
1969
|
+
Tursiops truncatus`.) A unit follows its value. With nothing chosen, every
|
|
1970
|
+
field shows in the node's own order, except the heat map's columns while it is
|
|
1971
|
+
shown — a field has one display role. **Metadata fields…** picks which fields
|
|
1972
|
+
(tick them; **All** and **None** tick and untick the lot) and in what order
|
|
1973
|
+
(drag a row, or use its arrows); Apply keeps the ticked ones in the order
|
|
1974
|
+
shown, and picking a field turns Metadata on. The checkbox and the fields
|
|
1975
|
+
travel in a shared view (`show=…,properties`, `labelFields=`), and the config keys are
|
|
1894
1976
|
`showProperties` and `labelProperties`.
|
|
1895
1977
|
|
|
1896
1978
|
A file can choose for itself: the desktop's figure setting (`aptx:figure`,
|
|
1897
|
-
see [Heat maps](#heat-maps)) carries `labelprops=` (the
|
|
1979
|
+
see [Heat maps](#heat-maps)) carries `labelprops=` (the fields, in order)
|
|
1898
1980
|
and the display switches `show.SHOW_PROPERTIES=true` and
|
|
1899
1981
|
`show.SHOW_NODE_NAMES=false`, and a tree opens labelled that way in both
|
|
1900
1982
|
programs. The config wins over the file.
|
|
@@ -1928,7 +2010,10 @@ Two rules, in order:
|
|
|
1928
2010
|
of the current pick's (substantially more economical) takes it.
|
|
1929
2011
|
|
|
1930
2012
|
A field with no printable values is never checked (apaf's sequences carry
|
|
1931
|
-
only domain architectures, so its Sequence box starts unchecked).
|
|
2013
|
+
only domain architectures, so its Sequence box starts unchecked). On a tree
|
|
2014
|
+
of genomes the sequence field has none either: a tip's located sequences —
|
|
2015
|
+
its contig record and its genes — describe the region drawn beside it, not
|
|
2016
|
+
the tip, so the node name stands. The choice
|
|
1932
2017
|
is logged to the console at launch, and the user can recheck anything — the
|
|
1933
2018
|
rules only set the initial state.
|
|
1934
2019
|
|
|
@@ -2061,6 +2146,68 @@ numbers — apaf.xml: 31 tips, `Lmax` 2080, 202 domains; 9 names / 166 boxes
|
|
|
2061
2146
|
at 1e−3; the palette; 22_MOUSE's box offsets at `W = 300` — are the
|
|
2062
2147
|
desktop's, in `test/domain_test.js`.
|
|
2063
2148
|
|
|
2149
|
+
### The gene track
|
|
2150
|
+
|
|
2151
|
+
Data model (forester): a tip's `sequences` with a `location` the grammar
|
|
2152
|
+
reads (`forester.parseSequenceLocation`: `contig:start-end(+)`, split on the
|
|
2153
|
+
last colon, 1-based, `end ≥ start`) are genes when the strand is given and
|
|
2154
|
+
contig records when not; `forester.geneRegionOf(node)` is the tip's genes
|
|
2155
|
+
on ONE contig (the most genes, ties to the first listed) in position order,
|
|
2156
|
+
that contig's record, the span and the count left out; null without a gene.
|
|
2157
|
+
A gene's family in a namespace is its first annotation ref with that prefix
|
|
2158
|
+
(`geneFamilyOf`); `geneFamilyNamespaces` ranks the prefixes by use.
|
|
2159
|
+
`collectBasicTreeProperties` sets `geneRegions` when some tip carries two
|
|
2160
|
+
genes or more (a gene-family tree locating one gene per tip is not a tree
|
|
2161
|
+
of genomes) and `maxGeneRegionLength`; `treeStatistics` counts
|
|
2162
|
+
`tipsWithGenes`. Anchor: `geneAnchorCandidates` counts per family the
|
|
2163
|
+
regions carrying it exactly once (`single`) and at all; `geneDefaultAnchor`
|
|
2164
|
+
is the top one when `single` is at least half the regions, ties by code
|
|
2165
|
+
unit. Rows: `geneTrackRows(regions, anchor, ns)` maps every row onto one
|
|
2166
|
+
coordinate in bp — an anchored row's anchor midpoint at 0, mirrored
|
|
2167
|
+
(`x → −x`, directions flipped) when the anchor is on `−`; a row with no
|
|
2168
|
+
anchor gene, or two, left-aligned at the anchored rows' leftmost edge (0
|
|
2169
|
+
without any). The backbone is the span padded by 2% (`GENE_REGION_PAD`),
|
|
2170
|
+
clamped to the record's span with a cap where it was clamped (caps swap
|
|
2171
|
+
with the flip). Lanes: greedy by start, the first of two that is free, else
|
|
2172
|
+
the one that frees first. Scale: `f = W / (extent.max − extent.min) × 0.9`
|
|
2173
|
+
px per bp, `W` by the domain track's rules (a quarter of the viewport,
|
|
2174
|
+
−/+ by 0.8/1.2, 20…2000; radial `min(W, 0.2 × radius)`), kept apart from
|
|
2175
|
+
the domain track's width. Placement as the domain tracks and past them when
|
|
2176
|
+
both show: rectangular `start = _w + nodeLabelGap + labelSpace +
|
|
2177
|
+
_domainReserve + 20`, reserve `20 + W + 10` in `_geneReserve` (counted
|
|
2178
|
+
wherever `_w` is); circular `r0 = maxRad + labelSpace + domainRadialExtent
|
|
2179
|
+
+ 4`; unrooted `start = labelSpace + domainRadialExtent + 4`; the radial fit
|
|
2180
|
+
adds `4 + W + 10`. Arrow: `geneArrowPath(x, y, w, h, dir)`, head
|
|
2181
|
+
`min(h/2, w)`, a triangle when shorter than its head; two lanes share the
|
|
2182
|
+
height (`max(3, h/2)` each); each arrow is its own path carrying
|
|
2183
|
+
`__aptxGene` for the readout, with a 1 px `darken(base, 0.3)` border; the
|
|
2184
|
+
backbone (1 px) and the caps (1.5 px bars) are one path per track, one per
|
|
2185
|
+
row in the radial layouts. Symbol (or gene name) on the body in `min(font,
|
|
2186
|
+
h − 2)` px when over 4 px and at most `w − head − 4` wide, rectangular
|
|
2187
|
+
only. Colours: the families SHARED over the tree (two regions or more),
|
|
2188
|
+
sorted by code unit, take the domain palette (`domainQualitativeColor`) in
|
|
2189
|
+
order; a singleton `#9e9e9e`, no family `#cfcfcf`; dealt at load and on a
|
|
2190
|
+
namespace change. The kb bar: `geneScaleBar(f, 80)`, a round number of bp
|
|
2191
|
+
labelled in kb from 1000 up, 12 px under the lowest row. Legend
|
|
2192
|
+
(`'legend'`): title `Gene families (<ns>)`, rows `product (regions)` in
|
|
2193
|
+
screen order over the view (`geneFamilySummary` with the tree's shared set,
|
|
2194
|
+
so a family shown once in a subtree keeps its colour), then `unique to one
|
|
2195
|
+
genome (n)` and `no family (n)`; home bottom-right, drag keeps its place as
|
|
2196
|
+
a fraction of the view, double-click sends it home. Links: `geneReference`
|
|
2197
|
+
— BV-BRC's feature page for `fig|…` or a BV-BRC / PATRIC source, NCBI's
|
|
2198
|
+
protein page for GenBank / RefSeq / UniProt. State: `showGenes` (auto-on
|
|
2199
|
+
with `geneRegions`), `geneAnchor` (`'auto'` | `'none'` | a ref),
|
|
2200
|
+
`geneFamily` (`'auto'` | a namespace), `geneLabels`; the view carries
|
|
2201
|
+
`genes`, `geneLabels`, and `geneAnchor` / `geneFamily` as the EFFECTIVE
|
|
2202
|
+
values. Labels: on a tree with `geneRegions`, a tip whose first sequence is
|
|
2203
|
+
located contributes no sequence text to the label suggestion
|
|
2204
|
+
(`suggestLabelFields`), so the node name stands. Gates as the domain
|
|
2205
|
+
tracks (external labels on, radial labels in a radial layout, a name the
|
|
2206
|
+
crowding rule left). Fixture `test/data/genome_regions.xml`, generated by
|
|
2207
|
+
`test/make_genome_regions_fixture.js` (the demo copy is byte-identical and
|
|
2208
|
+
a test says so); the numbers in `test/gene_test.js`, the SVG in
|
|
2209
|
+
`test/browser/genes.html`.
|
|
2210
|
+
|
|
2064
2211
|
### The alignment track
|
|
2065
2212
|
|
|
2066
2213
|
Data model: per-tip `sequences[0].mol_seq = {is_aligned, value}` (the gapped
|
|
@@ -2178,7 +2325,7 @@ child arrangement and `ladderizeTree` rewrites it — measured, one file once ga
|
|
|
2178
2325
|
only mode that is **not** normalised first — being left alone is the whole point
|
|
2179
2326
|
of it. It is set by the **Reorder columns…** dialog, which drags or arrow-keys a
|
|
2180
2327
|
list of the columns as drawn; applying it writes `heatmapManualOrder` and sets
|
|
2181
|
-
the mode, exactly as the desktop's
|
|
2328
|
+
the mode, exactly as the desktop's Metadata Fields arrows switch a tab to
|
|
2182
2329
|
Manual. (Theirs also chooses which fields are columns and of what type; ours
|
|
2183
2330
|
takes every numeric field automatically, so the dialog is about order alone.)
|
|
2184
2331
|
Choosing Manual from the menu with nothing arranged yet freezes the order on
|
|
@@ -2210,7 +2357,7 @@ the tree ≥ 220 px))`. It is budgeted **before** the alignment, and the
|
|
|
2210
2357
|
alignment's own band then yields to it: the matrix wants a fixed, finite width
|
|
2211
2358
|
while the alignment's band is a window that scrolls and so loses nothing by
|
|
2212
2359
|
giving way. (Budgeted the other way round, an 18-column matrix got a 60 px
|
|
2213
|
-
sliver.) It sits between the domain tracks and the alignment, its right edge at
|
|
2360
|
+
sliver.) It sits between the domain and gene tracks and the alignment, its right edge at
|
|
2214
2361
|
`displayWidth − rootOffset − msaReserve`. Rows tile the cluster height by the
|
|
2215
2362
|
same once-derived midpoints the alignment uses. Column width is
|
|
2216
2363
|
`clamp(band / columns, 3, 14)`; past `band / 3` columns the matrix shows a
|
package/archaeopteryx.d.ts
CHANGED
|
@@ -60,12 +60,25 @@ export interface ArchaeopteryxConfig {
|
|
|
60
60
|
collapseControlPanel?: boolean;
|
|
61
61
|
displayHeight?: number;
|
|
62
62
|
displayWidth?: number;
|
|
63
|
+
/** The domain tracks' E-value threshold at launch, as an exponent: -20 to 3. */
|
|
64
|
+
domainEvalueExponent?: number;
|
|
65
|
+
domainGlow?: boolean;
|
|
66
|
+
domainLabels?: 'none' | 'domains' | 'legend';
|
|
63
67
|
enableAccessToDatabases?: boolean;
|
|
64
68
|
enableDownloads?: boolean;
|
|
65
69
|
enableDynamicSizing?: boolean;
|
|
66
70
|
enableManualNodeSelection?: boolean;
|
|
67
71
|
enableSubtreeDeletion?: boolean;
|
|
68
72
|
enableVisualizations?: boolean;
|
|
73
|
+
/** The family the gene track's rows line up on: 'auto' (the family
|
|
74
|
+
* single-copy in the most genomes), 'none' (left-aligned rows), or a
|
|
75
|
+
* family ref such as 'pgfam:PGF_00019355'. */
|
|
76
|
+
geneAnchor?: string;
|
|
77
|
+
/** The annotation namespace that colours the genes and anchors the rows:
|
|
78
|
+
* 'auto' (the one most genes carry) or a prefix such as 'pgfam'. */
|
|
79
|
+
geneFamily?: string;
|
|
80
|
+
/** Where gene symbols go: on the arrows, in a legend of the families, or nowhere. */
|
|
81
|
+
geneLabels?: 'none' | 'genes' | 'legend';
|
|
69
82
|
initialVisualization?: string | null;
|
|
70
83
|
ladderizeTree?: boolean;
|
|
71
84
|
layout?: Layout;
|
|
@@ -98,6 +111,11 @@ export interface ArchaeopteryxConfig {
|
|
|
98
111
|
* while heatmapColumnOrder is 'manual'. A ref the tree has not got is
|
|
99
112
|
* ignored; a column this does not name follows the ones it does. */
|
|
100
113
|
heatmapManualOrder?: string[] | null;
|
|
114
|
+
/** The domain tracks. Default: on when any tip carries a domain architecture. */
|
|
115
|
+
showDomainArchitectures?: boolean;
|
|
116
|
+
/** The gene track (genome regions). Default: on when any tip carries two
|
|
117
|
+
* or more located genes. */
|
|
118
|
+
showGenes?: boolean;
|
|
101
119
|
showHeatmap?: boolean;
|
|
102
120
|
showMsa?: boolean;
|
|
103
121
|
/** Summarize the alignment as a sequence logo instead of a conservation
|
|
@@ -179,6 +197,12 @@ export interface ViewState {
|
|
|
179
197
|
domainLabels?: 'none' | 'domains' | 'legend';
|
|
180
198
|
domainGlow?: boolean;
|
|
181
199
|
domainEvalue?: number;
|
|
200
|
+
genes?: boolean;
|
|
201
|
+
/** The anchor family in effect: a ref, or 'none'. */
|
|
202
|
+
geneAnchor?: string;
|
|
203
|
+
/** The family namespace in effect. */
|
|
204
|
+
geneFamily?: string;
|
|
205
|
+
geneLabels?: 'none' | 'genes' | 'legend';
|
|
182
206
|
scaleAxis?: boolean;
|
|
183
207
|
scaleGrid?: boolean;
|
|
184
208
|
/** @deprecated the name of scaleAxis in older links; still read. */
|