Manual
Requirements
- Operating system: Windows, macOS, or Linux.
- R: version 4.1 or newer, from CRAN.
- R Editor (recommended): RStudio or Positron.
- Quarto: bundled with recent RStudio and Positron releases; otherwise install it from quarto.org. Required only for rendering notebooks.
Installing and updating MRMhub
Important. Quit and reopen all RStudio/Positron sessions first. Many installation issues are caused by R packages that are loaded in another session while the installer tries to update them.
In a fresh R session, we recommend installing with
pak:
if (!require("pak")) install.packages("pak")
pak::pak("SLINGhub/MRMhub")To update MRMhub later, re-run the same command in a fresh session.
If pak fails, e.g. due to institutional network firewall
or proxy settings, try remotes instead:
if (!require("remotes")) install.packages("remotes")
remotes::install_github("SLINGhub/MRMhub")If installation fails, see the ZIP-file method below or Troubleshooting.
Installing from a downloaded repository ZIP file
If the methods above fail or R cannot reach GitHub, download a copy of the repository and install MRMhub from it:
- Open https://github.com/SLINGhub/MRMhub in a browser.
- Click the green Code button and choose Download ZIP (or download https://github.com/SLINGhub/MRMhub/archive/refs/heads/main.zip directly).
- Unzip the file. It expands to a folder named
MRMhub-main. - In a fresh R session, install from that folder with
pak:
pak::local_install("path/to/MRMhub-main")Replace path/to/MRMhub-main with the actual location of
the unzipped folder, e.g. "~/Downloads/MRMhub-main".
Confirm mrmhub is successfully installed
If this loads without error, you are ready to go. If you plan to use any of the functions listed under Optional packages below, install those too. If it loads with errors, see Troubleshooting below.
Optional packages
To keep the base installation light, a number of specialised
functions in mrmhub rely on additional packages that are
not installed upfront. When such a function is called and its package is
not yet installed, mrmhub offers to install it.
| Function | Optional package | Enables |
|---|---|---|
plot_runscatter() |
qpdf; mirai, carrier | only for multi-threaded PDF output |
plot_qc_summary_overall(with_venn = TRUE) |
ggvenn, patchwork | Venn diagram of features excluded by QC criteria |
plot_matrixeffects(),
plot_interference_correction()
|
ggbeeswarm | beeswarm/quasirandom point layers |
correct_isotopic_interferences(),
calc_average_molweight()
|
enviPat | isotope-pattern and molecular-weight calculation |
correct_batch_combat() |
sva | ComBat batch correction |
correct_batch_serrf() |
ranger | SERRF batch correction |
correct_drift_gam() |
mgcv | GAM-based drift correction |
build_workflow() |
shiny, bslib | interactive workflow-builder app |
save_dataset_summarizedexperiment() |
SummarizedExperiment, S4Vectors, lipidr (Bioconductor) | export to a SummarizedExperiment
|
| Lipid-name parsing (isotope correction, lipid plots) | rgoslin (Bioconductor) | parse and normalise lipid shorthand |
get_response_curve_stats() |
lancer (GitHub) | only for specific response-curve metrics |
To install all of them upfront, run the following in a fresh R session (again, with all other RStudio/Positron sessions closed):
pak::pak(c(
"sva", "ranger", "mgcv", "enviPat",
"qpdf", "mirai", "carrier", "shiny", "bslib",
"ggvenn", "patchwork", "ggbeeswarm",
"rgoslin", "lipidr", "SummarizedExperiment", "S4Vectors",
"SLINGhub/lancer"
))Alternatively, install the CRAN packages with
install.packages() and the Bioconductor ones
(rgoslin, lipidr,
SummarizedExperiment, S4Vectors) with
BiocManager::install().
Troubleshooting
If the installation seemed successful but the package does not load,
or loads with errors, run check_setup() to report the R
version and flag any missing dependencies:
mrmhub::check_setup()Frequent installation errors
See Troubleshooting & FAQ for a detailed list of errors and resolutions.
| Error | Cause | Fix |
|---|---|---|
namespace 'rlang' is already loaded |
An old dependency is still loaded in the session | Restart R (Ctrl+Shift+F10) and retry the install |
pak unavailable or failing |
pak not installed, or its cache is stale |
Install with
remotes::install_github("SLINGhub/MRMhub")
|
cannot open URL |
Firewall or proxy blocking GitHub |
options(download.file.method = "libcurl"), or install from a
downloaded repository ZIP file
|
Could not resolve host: api.github.com |
Firewall or proxy blocking the GitHub API | Set http_proxy/https_proxy, or install from a
downloaded repository ZIP file
|
SSL certificate problem: self signed certificate in certificate chain |
Corporate proxy inspecting TLS traffic | Use remotes (it uses the system certificate store), or
install your organisation’s root certificate |
package 'X' was installed under R version … |
Package built for a different R |
install.packages("X") to rebuild it for your R |
there is no package called 'mrmhub' |
Install did not finish | Scroll up for the real error, then retry the install |
ERROR: Rtools is required (Windows) |
A source-only dependency needs compilation | Install Rtools matching your R version, restart R, retry |
clang: error: ... (macOS) |
Compiler tools missing | Run xcode-select --install in Terminal, retry |
cannot find -lcurl (Linux) |
System libraries missing | sudo apt install libcurl4-openssl-dev libxml2-dev libssl-dev libfontconfig1-dev |
Next steps
- MRMhub overview: core vocabulary and the MRMhubExperiment object
- Getting started with MRMhub: a short end-to-end walkthrough
- Questions or bug reports? File an issue on GitHub, or contact the authors directly.