Quantitative, Multispecies Monitoring at a Continental Scale
Read me code/ Core analysis code. R code 1_Run_QM_qPCR.qmd Runs the joint model that connects qPCR (absolute for the reference species) with metabarcoding (compositional) and produces model-ready objects + posterior outputs. 2_sdmTMB_smooths_13sp.qmd Fits spatial (sdmTMB) smooths to the joint-model concentration estimates and produces map-ready outputs. 3_All_Figures.qmd Produces final figures from model outputs (joint model + smooths). Stan model code (used by 1_Run_QM_qPCR.qmd): Joint_model.stan — Stan program implementing the joint statistical model linking qPCR (absolute, reference species) with metabarcoding (compositional, multi-species). Mock_model.stan — Stan program for the mock-community calibration component (e.g., amplification efficiency / bias parameters). Mock_model.rds — saved fitted object / calibration output associated with the mock model (generated by the workflow; kept here for reuse). R helper scripts load_QM-qPCR_data.R — loads raw inputs from data/ and standardizes formats. qm_data_prep_functions.R — shared utility functions for cleaning, joins, reshaping, QC, etc. smoothers.R — helper functions for the smoothing / mapping stage. data/ Raw and lightly processed inputs used by the workflow. hake_qpcr/ — qPCR inputs for the reference species. metabarcoding/ — metabarcoding reads for environmental samples. metabarcoding_db/ — taxonomy / reference database products used in assignment. metabarcoding_mocks/ — mock community inputs/outputs used for amplification-bias calibration. metadata/ — station/sample metadata (locations, depths, cruise/station IDs, etc.). Intermediate_data/ Cached outputs produced by the pipeline (to avoid re-running expensive steps). Important: everything in Intermediate_data/ is generated from: 1_Run_QM_qPCR.qmd and 2_sdmTMB_smooths_13sp.qmd Files: Joint_mod_data_input.rds — compiled data object passed into the joint model. Joint_mod_output.rds — joint model results / posterior summaries. Mock_mod_output.rds — mock-community calibration outputs (amplification efficiencies / bias correction objects). Log_D_est.rds — species-by-sample estimated log DNA concentrations from the joint model. Log_D_est_smoothed.rds — smoothed (sdmTMB) versions of Log_D_est. all_maps_se.rds — standard errors / uncertainty layers for mapped smooth predictions. Recommended run order Run the joint model + calibration Render / run: code/Stan_models/1_Run_QM_qPCR.qmd Writes model inputs/outputs to Intermediate_data/ Fit spatial smooths Render / run: code/Stan_models/2_sdmTMB_smooths_13sp.qmd Writes smoothed outputs and map uncertainty objects to Intermediate_data/ Build final figures Render / run: code/Stan_models/3_All_Figures.qmd Uses Intermediate_data/ as inputs Notes This is an RStudio project: open QM-qPCR-joint.Rproj to get the correct working directory.
Publication Details
- Journal
- Zenodo (CERN European Organization for Nuclear Research)
- Published
- 2026-02-10
- DOI
- https://doi.org/10.5281/zenodo.14804069
- Primary Topic
- Species Distribution and Climate Change
- Type
- article
- Field-Weighted Citation Impact
- 0.00