|
pulsatrix 1.1.0
|
Figures and pages for proteins (PLM-5): the mutation map, the sequence logo, the contact map, residue tracks, and a 3D structure colored by any per-residue score. More...
#include <cstdint>#include <string>#include "pulsatrix/viz/html.hpp"#include "pulsatrix/viz/protein_documents.hpp"#include "pulsatrix/viz/svg.hpp"
Go to the source code of this file.
Classes | |
| struct | pulsatrix::ContactMapViewOptions |
| Options for RenderContactMapSvg. More... | |
Namespaces | |
| namespace | pulsatrix |
Functions | |
| std::string | pulsatrix::RenderMutationMapSvg (const MutationMapDocument &doc, const SvgOptions &options={}) |
| A mutation map: a row per letter of the alphabet, a column per residue, each cell colored by its score (diverging, scaled to the largest |score|). The wild type's cell has a dot, and the sequence runs along the top. Unscored cells are gray. | |
| std::string | pulsatrix::RenderSequenceLogoSvg (const SequenceLogoDocument &doc, const SvgOptions &options={}) |
| A sequence logo: at each position, the letters stacked to the position's information content in bits (InformationContent), each as tall as its share, the likeliest on top. Letters are colored by chemistry, as WebLogo does: hydrophobic black, polar green, amide purple, basic blue, acidic red. The sequence's own letters run underneath. | |
| std::string | pulsatrix::RenderContactMapSvg (const ContactMapDocument &doc, const ContactMapViewOptions &view={}, const SvgOptions &options={}) |
A contact map: one square, residue against residue. Above the diagonal, the predicted scores (white to dark blue). Below it, the true contacts in gray, and the L best-scored pairs at least min_separation apart as dots: blue where the structure has a contact, red where it doesn't, hollow where it's unknown. A caption gives the precision at L for those pairs and for long-range ones (24 apart and more), as ContactPrecision computes it. Without a structure, the lower triangle shows the dots alone. | |
| std::string | pulsatrix::RenderResidueTracksSvg (const ResidueTracksDocument &doc, const SvgOptions &options={}) |
| Residue tracks: a ruler and the sequence, then a row of colored cells per track (signed tracks diverging around zero, others Viridis from their minimum or zero), then a row of labeled spans per feature category. Each track has its own scale, shown in a legend. | |
| std::string | pulsatrix::RenderMutationMapHtml (const MutationMapDocument &doc, const HtmlOptions &options={}) |
| std::string | pulsatrix::RenderSequenceLogoHtml (const SequenceLogoDocument &doc, const HtmlOptions &options={}) |
| std::string | pulsatrix::RenderContactMapHtml (const ContactMapDocument &doc, const ContactMapViewOptions &view={}, const HtmlOptions &options={}) |
| std::string | pulsatrix::RenderResidueTracksHtml (const ResidueTracksDocument &doc, const HtmlOptions &options={}) |
| std::string | pulsatrix::RenderStructureHtml (const std::string &structure, const std::string &chain, const ResidueTracksDocument &tracks, const HtmlOptions &options={}) |
A 3D structure, drawn as a cartoon with 3Dmol.js, with the residues of chain colored by one of tracks' tracks at a time (a menu switches between them). Hovering a residue shows its name, number and value. Other chains are light gray, ligands are sticks, and water is hidden. | |
| std::string | pulsatrix::StructurePanelHtml (const std::string &structure, const std::string &chain, const ResidueTracksDocument &tracks, const HtmlOptions &options, const std::string &id) |
RenderStructureHtml's viewer as a fragment to place in any page: the track menu, the legend, the 3D view and its scripts. Its elements' ids start with id, so a page can hold several. | |
| std::string | pulsatrix::RenderFeatureDashboardHtml (const FeatureDashboardDocument &doc, const std::string &structure, const std::string &chain, size_t example, const HtmlOptions &options={}) |
A feature dashboard (RenderFeatureDashboardHtml) with a structure panel (PLM-8): top example example drawn on structure's chain, colored by the feature's activation. The example's tokens must be single residues matching the chain one for one, as an AlphaFold DB model of the protein does. | |
Variables | |
| constexpr const char * | pulsatrix::k3DmolVersion = "2.5.5" |
| The 3Dmol.js version the structure page loads. | |
Figures and pages for proteins (PLM-5): the mutation map, the sequence logo, the contact map, residue tracks, and a 3D structure colored by any per-residue score.
The SVG figures follow svg.hpp's rules: standalone files, deterministic bytes, no font library, and the same colors as every other view (blue below zero, white at zero, red above; Viridis for magnitudes). Long sequences wrap into blocks of positions, numbered as the document numbers them. Each cell or column carries a tooltip (<title>).
The HTML pages hold the same figure inline, with no scripts, so they work offline and in any browser, which shows the tooltips on hover. The structure page is the exception: it draws the 3D structure with 3Dmol.js (BSD-3-Clause), from a CDN or inline.