Changelog
Source:NEWS.md
HowMaHiCo 0.28.2
-
01_mhc_overviewno longer shows quality-score metrics that areNAfor every sample (e.g. the depth metrics indefaultthreshold mode, the DIA RT/1/k0 errors for FragPipe/PEAKS,ppmfor DIA-NN): they are dropped from the per-metric heatmap and the raw-metrics table. Display only; scores, composite andscores.csvare unchanged.plot_quality_heatmap()gaineddrop_all_na = TRUE(FALSErestores the previous output).
HowMaHiCo 0.28.1
-
theme_howmahico()now defaults tobase_size = 10(was 8): plot text is larger in every report. -
plot_pseudomobilogram()now defaults tobinwidth = 0.05(was 0.2): finer 1/k0 bins.
HowMaHiCo 0.28.0
-
The focused reports can be run outside a knit.
01_mhc_overview,02_prot_all,03_lcms_qc,04_pepchemand05_quant_statsused to pull their setup in through a knitr child (inst/rmarkdown/shared/setup.Rmd). RStudio’s “Run All” skips child chunks, so a report stepped through at the console stopped at its first real chunk (pep_allnot found), and a change to the child was only seen after reinstalling the package. The setup is now the exportedreport_setup(params, envir), called from an ordinary chunk; same logic, same objects.setup.Rmdis removed. The glossary child stays. - New
report_params(template, ...): a template’s declared parameters with their YAML defaults, overlaid with your values. An undeclared name is an error that lists the valid ones;run_howmahico_report()now checks this before rendering. -
run_howmahico_report()gained anenvirargument (default: a fresh environment, as before), so the objects of a failed render can be inspected:e <- new.env(); try(run_howmahico_report(..., envir = e)); ls(e).
HowMaHiCo 0.27.2
-
summarise_runs()labels each row from its own run’sMHCclass, andplot_run_trend()names both labels (“A / B”) on a panel whose metric the stacked classes label differently. Stacking class-1 and class-2 runs used to give every row the class-1 labels, so a class-2 run’s scoredfrac_nested_coreread “Nested cores (diagnostic)” and its 2+ to 4+ charge metric “Charge 1+/2+”. Values were always correct.
HowMaHiCo 0.27.1
-
01_mhc_overview: the “Total=” labels of the Total by Sample and Total by Condition bar charts are drawn again for small counts (typically Parent proteins).plot_bp_count_length()nudged them by a fixed300 + lim_level / 10, which put them above the y-limit, where ggplot2 silently dropped them; the label now sits just above its bar and the y-axis grows to fit it. -
01_mhc_overview: the peptide-motif logos render as tabs (level-2 headings under the level-1 tabset), and the motif and UpSet loops no longer print a stray$`8`/$Peptideline above each plot (they printed a list slice).
HowMaHiCo 0.27.0
Breaking: the reports are restructured
The focused reports had become too modular, and the one-page 09_overview mostly repeated them. Five reports are merged into one main report, and the others are renumbered (their names are unchanged):
| Before | Now |
|---|---|
01_id_counts, 02_overlaps, 04_quant, 05_quality_score, 09_overview
|
01_mhc_overview |
08_prot_all |
02_prot_all |
03_lcms_qc |
03_lcms_qc |
07_pepchem |
04_pepchem |
06_quant_stats |
05_quant_stats |
-
01_mhc_overviewis the report for both audiences. It opens with At a glance and Red flags (from09_overview), then identification counts, the peptide size distribution, the quality score (composite, per-metric breakdown, raw metrics, cross-class contamination), overlaps, log2(Area) correlation and %CV, motifs and the PTM profile. It ends with “Where to go next”, the scoring method as an appendix, the glossary and the session record. The duplicated parts of09_overviewwere dropped: its ligands-per-sample chart, its length histogram and its copy of the composite plot. The scores and red flags are computed once. - It writes the always-written tier of all five old reports in one go (
pep_all.csv,counts_pep_all_condition.csv,seq_by_condition.xlsx,scores.csv,red_flags.csv) plus<Subset>_01_mhc_overview_input_params.csv. -
Old names keep working.
run_howmahico_report("05_quality_score", ...)and the other pre-0.27.0 names render the report that now holds their content, with a deprecation warning. -
compare_runs()reads*_01_mhc_overview_input_params.csvand, for results written before this release, the old*_05_quality_score_input_params.csv, so old and new runs stack together. - The pipeline script, vignette, README, demo script and pkgdown index use the new names.
00_mhc_reportand00_mhc_upsetsare unchanged.
HowMaHiCo 0.26.1
The clustered heatmap now shows its clusters
-
plot_quant_heatmap(cluster = TRUE)used the clustering only to order the tiles, so no cluster was visible. It now draws the unit dendrogram above a Condition colour bar and the feature dendrogram on the left. It also cuts the features inton_clustersgroups (default 4), separated by white lines and labelledC1(top block) onwards. The feature-to-cluster table comes back asattr(p, "clusters"). -
06_quant_statsgained aHeatmapClustersparam (default 4). WithCsvSave = TRUEit also writesheatmap_clusters.csv. - The clustered view is now a
ggpubr::ggarrange()composite, because the Condition bar and the value gradient both need a fill scale. It therefore stays static whenInteractivePlotsis on. The unclustered view is unchanged and can still be made interactive. No new dependency: the dendrogram segments are computed fromhclustdirectly.
Peptide chemistry (07_pepchem)
-
plot_property_distribution()draws a descriptor that only takes whole-number values (peptideLength) as a histogram, one bar per value, with each Condition summing to 1. A kernel density drew bumps between lengths that cannot occur. Continuous descriptors keep the density curve. - New exported
pepchem_glossary(): what eachpeptide_properties()descriptor measures, how to read it for MHC ligands, and how it is computed. Thefrac_*rows are generated from the residue classes actually used. The shared glossary renders it as a “Physicochemical descriptors” table in07_pepchemonly.
HowMaHiCo 0.26.0
Found by running the EuPA-2026 demonstration (demo/eupa2026_demo.R) on simulated class-1 and class-2 data.
A genuine class-II sample could not pass the quality score
-
The charge-plausibility metric was MHC-I only.
frac_charge_1_2counted 1+/2+ precursors and was scored against the MHC-I cut-offs (green 0.85) for every class. Class-II ligands (12-25-mers) carry more basic residues and come mostly as 2+ to 4+, so a genuine HLA-II sample scored 0 on a weight-1.5 dimension. ForMHCclass = "MHC2"the metric now counts 2+ to 4+, labelled “Charge 2+ to 4+”, with provisional cut-offs (green 0.80, amber 0.60). The metric key is unchanged across classes, as for the mousefrac_9mer. On the simulated class-2 data this moves the composite from 55 to 70.
Charges were read from factor level codes
-
pep_all$Chargeis a factor of labels such as"+ 2", andas.numeric()on a factor returns its level codes. A dataset without any 1+ precursor (common with DIA-NN libraries) therefore had 2+ read as 1+, 3+ as 2+, and so on. This affectedget_charge_group()(the charge plots and tables of00_mhc_report/01_id_counts, and the MHC-I charge score) and, in the PEAKS loader, the charge part ofPeptide_chargeandPeptideID. All of these now go through one internal.charge_number(), which parses the digits from the label. Tests pin the no-1+ case.
Demonstration
- New
demo/eupa2026_demo.R(tracked, not part of the package build) renders the simulated class-1 and class-2 datasets and simulates two controls with MaHiCoInSilico: a tryptic-contamination titration (0 to 100 %) and a class-1 + 25 % class-2 cross-contamination. It then builds the poster panels withcompare_runs()/plot_run_trend(). The data and outputs live in the gitignoredexample/.
HowMaHiCo 0.25.0
A one-page overview report for biologists
The abstract promises “a general-overview report for biologically focused users and another for deeper evaluation by the LC-MS expert”. The expert half existed (03_lcms_qc and the other focused reports), but the overview did not: the closest thing was the ~1300-line all-in-one 00_mhc_report.
-
New template
09_overview(run_howmahico_report("09_overview", ...)), rendered against thepep_allcache like the other focused reports. It has one page with plain-language captions:- an at-a-glance table: samples, Conditions, unique peptides (all / in the length window), source proteins, median quality score, Pass/Warning/Fail counts and the number of red flags;
- ligands per sample, split in/out of the MHC length window;
- whether the lengths look like MHC ligands;
- the composite quality score with its traffic light;
- red flags;
- a “where to go next” table mapping each question to the focused report (01–08) that answers it.
<Subset>_red_flags.csvnext to the input params. -
New
overview_red_flags()turns a score table into a short list ofSample,Severity(High > Medium > Low),FlagandDetail. It flags:- a Fail (High) or Warning (Medium) composite;
- any scored quality dimension past its amber threshold, worded with that dimension’s label (High when its sub-score is 0). This covers cross-class contamination, tryptic background, length fidelity and so on;
- a sample below half the experiment’s median unique-peptide count;
- a Condition with a single BioReplicate.
-
New
qc_samples_from_annotation(): theQCColumnlookup that05_quality_scoreinlined, now shared by 05 and 09. It returns an empty vector for a missing file, an empty column name or an absent column.
HowMaHiCo 0.24.0
Comparing runs
The abstract’s Conclusions claimed cross-experiment comparison, but one render scores one subset and nothing read more than one score table. Now:
-
compare_runs()stacks the per-sample score tables of several05_quality_scorerenders into one long table. It accepts score csvs, results folders (every*scores.csvin them), orscore_sample_quality()data frames. It reads the companion*_05_quality_score_input_params.csvto label each run (SampleSet | Subset) and to attachMHCclass,ThresholdMode,render_timestampandpackage_version. Runs are kept in input order, or ordered by render time withorder = "timestamp"for a longitudinal view. Columns are unioned, so a metric missing from one run isNAthere. It warns when the runs were scored with differentMHCclassorThresholdMode: the class selects the threshold table, and QC-relative thresholds are calibrated per run, so their composite scores are not directly comparable. -
summarise_runs()reports, per run and metric,n, median and IQR, plus the Pass/Warning/Fail counts of each run. -
plot_run_trend()draws one panel per metric (free y), with the runs on the x axis and samples as points (QC samples as triangles). It adds a box per run, or (type = "line") a line through the run medians.color_by = "Condition"colours the points. -
05_quality_score’s exported<Subset>_scores.csvgained aConditioncolumn (additive; existing columns unchanged), so a stacked table can be coloured or filtered by it.
HowMaHiCo 0.23.0
Relicensed: MIT -> GPL (>= 2)
The first Tier-A item of the EuPA-2026 worklist (“open-source R package” must be true as printed). DESCRIPTION declared MIT, but several hard Imports are copyleft, so MIT could not describe the installed work:
-
Peptides,gplotsandggcorrplotare GPL-2 only (no “or later”), -
ggupsetis GPL-3,limma(Suggests) andggpubrare GPL (>= 2).
The worklist only named Peptides and limma; the other three turned up while auditing every dependency. A plain GPL-3 licence – the option originally on the table – would itself have clashed with the three GPL-2-only packages, so HowMaHiCo is now GPL (>= 2), the same terms as R (GPL-2 | GPL-3), which is compatible with each dependency on its own terms. LICENSE.md now holds the GPL-2 text (via usethis::use_gpl_license(2, include_future = TRUE)), the MIT LICENSE stub is gone, and the README gained a License section explaining the choice. No code changes.
HowMaHiCo 0.22.0
PEAKS Xpro actually works now
Verifying the PEAKS claim with a shipped dataset (Tier C’s last item) turned up two bugs that made the documented PEAKS entry point unusable, both silent or cryptic rather than loud:
-
read_peaks_batch()filtered the export FOLDERS by the PER-SAMPLE key. A PEAKS export folder normally holds several samples, oneArea#<sample>column each inside itspeptide.csv, and [read_peaks()] turns those suffixes intoSample_peaks– which is also whatannotate_peaks()joins the metadata on. Filtering folders by that same value therefore matched no folder at all whenever folder and sample names differed (i.e. always, for a multi-sample export): the empty read then died insideparse_peaks()withobject 'Accession' not found. Keying the annotation on the folder instead produced the mirror failure – a silent 0-row join. Folder selection now usesSample_folder(falling back toSample_peaksfor the one-folder-per-sample layout, where the two coincide), and both halves of the trap now fail with an error naming the two keys and showing what was found on each side. -
read_peaks_batch()pasted an absolute path behind the working directory. It calledread_peaks(filedir = getwd(), folder_peaks_db = <indexed path>), so an absoluteFolderData– exactly what the reports document and whatsystem.file()returns – became an unopenable path. It now splits the indexed path withdirname()/basename(), which reconstructs a relative or absolute path unchanged. -
get_annot_peaks()documents that one row per folder is not one row per sample, and what to add by hand for a multi-sample export.
A simulated PEAKS export to test against
-
New
inst/extdata/sim_peaks_xpro/(+sim_peaks_xpro_annotation.csv): the 462 simulated peptides over 6 samples in real PEAKS Xpro shape – one export folder,-10lgP, a1/k0 Rangestring,Area#<sample>columns, a few oxidised methionines written PEAKS-style ((+15.99)on the peptide, the name inPTM). PEAKS was the only engine with no end-to-end fixture, which is why the above went unnoticed. ~61 KB. -
test-loaders-peaks.Rgained the end-to-endbuild_pep_all("peaks_xpro")assertion, a check that folder selection keys onSample_folder, and a check that each half of the key mix-up now errors loudly.
Corrected PTM documentation
- v0.19.0 described PEAKS as writing a bracketed delta mass in
PTM. It does not: PEAKS writes the modification name (Oxidation (M)) and keeps the delta mass in the peptide string.translate_ptm()handled this correctly already – a token with no number falls through unchanged – but the docs, the two report notes and the test comments said otherwise, and are now right. A test pins the pass-through so a PEAKS name can never be mangled into a mass match.
The abstract
-
example/abstract_eupa2026_v3.mdnow names what the code does: motif clarity is attributed to anchor information content for class 1 and nested binding cores for class 2, and the identification-QC sentence distinguishes DDA mass error from DIA retention-time/ion-mobility calibration error.
HowMaHiCo 0.21.0
Interactive plots, on a toggle
-
New param
InteractivePlots(defaultFALSE), declared by all ten templates. WithTRUEthe convertible plots become plotly widgets – hover values, zoom, pan – instead of static images, which is what the reports’ “interactive HTML” claim should mean beyond tabsets and DT tables. -
ggprint_rawr()gained aninteractiveargument returningplotly::ggplotly(input). It keeps the caller-frame name resolution and the not-generated guard, so the 34 call sites that already used it needed one argument each and nothing else. The shared setup (and the two00_*templates, which do not use it) derivesinteractive_plots <- isTRUE(params$InteractivePlots)once. -
Plots inside
results='asis'tabset loops are deliberately left static. An htmlwidget printed from such a loop needs an explicittagList/knit_printdance to get its dependencies attached and otherwise renders empty, with no error – the same reason those loops already usekablerather thanDT. A new test walks every skeleton’s chunks and fails if an asis chunk ever asks for an interactive plot. -
Unconvertible objects are returned unchanged, never converted and never erroring: ggpubr composites (
plot_peplength_dens(),plot_pepmass()), sequence logos, and anything that is already a widget (.ggplotly_incompatible). Asking for interactivity cannot break a report. - The three bare plot prints in
05_quality_scoreand the fourggplotly()calls on the log2(Area) correlation matrices now route through the same helper. The correlation matrices passinteractive = TRUEunconditionally, preserving the always-interactive behaviour they have had since v0.1.
Tests
-
test-sim-fragpipe.Rrenders05_quality_scoreagainst the simulated data with the toggle on and off and asserts that the widget containers and the embedded plotly library are present in one and absent in the other. Rendering is the only way to catch the silent-empty-widget failure – no parse check or unit test can see it. -
test-theme-and-save.Rcovers the conversion, the preserved default, the not-generated guard underinteractive = TRUE, and the pass-through of a ggpubr composite / a non-plot / an object that is already a widget. -
test-report-templates.Rgained the asis-boundary guard above, theInteractivePlotsentry in itscommon_paramslist, and a check that a template usinginteractive_plotsreally derives it.
HowMaHiCo 0.20.0
A motif dimension for MHC class II
-
New metric
frac_nested_coreinqc_metrics_by_sample(), with the internal.nested_core_fraction(). ForMHCclass = "MHC2"bothfrac_9merandanchor_informationareNA– class-II ligands have no fixed-length anchor register – so the quality score had no motif dimension at all for the class the package’s title claims to support. Class-II peptides are trimmed into ragged, length-variable families around one ~9-residue binding core, so this measures the fraction of in-window ligands sharing a 9-mer with another ligand of the same sample. No alignment, register guess, binding predictor or external data is involved. -
quality_thresholds_default("MHC2")promotes it to the anchor metric’s weight- and relabels it “Nested-core families”; for
MHC1/MHC1_mouseit stays a weight-0 diagnostic, since some nesting is normal there but is not the primary signal. Metric keys are identical across classes, as with the mousefrac_9merrewrite. The class-II cut-offs are provisional – preferThresholdMode = "qc_relative".
- and relabels it “Nested-core families”; for
- It is computed on the in-window ligands only, so a long tryptic tail cannot manufacture nesting, and a sequence can never count as nested with itself (one (k-mer, sequence) pair at most, so internal repeats do not register).
Identification QC that works for DIA
-
New metrics
median_abs_rt_errorandmedian_abs_im_error. Mass error is an MS2-level DDA metric: DIA-NN’sPrecursor.Mzis the library value andreport.tsvcarries no observed precursor m/z, so no real ppm can be recovered from it (ppmis a hardcoded dummy, dropped from the score). DIA-NN does report a predicted RT and ion mobility per precursor, and the deviation from them is the DIA analogue – both columns were already carried intopep_allbyparse_diann()and unused until now. - Both are
NAfor FragPipe and PEAKS, which carry no prediction, so they drop out of the composite exactly asppmdrops out for DIA-NN. The internal.median_abs_delta()also returnsNAwhen every difference is 0, so a placeholder column cannot score as perfect accuracy. Their cut-offs are instrument- and gradient-dependent, which the report states. -
05_quality_score’s Methods section documents both substitutions, and its overview text now names them instead of only listing what drops out.
Tests
-
test-quality-score.Rgained the nested-core maths (shared cores, the internal-repeat trap, theNAcases), the per-class threshold promotion, the.median_abs_delta()guards, calibration metrics with and without predictions, and a guard that every scored threshold row exists in the metrics table for every MHC class – a mismatch there would abort the whole report insidescore_sample_quality()’s composite step.
HowMaHiCo 0.19.0
Readable PTM names
-
New
R/ptm.R:ptm_reference()+translate_ptm(). ThePTMcolumn is written differently by every search engine – DIA-NN stores UniMod accessions ((UniMod:35)), FragPipe a delta mass behind a position+residue prefix (2M(15.9949)), PEAKS a signed delta mass rounded to two decimals ([+15.99]) – so the PTM heatmaps showed three unrelated-looking labels for what is one modification, and a UniMod-only translation would have been a silent no-op on the project’s default FragPipe data.translate_ptm()handles all three dialects in one pass and returnsOxidationfor each. -
plot_ptm_heatmap()gainedtranslate = TRUE(and areferencepass-through), applied where the multi-PTM strings are already split into one token per row so both the count and the proportion branch inherit it.translate = FALSErestores the raw engine tokens. Display-time only:pep_all$PTMkeeps the raw value, as with the v0.12.0 “data keys unchanged” renames. - Unmatched tokens are returned unchanged rather than becoming
NA, so an unknown modification stays visible on the heatmap.ptm_reference()is ordered by how commonly each modification occurs, because a few are mass-degenerate (Glu->pyro-Glu/Dehydrated,Gln->pyro-Glu/Ammonia-loss) and the first row within tolerance wins; pass a reordered copy to change that preference. -
Fixed a factually wrong note in
00_mhc_reportand01_id_counts, which told the reader that “Fragpipe and DIA-NN” numbers are UniMod codes. FragPipe and PEAKS report delta masses; only DIA-NN reports UniMod.
One glossary, generated from one function
-
New
pep_all_glossary()(R/report-helpers.R) documents all 30 corepep_allcolumns, including the caveats that are easy to misread: DIA-NN’sppmis a hardcoded dummy, itsMassis computed rather than observed,Accessionis a protein group only for DIA-NN and PEAKS, andScoreis not comparable across engines. -
New shared child
inst/rmarkdown/shared/glossary.Rmd, included by all ten templates ahead of their “Session & provenance” footer. It explains the counting units (peptides vs sequences vs parent proteins vs selected) with the length window interpolated fromshortpep_range, then renderspep_all_glossary()as a table. - This replaces the hardcoded glossary prose in
00_mhc_report, which had gone stale – it stated a 12-20 AA MHC-II window (the actual window is 12-25) and named3_results/4_figuresregardless of the run’s actual path params. The README gained the same table under a new “Glossary” heading, closing the standby item for it.
Tests
- New
tests/testthat/test-ptm.R: all three token dialects, the tolerance that still separates Acetyl (42.010565) from Trimethyl (42.046950), PEAKS’ 2-decimal rounding, pass-through of unknown tokens/NA/"", the reference-order rule for mass-degenerate modifications, and aplot_ptm_heatmap(translate = TRUE/FALSE)assertion on the plot data. -
test-report-helpers.Rgained two glossary guards: every columnvalidate_pep_all()requires must be documented, and so must every column the reports consume from a realbuild_pep_all()run on the shipped sim data.
HowMaHiCo 0.18.0
Protein-level table and report
-
New
08_prot_allreport andR/prot-all.Rengine. Every other report is peptide-centric; protein information existed only asn_Proteinscolumns inside the ID-count tables and two protein x sample log2 matrices written underCsvSave.build_prot_all()now condensespep_allto one row per (protein,Sample): ligands contributed, summed intensity, unique-peptide counts, and the protein annotation. It is written to<Subset>_prot_all.csvon every run. -
Areais summed on the linear scale within a sample and log2’d afterwards, asbuild_quant_matrix()does. Note the older protein matrices in00_mhc_report/04_quanttake a different route —get_mat_log2area()averagesLog2Area— so those numbers are not comparable with these. -
The protein key is a parameter, because
Accessionis a protein group only for DIA-NN (a;-list) and PEAKS (a:-list) — FragPipe puts a singlesp|ID|ENTRYstring there.ProteinFeatureacceptsProteinFirst(default),GeneFirstorAccession. -
MultiMappingchooses how a shared ligand is counted. A short non-tryptic HLA peptide often maps to several proteins and neither convention is right:"leading"(default) counts it once so per-protein counts still reconcile with the peptide count,"all"counts it for every candidate.expand_mapped_proteins()resolves the engine-specific mapped-protein column (FragPipeMapped_Proteins, DIA-NN/PEAKSAccession, each with its own separator) by dispatching onFound_By, and warns and falls back to leading when the table carries no such list. -
n_Peptides_uniquefinally usesIs_Unique(FragPipe) andProteotypic(DIA-NN) — both have been carried intopep_allsince the loaders were written and were never read. - New exports:
build_prot_all(),summarise_prot_all(),top_source_proteins(),expand_mapped_proteins(),prot_engine_columns(),diann_protein_columns(), plusplot_proteins_per_sample(),plot_peptides_per_protein(),plot_top_proteins(),plot_protein_detection()andplot_ligand_vs_protein_quant().
Protein data the search engine already reported
-
DIA-NN’s protein-group quantities and q-values are now carried through rather than only recomputed from peptides.
PG.MaxLFQ,PG.Quantity,Genes.MaxLFQ,PG.Q.Valueand relatives have been sitting inpep_allunused;prot_engine_columns()finds whichever are present andbuild_prot_all()carries them by a unique-within-group rule — a value that genuinely varies within a group (which happens legitimately when grouping byGeneFirst) becomesNAand is counted in an attribute, never averaged or silently first-picked. -
plot_ligand_vs_protein_quant()plots summed ligandAreaagainst the engine’s own protein quantity with a Spearman correlation. A weak correlation is the expected result: HLA presentation is shaped by processing and binding, so the plot shows the report’s central caveat instead of only asserting it. -
Fixed:
parse_diann()could drop protein quantities, or refuse to parse at all. Itsselect()was a bare-name whitelist of ~45 columns, so a report missing any one of them errored, and newer DIA-NN releases — which renamed these fields (PG.QuantitytoPG.Abundance,PG.NormalisedtoPG.NormalisedAbundance) — had their protein quantities silently discarded before reachingpep_all. The protein/gene-level names now go throughdplyr::any_of(diann_protein_columns()), so either naming generation survives. - FragPipe’s
psm.tsvreports no protein quantity (it lives inprotein.tsv, which this package does not read) and PEAKS’ peptide export reports none, so the report’s search-engine section degrades to a note naming what does report it.
Scope and caveats
The report is deliberately descriptive — no differential testing, since 06_quant_stats already accepts QuantFeature = "ProteinFirst" — and carries a Methods section stating that summed ligand intensity is not protein abundance, that there is no length normalisation (which needs the search FASTA, still deferred), that protein inference is weak for short non-tryptic peptides, and that its protein count need not match 01_id_counts, which counts n_distinct(Accession).
Also
- Fixed:
docs/was missing from.Rbuildignore, soR CMD checkraised a “non-standard file/directory found at top level” note for anyone who had built the pkgdown site locally. -
tests/testthat/test-prot-all.Rcovers the aggregation rules on hand-built fixtures — the shipped simulated dataset has a blankMapped Proteinscolumn in every row and themake_diann_report_raw()helper sets everyPG.*column toNA, so neither multi-mapping nor the engine passthrough can be exercised against them. Two render tests cover08_prot_allend to end, including thatMultiMapping = "all"degrades cleanly when nothing is mapped.
HowMaHiCo 0.17.0
Reports are no longer branded to one platform
-
New optional
Providerreport param, declared by all nine templates. The header attribution used to be hardcoded into every skeleton (“provided by the Immunopeptidomics Platform (IPP)”), along with a personal@dkfz.decontact block and a**Code author:** DGZline in the two00_*reports — so every report rendered by anyone was attributed to one lab. The attribution is now rendered from the param by the new exportedprovider_line()(R/report-helpers.R), which returns a generic sentence naming no organisation whenProvideris empty (the default). - The helper is called namespaced,
`r HowMaHiCo::provider_line(params$Provider)`: in00_mhc_reportand00_mhc_upsetsthe header sits above their inline setup chunk, so the package is not attached when the inline expression evaluates. -
00_mhc_upsetsgained the description and**Code version:**lines it was missing — the nine headers are now uniform for the first time.
A runnable on-ramp
-
New
inst/scripts/howmahico_pipeline.R+ exportedget_pipeline_script()— a commented walkthrough from raw search output to rendered reports, copied into the working directory the same wayget_report_template()andget_dictionary_template()hand out their files. It renders throughrun_howmahico_report()rather than asking the reader to open a template and knit it by hand. - It starts in demo mode: sourced as-is it runs the whole pipeline against the simulated dataset in
inst/extdata/sim_fragpipe_dda, so a fresh install can be exercised before any real data is involved. -
The package’s first vignette (
vignettes/howmahico.Rmd,VignetteBuilder: knitr) narrates the same walkthrough and gives the pkgdown site an Articles tab. Its pipeline chunks areeval = FALSE, but the annotation/build_pep_all()section really runs against the simulated data, so the article cannot silently rot.
README
-
Fixed: the headline
run_howmahico_report()example could not be run. It passedTitle = ..., which no template declares, andrmarkdownerrors on an undeclared param ("render params not declared in YAML") — so copy-pasting the primary documented entry point failed outright. - Added a Quickstart, a table of what each of the nine reports produces, a full parameter reference (common, focused-only, and the per-report sets for
05,06and07), an output section naming the always-written files and theCsvSave/PlotsSavetiers, and a troubleshooting table. Users are no longer sent toCLAUDE.md, which is maintainer-facing. - Corrected stale claims:
07_pepchemwas missing from every template list, “mid-conversion, on thedevbranch”, “~40 functions” (there are 118 exports), the numbered project folders presented as repository contents, and RStudio listed as a requirement rather than pandoc.
Guards
-
test-report-templates.Rnow checks that every shipped template declares the common param set, and that no template hardcodes an organisation, author or contact address. A param added to eight of nine templates is not a soft failure:render()stops outright when a caller passes a param the template does not declare. -
test-get-pipeline-script.Rcovers the copy/overwrite behaviour,parse()s the shipped script so it cannot rot into a syntax error, and asserts every template name it mentions is still offered byrun_howmahico_report(). -
test-sim-fragpipe.Rrenders with and withoutProviderand checks the rendered HTML in both directions — a declared-but-unused param would otherwise pass a YAML-only check while changing nothing.
HowMaHiCo 0.16.1
-
Fixed: the pkgdown site had not deployed since v0.8.0. pkgdown aborts the whole build when an exported function is missing from the
_pkgdown.ymlreference index, and three release cycles (v0.9.0-v0.13.0) added exports without indexing them: the dictionary-driven parser family (parse_unified(),read_dictionary(),read_custom_batch(),annotate_unified(),get_dictionary_template()), the quality-score engine (score_sample_quality()and friends, plusplot_quality_heatmap(),plot_quality_composite(),plot_cross_class_length()) andplot_pseudomobilogram(). All 15 are now indexed, in two new reference sections plus one insertion. -
New guard
tests/testthat/test-pkgdown-index.R.devtools::check()never reads_pkgdown.yml, and the pkgdown workflow only runs onmaster, so the failure could only be discovered after a merge. The suite now checks that everygetNamespaceExports()entry appears in the index, that no index entry names a function that is not exported (a rename or removal breaks the build the same way), and that nothing is listed twice._pkgdown.ymlis.Rbuildignored, so the test locates it by walking up from the test directory and skips when no source tree is reachable.
HowMaHiCo 0.16.0
-
New report
07_pepchem+ engineR/pepchem.R: peptide physicochemical properties compared between Conditions. Where the other reports describe which peptides were found, this one describes what they are made of: amino-acid composition (overall, per sample, and as log2 enrichment against the pooled composition of the subset), per-position residue frequency at the dominant peptide length plus an N-/C-terminal profile resolved across all lengths, and per-peptide descriptors —GRAVY,pI, netCharge,MW,Boman,HydrophobicMoment,InstabilityIndex,AliphaticIndexand the amino-acid class fractions. -
The unit of analysis is the sample, not the peptide. Descriptors are computed once over the unique sequences and attached to each sample that identified them; each sample is summarised first (
pepchem_by_sample()->summarise_pepchem()->aggregate_pepchem()) and Conditions are then compared across samples. Peptides within a Condition are not independent replicates, so pooling them would return enormous nominal significance for effects carried by one sample. -
Two comparison tracks, both labelled.
compare_pepchem(level = "sample")is the primary, replicate-respecting test (Kruskal-Wallis + pairwise Wilcoxon, BH-corrected within each contrast, withMedianDiffand the new scale-freecliffs_delta()as effect sizes) — and is deliberately low-powered: on 3 vs 3 samples a two-sided Wilcoxon cannot reach p < 0.1, the same structural limit06_quant_statsdocuments for its Fisher track.level = "peptide"pools the repertoire and is reported alongside as explicitly descriptive.compare_aa_frequency()applies the same machinery per residue to per-sample frequencies rather than a chi-square on pooled residue counts. - New exports:
peptide_properties(),pepchem_properties(),aa_composition(),aa_position_frequency(),pepchem_by_sample(),summarise_pepchem(),aggregate_pepchem(),cliffs_delta(),compare_pepchem(),compare_aa_frequency(), plusplot_aa_composition(),plot_aa_position_heatmap(),plot_property_distribution(),plot_property_sample_summary()andplot_property_effectsize()inR/plots.R. -
aa_position_frequency()generalises the per-position frequency table thatanchor_information_content()collapses to Shannon bits, and the two now share the alphabet and the negative-position helper (-1= C-terminus) instead of keeping duplicate copies. -
New dependency:
Peptides(CRAN, GPL-2, Rcpp only) inImports— it is vectorised and is the canonical implementation of GRAVY (mean Kyte-Doolittle), so the scales are not re-derived.Peptides::aaComp()is not used (it returns a per-sequence list); the class fractions are derived from the composition matrix. Its per-descriptor “unrecognized amino acid types” warnings are consolidated into onepeptide_properties()warning naming the count. - Peptide position within the parent protein — the third part of the original request — is deferred; no loader carries a position column, so it needs a user-supplied search FASTA. The design is recorded under Deferred designs in
CLAUDE.md.
Fixes found while verifying the new report
-
Fixed:
PlotsSave = TRUEnever saved anything, andggprint_rawr()silently dropped plots. Both helpers resolved the plot name with a bareexists(deparse(substitute(input))), which searches from the helper’s own frame outwards through its lexical parents — the HowMaHiCo namespace, thenglobalenv()— and so never reaches a report’s knit environment (rmarkdown::render()knits innew.env(parent = globalenv())). Every lookup from a report therefore failed:ggsave_rawr()warned and wrote no png, andggprint_rawr()returned the warning string instead of the plot, whichwarning = FALSEchunks then swallowed. The name is now resolved in the calling frame via the shared internal.plot_was_built(), and a non-symbol argument (plots[[nm]], the export-loop idiom used by06and07) is evaluated and judged by value, so aNULLplot is skipped rather than saved. On the simulated dataset07_pepchemgoes from 8 to 14 figures and from 0 to 14 saved pngs;04_quant,05_quality_scoreand06_quant_statsrecover theirPlotsSaveoutput too. -
Fixed:
05_quality_scorecould not render at all. An inline`r ...`expression ended in a bare comma-separated string list (else "a ", "<code>", params$QCColumn, "</code> b") instead of apaste0()call — a syntax error, so the template aborted at the inline-parse stage. The report had never rendered and nothing caught it, because the suite only rendered01and06;test-sim-fragpipe.Rnow carries a render guard for05(which also asserts thatPlotsSavewrites files and that figures reach the HTML).
HowMaHiCo 0.15.0
-
Mouse MHC-I support.
MHCclassaccepts a new value"MHC1_mouse"(7-11 AAs, the murine H-2 ligand window) alongside"MHC1"(8-13) and"MHC2"(12-25). The windows and their palettes now come from two exported helpers,mhc_length_window()andmhc_class_palette()(R/report-helpers.R), instead of three copy-pasted lists in the skeletons and a fourth inside the quality-score engine. -
Quality score is mouse-aware: for
"MHC1_mouse"the canonical-length metric counts 8- and 9-mers (H-2Kb favours 8-mers, H-2Db 9-mers) with the label “8/9-mer fraction” and raised green/amber cut-offs (quality_thresholds_default()gained anmhcclassargument); the anchor motif is scored on whichever of the two lengths the sample has more of; the cross-class window follows the 7-11 window. The metric keys are unchanged. -
Fixed: a single-Condition subset aborted every report.
combn(conditions, 2)errors withn < m; the new exportedcondition_pairs()returns an empty list instead (andself = TRUEgives the overlap matrix its diagonal), and the skeletons use it. Guarded by an end-to-end single-Condition render test. -
Fixed: an all-zero
Areadataset aborted the render.get_mat_log2area()now returns a well-formed0 x nmatrix with a warning when every ID is a phantom, and the correlation chunks of04_quant/00_mhc_reporttest for that before callingcor()(which errors with'x' is empty) and before computing the colour limits. -
TestModenow builds a representative minimal dataset. It used to read only the first ~100 lines of each file, which for a combined FragPipepsm.tsv(one file holding every run) kept just the first run and broke the annotation join. Files are now read in full and reduced to ~100 rows per run, so every run, Condition and replicate survives. The misleading “only the first 50 lines were loaded” warning is gone. -
One annotation format for every search engine.
read_annot()accepts a canonicalSample_foldercolumn and derives the loader-facing aliases from it (Sample_fpverbatim,Sample_peakswith PEAKS’ hyphen/space normalization). Legacy tables providingSample_fporSample_peaksload unchanged, and a user-supplied alias is never overwritten.get_annot_fragpipe()/get_annot_diann()now emitSample_folderinstead ofSample_fp(user-visible change to the generated skeleton), and PEAKS finally has a generator of its own:get_annot_peaks(). -
get_annot_sampleid()no longer fails silently: it warns when nothing matched the sample list (showing exampleSource_filevalues from both sides) and when only some rows matched (naming the dropped ones), and gainedkeep_all = TRUEto left-join so no annotation row is lost. - New tests:
test-report-helpers.R; all-zero-Areacoverage intest-counting.R;Sample_folder/get_annot_peaks()/get_annot_sampleid()coverage intest-annotation.R; mouse metrics intest-quality-score.R; per-run test-mode subsampling intest-loaders-fragpipe.R; single-Condition and mouse-window end-to-end renders intest-sim-fragpipe.R.
HowMaHiCo 0.14.0
-
New advanced-quantification report
06_quant_statsand its engineR/quant-stats.R: multivariate and differential statistical comparison of peptideAreabetween Conditions, rendered against the cachedpep_alllike the other focused reports. Sections: quantitative matrix and filtering summary, data completeness (per unit / per feature / presence-absence map), normalization diagnostics, dynamic range, optional imputation diagnostics, unsupervised overview (PCA scores/scree/loadings, clustered and unclustered heatmaps, PERMANOVA-style permutation test), per-contrast differential abundance (volcano, MA, p-value histogram, top-feature table), a presence/absence section for condition-exclusive ligands, a significance summary, and a “Methods & justification” section documenting every choice. -
New exported engine functions:
build_quant_matrix()(longpep_all-> feature x unit log2 matrix;Areasummed over precursors on the linear scale, technical replicates averaged),filter_quant(),normalize_quant(),impute_quant(),test_differential(),test_detection(),combine_quant_results(),summarise_significant(),permanova_condition(). -
New plots:
plot_completeness(),plot_missing_heatmap(),plot_intensity_dist(),plot_dynamic_range(),plot_pca(),plot_quant_heatmap()(clustered/unclustered, ggplot2 — printable inside a tabset, unlike the png-writingplot_heatmap()),plot_volcano(),plot_ma(),plot_pvalue_hist(),plot_sig_summary(). -
Two complementary missing-value tracks. limma moderated t-statistics (
eBayes(trend = TRUE, robust = TRUE)) on the observed values, optionally after left-censored imputation (minprob/mindet), plus a Fisher exact test on detection counts for condition-exclusive features, whose fold change is undefined. Exclusivity is flagged by a detection-count rule rather than an FDR cut-off, because a 3-vs-3 Fisher test cannot go below p = 0.1. -
limmais aSuggestsdependency, not anImports: it is guarded at runtime (with aBiocManager::install("limma")message) andStatMethod = "ttest"/NormMethod = "median"give a fully Bioconductor-free path, which the report falls back to automatically. -
Fixed:
run_howmahico_report("05_quality_score")was unreachable — the template was documented but missing from the function’stemplatechoices, somatch.arg()rejected it. Both05_quality_scoreand06_quant_statsare now registered, andtests/testthat/test-report-templates.Rguards that every shipped template directory appears in the choices. -
tests/testthat/test-quant-stats.Rcovers the engine (aggregation, filtering, normalization, imputation, limma/t-test agreement, detection test, PERMANOVA, the limma guard);test-sim-fragpipe.Rrenders06_quant_statsend-to-end against the simulated FragPipe dataset.
HowMaHiCo 0.13.0
-
Pseudochromatogram coloured by density.
plot_pseudochromatogram()now fills the RT bars by their own peptide count (continuous viridis gradient) instead of a flat per-Condition colour, so dense RT regions stand out within each facet. -
New
plot_pseudomobilogram()— ion-mobility analogue of the pseudochromatogram: per-Condition peptide count vsinvk0(1/k0), binned by a configurablebinwidth(default0.2), bars coloured by count. Wired into the03_lcms_qcRT/1k0/mz view config (new “Pseudomobilograms” tab) and the00_mhc_reportdistribution section (all / selected peptides). -
Charge-proportion bars now carry a black outline (
plot_charge_proportions()), matching the other stacked bar charts. -
Peptide motifs extended to the 7–25 AA window (was capped at 24); section retitled “Peptide motifs (7 to 25 AAs)” in
01_id_countsand00_mhc_report. -
Subset prefix on all result files. The focused reports’ shared
setup.Rmd(and the two00_*reports) now derive aresult_prefix(= Subset, orNULLwhen unset) and pass it to everywrite.csv_rawr()/write_input_params()call and theseq_by_condition.xlsxwrite, so result filenames carry the subset (e.g.dda_all_pep_all.csv).input_paramscombines the subset with the report name to stay collision-free within a shared subset subfolder. -
tests/testthat/test-plots.R: smoke coverage forplot_pseudochromatogram()andplot_pseudomobilogram()(incl. a custombinwidth).
HowMaHiCo 0.12.0
-
01_id_counts: new Average +/- sd per BioReplicate section mirroring the per-Condition one (mean ± SD across the TechReplicate samples within each BioReplicate).plot_count_mean_sd()gains agroup_varargument (default"Condition"; pass"BioReplicate") controlling the x-axis/fill. -
01_id_counts: Proportion by length is now its own top-level section with Condition / BioReplicate / Sample tabs (was two nested subsections under the Total-by-Condition / Total-by-Sample sections). -
02_overlaps: new Overlap intra-Condition (%) section showing the replicate-overlap bars as a per-Condition percentage (stacked to 100%).plot_overlap_intra_condition()gains avalueargument ("count"default, or"percent"). - Report headers reading “Selected peptides” now show the active length window (e.g. “Selected peptides (8 to 13 AAs)”), derived from
shortpep_range, across the focused templates. - Renamed the “Proteins” ID-level headers/labels to “Parent proteins” in the focused
01_id_counts/02_overlapsreports (display only; the data keys and plot axis labels are unchanged). -
tests/testthat/test-plots.R: smoke coverage forplot_count_mean_sd()(bothgroup_varmodes) andplot_overlap_intra_condition(value = "percent").
HowMaHiCo 0.11.0
- Added a cross-class (MHC1↔︎MHC2) contamination dimension to the quality score:
frac_cross_classflags MHC-II ligands co-enriched in an MHC-I pulldown (and vice versa) via their length signature — the fraction of peptides in the other class’s canonical window (MHC1 8-13, MHC2 12-25) that falls outside the current window (so the 12-13 AA overlap is handled cleanly). Scoredlower_betterat low weight (a small tail is biologically normal) andNA(dropped) for custom length windows. New internal helper.cross_class_range()is the single source of truth for the windows. - New plot
plot_cross_class_length(): per-sample faceted length histogram with the cross-class region highlighted, and a matching “Cross-class contamination” section + Methods bullet in the05_quality_scorereport. -
tests/testthat/test-quality-score.R: covers.cross_class_range(), the newquality_thresholds_default()row, andfrac_cross_classon an inline fixture.
HowMaHiCo 0.10.0
- Added a per-sample immunopeptidomics quality score (inspired by the author’s HowDirty contamination score, but inverted: it scores how strongly a sample resembles a real HLA immunopeptidome rather than its contaminant load). New scoring engine in
R/quality-score.R, all from thepep_allschema with no external data and no new dependency. - New exports:
score_sample_quality()(per-sample composite + traffic-light category),qc_metrics_by_sample()(raw signals: length-window fidelity, 9-mer dominance, anchor-motif clarity, non-tryptic specificity, charge plausibility, depth, mass accuracy),anchor_information_content(),score_curve(),quality_thresholds_default(),calibrate_thresholds_from_qc(), plus plotsplot_quality_heatmap()andplot_quality_composite(). - The non-tryptic signal is deliberately low-weight and split: because some HLA-I alleles legitimately use K/R as a C-terminal anchor, the overall C-terminal K/R fraction is a low-weight diagnostic, while the scored metric isolates tryptic background in the out-of-window (long-peptide) tail.
- Thresholds use built-in literature defaults or are calibrated from samples tagged as experiment QC controls via an optional annotation
QCcolumn (ThresholdMode = "qc_relative") — no external benchmark dataset needed. Undefined dimensions (e.g. MHC-II anchors, DIA-NN dummyppm) drop out of the weighted composite rather than penalising the sample. - New focused report template
05_quality_score(inst/rmarkdown/templates/05_quality_score/): traffic-light overview, composite bar chart, per-metric breakdown and a self-documenting Methods section, rendered against the cachedpep_alllike the other focused reports. -
tests/testthat/test-quality-score.R: pure-math boundary checks ofscore_curve()(no synthetic peptide data required).
HowMaHiCo 0.9.0
- Added a dictionary-driven unified parser so a tabular search-engine export from a tool HowMaHiCo has no built-in loader for can be ingested by editing a YAML dictionary — no R coding, no new loader. New
build_pep_all()branchsoftware = "custom"(with adictionaryargument) routes throughread_custom_batch()→parse_unified()→annotate_unified(). The dictionary maps raw →pep_allcolumns, sets theFound_Byconstant, and derives the shared recipe (Log2Area,Length_range,Nter/Cter,PeptideID,Chargeformatting); per-tool transforms (unit conversions, regex extraction, accession splitting) are pre-clean responsibilities, not expressed in the dictionary. - New exports:
read_dictionary(),parse_unified(),read_custom_batch(),annotate_unified(), andget_dictionary_template()(copies a fill-in template to the working dir, sibling ofget_report_template()). - Shipped reference dictionaries in
inst/extdata/dictionaries/(custom_template.yaml+fragpipe.yaml/diann.yaml/peaks.yamldocumenting the directly-mappable subset of each built-in loader). The three built-in loaders are unchanged. -
tests/testthat/test-parse-unified.R: assertsparse_unified()reproduces the built-in FragPipe loader on the directly-mappable columns of the simulated dataset, plus dictionary validation and the custombuild_pep_all()path. - New dependency:
yaml(already transitive viarmarkdown).
HowMaHiCo 0.8.0
- The four focused reports (
01_id_counts,02_overlaps,03_lcms_qc,04_quant) gained aPepAllSourceparam (withPepAllFile) selecting how to obtainpep_all:"cached"(default — load the<Subset>_pep_all.rdacache, the prior behavior),"rda"(load an explicit.rda), or"build"(parse the raw search output viabuild_pep_all()and write the cache). A focused report can now be rendered straight from results without a separatebuild_pep_all()call. Backward compatible — the default reproduces the old behavior. - Added a simulated FragPipe dataset (
inst/extdata/sim_fragpipe_dda/, 2 Conditions x 3 BioReplicates, generated with MaHiCoInSilico) andtests/testthat/test-sim-fragpipe.R: abuild_pep_all()loader assertion plus the first end-to-end render test of a focused report (gated onskip_on_cran()/ pandoc). Moving the data out ofdata/intoinst/extdata/also clears the R CMD check warnings about non-R files indata/.
HowMaHiCo 0.7.1
- Fixed a “Duplicate chunk label ‘setup’” parse error that aborted every focused report (
01_id_counts,02_overlaps,03_lcms_qc,04_quant). The sharedinst/rmarkdown/shared/setup.Rmdhad a fenced r-chunk example inside its leading HTML comment; knitr parses chunk headers even inside comments, so that example re-included the file and duplicated thesetupchunk. The comment now describes the include in prose, and a regression test guards against reintroducing a chunk fence there. (The two all-in-one reports were unaffected.)
HowMaHiCo 0.7.0
-
Breaking: renumbered all report templates. The
template=value passed torun_howmahico_report()/get_report_template()changes:01_mhc_report→00_mhc_report,02_mhc_upsets→00_mhc_upsets,03_id_counts→01_id_counts,04_overlaps→02_overlaps,05_lcms_qc→03_lcms_qc,06_quant→04_quant. The two all-in-one reports take the00_prefix; the focused reports fill01–04. - The LC-MS report’s “Peptide ID distribution across RT, 1/k0 and m/z” section is now generated by a single looped
results='asis'chunk (a config list of the four views × the all/selected peptide sets) instead of eight hand-written chunks, matching the looped style of the motif / overlap sections.
HowMaHiCo 0.6.1
- Moved the PTM profile from
05_lcms_qcto03_id_counts(it is a general identification property, alongside peptide motifs), and extended it to show all peptides (pep_all) in addition to the selected-length peptides (pep_short), in an All / Selected tabset — matching the other dual sections.05_lcms_qcnow covers only the RT/1k0/mz distributions and Score/ppm QC.
HowMaHiCo 0.6.0
Multi-report framework
- New exported
build_pep_all()extracts the raw-file parsing step (the FragPipe / DIA-NN / PEAKS read → parse → annotate dispatch) into a standalone, unit-tested function that writes the<Subset>_pep_all.rdacache. Run it once, then render any of the focused reports against that cache instead of re-parsing the raw search files per report. - Four new focused report templates, each a slice of the all-in-one
01_mhc_report, rendered the same way viarun_howmahico_report():-
03_id_counts— total IDs, identification counts (mean±sd, by length, by charge, by sample), peptide size distributions, peptide motifs. -
04_overlaps— intra-Condition replicate overlap, UpSet across Conditions, and Condition pairwise overlap. -
05_lcms_qc— RT / 1k0 / m/z distributions, Score and mass-error identification QC, and the PTM profile (advanced LC-MS QC). -
06_quant— log2(Area) correlation and Area %CV violins.
-
- The focused reports share one setup fragment (
inst/rmarkdown/shared/setup.Rmd, pulled in via a knitrchild) that loads the cache and derives the common objects, instead of duplicating the boilerplate in every skeleton. -
01_mhc_reportand02_mhc_upsetsare unchanged — full retrocompatibility.
HowMaHiCo 0.5.0
Report: per-length splits for the overlap and charge sections
-
plot_overlap_intra_condition()now returns a single replicate-overlap bar chart for one data frame and one ID level, instead of stacking all-vs-selected peptides into a two-rowggpubr::ggarrange(). Breaking signature change: the arguments are now(df, id_col, title = NULL, shortpep_range)(previously(pep_all, pep_short, id_col, shortpep_range)). The main report’s “Overlap intra-Condition” section now presents All peptides and Selected peptides as separate nested tabsets (Peptides / Sequences / Proteins), matching the “Average +/- sd” section. - The “Peptides identified per charge +1 to +4” section now renders a plot for the selected-length peptides (
pep_short) alongside the all-peptides plot, in an All peptides / Selected peptides tabset. The selected-length plot is also written out whenPlotsSave = TRUE.
HowMaHiCo 0.4.0
Loader consistency & portability
- Unified
Log2Areazero-handling across all three loaders: a zeroArea/Intensitynow maps toNAeverywhere. Previously FragPipe and DIA-NN mapped it to1while PEAKS mapped it toNA, so the same zero-area row behaved differently depending on the search engine. This changes FragPipe/DIA-NN output for zero-area rows — they no longer carry a fabricatedLog2Area = 1. The shared logic now lives in an internalcompute_log2area()helper. - Run-name extraction (DIA-NN
File.Name, Bruker HyStarResult.Path) is now separator-agnostic via an internalextract_run_name()helper, replacing a backslash-anchored regex that only worked on Windows-style paths. The loaders are now portable to Linux/macOS (and Docker). - Each
parse_*()validates its output against the corepep_allschema (validate_pep_all()), so a loader that drops/renames a core column or returns an empty table fails loudly at the source instead of producing a half-broken report several sections later.
Report robustness & provenance
- The main report (
01_mhc_report) no longer aborts on partial subsets: the UpSet sections skip gracefully when fewer than two Conditions are present, and the Area %CV sections render an explanatory note instead of erroring when no replicates exist. - Both report templates gained a “Session & provenance” footer: the run parameters as a table, the package version, and a collapsible
sessionInfo(), so a saved HTML is self-documenting. - Declared the previously-undeclared
DataAcquisitionNamesparameter in the02_mhc_upsetstemplate (it was referenced in the header but never defined in the YAML, so it rendered blank).
HowMaHiCo 0.3.0
Packaging & best-practices cleanup
- Declared the previously-undeclared base-package dependencies (
grDevices,graphics,stats,utils) inDESCRIPTIONImports. - The full exported function set is now part of the public reference: removed
@keywords internalfrom every exported function (the package-overview page and the non-exported helpers stay internal), and listed every export in_pkgdown.yml. - All package R code — both the
R/source and the two report templates (inst/rmarkdown/templates/*/skeleton/skeleton.Rmd) — now uses the native R pipe (|>) throughout instead of magrittr%>%. This raises the minimum R version to 4.1.0 (Depends: R (>= 4.1.0)). - De-vendored
get_dirs_index_peaks(): the helper (originally adapted fromdeltaProtR) is now native HowMaHiCo code inR/loaders-peaks-dirs.R(wasR/vendored-deltaprotr.R). - Added this
NEWS.mdchangelog.
Bug fixes
-
check_file_exists()now names the conflicting file in its error/warning message (the filename was previously printed afterstop(), so it never appeared). -
check_output_exists()no longer listsupset_table_prot.csvtwice. - The log2(Area) heatmap “saved in” message now reports the actual output path instead of a hardcoded
4_figures/...string.
HowMaHiCo 0.2.1
- Peptide motifs (seqlogo) now shown up to length 24 (was 22).
- Identification counts “Average ± sd” split into per-length individual plots and nested tabsets, with all-peptides vs selected-peptides shown separately.
- “Peptide ID distribution across RT, 1/k0 and m/z” refactored out of the template into
plot_pseudochromatogram()andplot_2d_distribution(). - Replaced hardcoded
scale_y_continuous()breaks/labels withn.breaks = 5inplot_bp_count_length(),plot_count_mean_sd(), andplot_overlap_intra_condition(). - Homogenized bar
alpha = 0.7and added black outlines across plot functions. - Fixed
count_ids_condition_bylengthrange()dropping an existingConditioncolumn before renaming.
HowMaHiCo 0.2.0
- Completed Phases 1–6 of the conversion into a proper R package: functions moved into
R/, report templates shipped underinst/rmarkdown/templates/{01_mhc_report,02_mhc_upsets}/, a testthat (edition 3) suite, roxygenman/pages,_pkgdown.yml, and CI (R-CMD-check + pkgdown). - Added a proportion-by-length plot at the sample level to the “Total by Sample” section.
-
plot_peplength_hist()density normalized by condition total rather than per-group.
HowMaHiCo 0.1.4
- Fixed rendered
output_filelanding in the installed package library instead of the working directory.
HowMaHiCo 0.1.3
- Named all report chunks and unified
fig.width = 8across chunks. - Added
plot_peplength_hist()(a simpler length-distribution histogram without the boxplot overlay, facetable, two-color byMHCclass, density or absolute).
HowMaHiCo 0.1.2
- Introduced
theme_howmahico()and applied it across plot functions and report skeletons. -
MHCclassparameter with default length windows (MHC1: 8–13 AA, MHC2: 12–25 AA) and a manual color/fill palette per class. - Added a pre-flight check that every file named in the annotation table exists, a per-sample “Total by Sample” section, and a programmatically generated report title.
HowMaHiCo 0.1.1
- Suppressed the progress bar in
get_annot_diann().
HowMaHiCo 0.1.0
- First package-shaped release. Renamed the report templates to
01_mhc_reportand02_mhc_upsets; splitread_peaks_batch()into read/parse/annotate matching the FragPipe/DIA-NN loader families; batch readers now read only the files referenced in the annotation table.