Documentation style¶
Write for someone predicting MHC-presented peptides, reading prediction tables, and building filtering or ranking workflows. Follow the mhctools writing guide and its quiet typography. The site uses MkDocs with Material.
Structure¶
- The home page introduces Topiary, shows installation and a
short named-peptide prediction and filtering example, explains
value,score, andpercentile_rank, and routes readers to task guides. - Quickstart expands to protein scans, input formats, Ensembl and tissue lookups, multiple models, cached predictions, and whole-peptide models.
- Task guides explain one workflow at a time (CLI, ranking DSL, protein fragments, RNA expression, peptide properties, cleavage evidence, cross-reactivity, external pipeline readers, and combining sources).
- Reference pages (API Reference and Consumer Guide) give complete signatures, columns, and integration contracts.
Use descriptive headings organized around reader tasks. Avoid repeating the sidebar in the page body. Use compact comparison tables with short cells; move long explanations below the table or onto a linked reference page.
Prose and literal syntax¶
Keep scientific qualifications beside the claim they constrain: value,
score, and percentile_rank have distinct scales and directions; missing
values remain missing rather than becoming zeros; serum_half_life and
blood_half_life are distinct from pMHC_stability; and predicted binding or
presentation does not establish T-cell immunogenicity or expression.
Use ordinary text for biological concepts, units, and model or library names; link model and library names on first use in a section and in comparison tables. Reserve inline code for literal API symbols, DSL expressions, column names, flags, values, and commands.
| Use code | Use ordinary text |
|---|---|
TopiaryPredictor, predict_from_named_peptides() |
Topiary, MHCTools, MHCflurry, NetMHCpan |
Affinity <= 500, peptide_view(...), filter_by= |
Binding affinity, presentation, percentile rank, allele |
value, score, percentile_rank, pMHC_affinity |
IC50 in nM, hours, amino acids, sliding window |
topiary --fasta proteins.fasta --mhc-predictor mhcflurry |
Command-line interface, DataFrame, CSV report |
Do not combine bold and inline code styling just to emphasize a column or field name; explain it in a sentence or give it a row in a table.
Examples and presentation¶
Prefer complete, copyable examples with imports and real inputs. State required
predictor installations or Ensembl downloads before running examples. Use the
site's system-font stylesheet (docs/stylesheets/docs.css), readable line
lengths, and restrained headings. Add a callout only when the reader needs a
distinct warning or note to use an example safely. Preserve existing page URLs
and linked heading anchors when reorganizing content.
Checks¶
Before submitting documentation changes, run from the repository root:
mkdocs build --strict validates navigation, internal links, and heading
anchors. Review the built first-run and reference pages with mkdocs serve at
both desktop and narrow widths, checking wide tables and code blocks.