New exported detect_peptide_libraries() returns the names of the peptide libraries a vector of peptide IDs belongs to, matched on their prefixes. It is the detection create_data() uses for peptide_library = TRUE, and lets downstream packages such as phiper fetch the matching libraries with get_peptide_library() when no <phip_data> object is at hand.
A peptide-library file missing from the server now fails with “Failed to download file” and its URL. The curl download fallback used to save the server’s 404 page as the library, so the error surfaced later as a checksum warning plus readRDS() reporting “unknown input format”.
phiperio 0.6.0 (2026-10-05)
get_peptide_library() now serves three peptide libraries: "combined" (agilent, twist and corona2, as before), "human_proteome" and "icam". The two new ones are hosted next to the combined library in the companion phiper repo. A new library argument takes one or more names. Several names return one table stacking the libraries by column name, with the columns a library lacks set to NA for its peptides. The default, "combined", returns the same table as before.
Each library is cached in its own peptide_meta_<name> DuckDB table. The previous peptide_meta table is no longer read, so the first call after upgrading rebuilds the cache from the already downloaded file.
With peptide_library = TRUE, create_data() (and through it convert_standard() and convert_legacy()) now detects which libraries the peptide_ids belong to from their prefixes (agilent_, twist_, corona2_, humanProteome_, icam_) and attaches all of them. Data whose peptides match no library now get no library. Previously the combined library was attached regardless, and the coverage check then warned about every peptide.
peptide_library also accepts a vector of library names, attaching exactly those. The names of the attached libraries are recorded in meta$peptide_libraries.
When the library’s DuckDB connection has been closed, print() now reopens every attached library rather than only the combined one.
The curation scripts for the two new libraries are in data-raw/.
phiperio 0.5.5
validate_phip_data() no longer reports agilent_0 and twist_0 as missing from the peptide library. Both are the FLAG-tag (DYKDDDDK) spike-in control rather than biological peptides: they carry no protein, position or taxonomy, and are absent from the reference library, so the warning was never actionable.
create_data() now accepts a peptide-library table for peptide_library, as its documentation always claimed. The argument was previously only a logical switch (if (peptide_library)), so passing the documented data frame failed with “the condition has length > 1” and NULL with “argument is of length zero”. TRUE and FALSE behave as before; a value that is neither a logical nor a table is now rejected with an explicit message.
Corrected the materialise_table documentation in create_data(), which labelled FALSE as the default when the default is TRUE.
export_parquet() now accepts only <phip_data> objects (#5). Passing a bare data frame previously round-tripped it through a temporary in-memory DuckDB table; that path has been removed, and non-phip_data input is rejected up front by .ph_check_pd().
phiperio 0.5.4 (2026-08-31)
.ph_sha256_file() now hashes files with digest instead of shelling out to the sha256sum command, which does not exist on Windows. There, the helper always returned NA and .ph_download_file() reported that as a checksum mismatch, so the integrity check on the downloaded peptide library never actually verified anything on that platform.
Tests now pin duckdb.home to a temporary directory. duckdb 1.5.5 resolves a storage location on every duckdb() driver and announces it in non-interactive sessions unless one is chosen explicitly, which broke tests asserting that a call produces no output.
phiperio 0.5.3 (2026-08-31)
Declared curl in Suggests. testthat::skip_if_offline() calls rlang::check_installed("curl"), which errors rather than skips in a non-interactive session, so the live peptide-library test failed R CMD check on runners where curl was not installed.
Regenerated inst/extdata/phip_mixture.parquet so its peptide_id values are drawn from the reference peptide library instead of bare integer indices. The example data previously matched no peptide in the library, which made load_example_data() warn about missing coverage for every peptide. The simulated values are unchanged; only the identifiers were remapped.
validate_phip_data() no longer warns that the counts table is not a full peptide * sample grid when auto_expand = TRUE immediately fills it; the condition is logged instead. With auto_expand = FALSE a single warning is emitted rather than two carrying identical row counts.
The peptide-library coverage warning now reports how many peptide_id values are missing and shows up to three of them, instead of a single example that understated the size of a mismatch.
phiperio 0.5.2 (2026-07-08)
Fixed get_peptide_library() silently coercing alphanumeric ID-like columns (e.g. protein_id values such as "agilent_1") to all-NA. The character-to-numeric sanitizer previously matched any string containing a digit; it now requires the value to fully parse as numeric.
Added a regression test for the fix and a live test that flags checksum drift against the published library and any column collapsing to all-NA during sanitization.
phiperio 0.5.1
Updated the peptide metadata library used by get_peptide_library() to combined_library_06.07.26.rds (with matching SHA-256 checksum) from the Polymerase3/phiper repository.
phiperio 0.5.0
Added sample_id_from_filenames to convert_standard() to derive sample IDs from file stems when ingesting a directory of CSV/Parquet files; added tests.
New vignettes: “Importing multiple files with phiperio” (batch ingest + filename-derived sample IDs), and “Importing legacy PhIP-Seq data (convert_legacy)” for compact cross-sectional/longitudinal examples; updated “Importing long tidy data” with clearer workflows.
README/pkgdown refreshed: links to all vignettes, navigation updated, minimal section removed.
Robustified example handling and filename conflicts for vignette builds.