Quantitative, Multispecies Monitoring at a Continental Scale
Authors/Creators
Description
Read me
code/
Core analysis code.
-
R code-
1_Run_QM_qPCR.qmdRuns 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.qmdFits spatial (sdmTMB) smooths to the joint-model concentration estimates and produces map-ready outputs. -
3_All_Figures.qmdProduces final figures from model outputs (joint model + smooths).
-
-
Stan model code(used by1_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 fromdata/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.qmdand
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 ofLog_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.Rprojto get the correct working directory.
Files
Code_and_raw_data.zip
Files
(3.0 GB)
| Name | Size | Download all |
|---|---|---|
|
md5:68d8d0dbf3e3677accafb9ca3210b1d5
|
3.0 GB | Preview Download |