Tumour ID is now treated as a categorical variable. The loaders
(load_lipidomics_data(), load_lipidomics_data_from_df()) and
generate_example_data() store it as a factor, so it is no longer read as
a number. perform_pca() and the PCA/PLS-DA plot functions also convert
the grouping variable to a factor. Colouring a PCA by Tumour ID (or by any
other numeric ID) now uses a discrete colour scale, as PLS-DA already did,
instead of a continuous gradient.head(). This makes
the table match the sample and group counts shown above it. The table is
paginated at 25 rows, and an "All" page-length option is available.data-raw/ to inst/scripts/prepare_ST001359_lipidomics.R, as preferred
for Bioconductor packages, and removed the data-raw/ directory. The
vignette now points to the script.In the Shiny app, "Load Example Data" no longer lists the example's
Tumour ID and Weight (mg) metadata columns as lipids in the Lipid
Expression selector (or treats them as lipid features anywhere else). The
example data is now always loaded with its known metadata columns, whatever
is ticked under "Metadata Columns". That checkbox group now has all four
columns ticked by default.
correct_batch_effects() now actually protects the biological groups
during batch correction. Its confounding check compared the group design
(which includes an intercept) against a full set of batch indicator columns.
Those columns always add up to the intercept, so the check failed for every
design. As a result, every call warned that group and batch were "perfectly
confounded" and ran without group protection, which could remove real
between-group differences along with the batch effect. Batch is now
treatment-coded for the check, so the warning and the unprotected fallback
only happen when group and batch really are confounded (for example, when
each batch holds different groups). Results change for any balanced or
partly balanced design, with both method = "limma" and
method = "combat".
sessionInfo(), so they record the R, LIPIDIFy and
dependency versions used.Imports now also has matching importFrom() directives
in NAMESPACE, listing each function LIPIDIFy uses.tests/testthat/test-shiny-server.R exercises the Shiny server
in-process with shiny::testServer(). It covers data loading,
classification, raw and normalized plots, pipeline comparison,
normalization, imputation, batch correction, expression plots, differential
analysis, enrichment, all downloads and report generation. Package coverage
rose from about 35% to 95% (R/shiny_app.R: 9% to 99%).data-raw/ preparation
script, which is not shipped with the package. The same reference was
removed from inst/scripts/demo_lipidomics.R.inst/CITATION. The package has no associated publication or
preprint, and Bioconductor asks that a CITATION file be shipped only when
one exists. citation("LIPIDIFy") now returns the entry R generates
automatically from DESCRIPTION, which stays in step with the package
version and title. This clears the remaining BiocCheck warning about a
missing doi argument in bibentry().impute_missing_values() no longer calls set.seed(). It gains an optional
seed argument, defaulting to NULL, and runs KNN imputation under
withr::with_preserve_seed() or withr::with_seed(), so the caller's random
number stream is restored either way. Imputed values are unchanged:
impute::impute.knn() seeds its own generator via rng.seed, so the
previous set.seed(42) never influenced the result.withr added to Imports.Authors@R with the fnd (funder)
role, and the supporting NHMRC of Australia grant (#2020050) is acknowledged
in the README and the vignette.normalize_vsn(), a genuine variance-stabilising normalization that
calls vsn::justvsn() from the Bioconductor vsn package (Huber et al.
2002). "VSN" is now a separate accepted method in
get_normalization_methods(), apply_normalizations() and the Shiny
normalization pipeline builder.vsn added to Suggests; it is loaded dynamically via
requireNamespace(), matching how the package already handles impute
and sva."VSN" and "Log2Median" are two distinct methods. Previously the
README, NEWS and Shiny help text described a "VSN" method that did not
exist in the code: the implemented method was "Log2Median" (a fixed
log2(x + 1) transform plus per-sample median centering). "Log2Median"
is unchanged and still available; "VSN" now performs real VSN
calibration. Documentation across README, the vignette, the Shiny method
reference and the Rd pages has been corrected accordingly.normalize_vsn() validates its input before calibrating and never repairs
data silently: infinite values, all-missing samples or features, fewer than
2 samples, fewer than 42 lipid features, and non-numeric input all raise
descriptive errors; missing values are reported and returned as NA
(never imputed); negative values are passed to vsn unchanged but warn."VSN" raises an actionable error pointing to
BiocManager::install('vsn'). It never falls back to another
normalization method, and the Shiny app surfaces the error instead of
reporting that normalization succeeded.normalize_mean() and full pipeline builder supporting TIC, PQN,
Quantile, Log2Median, Median, Mean, Log2, Log10, Sqrt, Noneget_normalization_descriptions() for UI help textcreate_pca_plot_with_ellipses(): fixed duplicate legend keys when ellipses
are drawn (fill + color legends now merged into one)create_lipid_expression_barplot(): samples now sorted by group, not by
sample nameperform_plsda(): replaced cat() with message() (Bioconductor requirement)perform_enrichment_analysis(): replaced cat() with message()