Skip to content

Latest commit

 

History

History
64 lines (40 loc) · 3.23 KB

REPRODUCEME.md

File metadata and controls

64 lines (40 loc) · 3.23 KB

Instructions for Repetition of Study

This file describes how to reproduce the analysis of "Identification of the Mode of Evolution in Incomplete Carbonate Successions"

Authors

Niklas Hohmann
Utrecht University
email: [email protected]
Web page: uu.nl/staff/NHohmann
Orcid: 0000-0003-1559-1838

Reproducibility

There are multiple ways to reproduce and repeat the study:

  1. Full reproduction, where all data is generated anew from scratch
  2. Inspection of the provided data
  3. Reproduction of figures alone

Each point is described in a separate step, and can be performed independently

1. Full reproduction of data

1. Get Age-Depth Models

1.1 Generate Carbonate Platforms
  1. Clone the "scenarioA" branch of the CarboCAT lite repository from here.
  2. Run the file "carbocatGUI.m" in Matlab
  3. Click initialize in the GUI. The GUI after initialization is saved under "figs/matlab/scenarioA_initial_conditions.pdf" and serves as the basis for fig S1.
  4. Click "Run CA model". This will start the model run, progress is displayed in the console.
  5. Once the console outputs indicates the run is finished, save your workspace. The generated data is identical to the data saved under "data/matlab_output_scenarioA_matlab_outputs.mat". It constains all the raw data generated by CarboCAT.
  6. Click "Plot run" to generate the chronostratigraphic chart and dip section saved under "figs/matlab/scenarioA_dip_section_and_chronostrat.pdf". This might take a while.

Repeat for the branch scenarioB to generate the data for scenario B.

1.2 Extract Age-Depth Models from CartboCAT
  1. In the folder data -> matlab_outputs, run "get_adm_from_carbocat_outputs.m" in matlab. This generates the file "scenarioA_and_B_matlab_to_R.mat", which can be read into R.
  2. Open RProj "CarbStratPalEvo"
  3. Run process_adm_from_matlab.R to import the ADMs into R. This will generate the file data/R_outputs/ageDepthModelsScenariosAandB.Rdata

Run analyses

Open the project "blblb" in Rstudio

2. Inspection of provided data

All produced data is in the folder /data/. For a detailed description of the data structure and contents see the file /data/R_outputs/codebook.md (for outputs from R) and /data/matlab_outputs/codebook.md (for outputs from matlab)

3. Reproduction of figures

To reproduce the figures in the main test and supplementary material, open the R project, and run

source("code/make_plots.R")

This will use the data in /data/R_outputs/ to generate summary figures in the folder /figs/R/

NOTE: Only the figures displaying AIC weights make use of the test results stored in /data/R_outputs/results_modes_of_evolution.Rdata. All lineages are simulated anew when make_plots is run. To make the plots reproducible, they can be seeded via the parameter plot_seed.
This is a result of the study design. The tests simulate lineages at a specific basin position. Because trait values are random, this makes it impossible to compare identical simulated lineages across multiple basin positions. This problem is circumvented in the functions used for plotting, see /code/make_plots.R for details.