Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A Cottonseed-Derived Bioactive Peptide, Not Organic Selenium, Improves Close-Up Dam and Neonatal Calf Health in Holstein Cattle: A Clinical and Economic Decision-Analytic Evaluation

Open Science Replication Package

This repository contains the complete replication package for the manuscript "A Cottonseed-Derived Bioactive Peptide, Not Organic Selenium, Improves Close-Up Dam and Neonatal Calf Health in Holstein Cattle: A Clinical and Economic Decision-Analytic Evaluation". It includes the complete computational workflow, analysis scripts, and supporting materials necessary to reproduce all statistical, clinical, and decision-analytic economic results reported in the study.

Running python code/run_all.py reproduces, from the raw farm records, every number reported in the manuscript's Tables 3-12, Table A.1, and every panel of Figures 1-5 and A.1-A.2, exactly.


Repository Overview

This repository follows open science and computational reproducibility principles and includes:

  • Complete, documented Python source code (one script per table/figure)
  • The complete raw trial dataset (five Excel files, as extracted from the farm's records)
  • A fully deterministic, one-command computational workflow, covering both the clinical statistical analysis and the partial-budget economic/decision-analytic evaluation
  • Comprehensive documentation, including a full script-to-manuscript correspondence table
  • Software environment specifications
  • A transparency log of every place where a raw-data ambiguity, or an externally-sourced (literature) economic parameter, required an explicit, documented decision

Repository Structure

Tosun_Marvili_Ahmadi_2026_Replication/
├── code/
├── data/
│   ├── raw/
│   └── reference/
├── docs/
├── output/
├── figures/
├── README.md
├── CHANGELOG.md
├── CITATION.cff
├── LICENSE
├── requirements.txt
├── environment.yml
└── .gitignore

A Note on Tables 1 and 2 (Diet Composition)

Tables 1 and 2 of the manuscript (ingredient and calculated nutrient composition of the close-up and fresh-cow diets) are not part of the statistical analysis pipeline above. They are formulated (calculated) values from NRC (2001) ration-formulation software, not a result derived from an outcome dataset, and so there is no script that computes them the way 03_table5_binary_outcomes.py computes Table 5. For completeness, they are provided as static reference data in data/reference/, clearly separated from the reproducible pipeline outputs in output/. See data/reference/README.md for full detail.

A Note on the Economic Evaluation (Table 12, Table A.1, Figs. A.1-A.2)

Unlike Tables 1 and 2, the economic evaluation is a fully reproducible computational pipeline: 15_table12_economic_evaluation.py and 16_figureA1A2_appendix.py recompute the entire partial-budget Monte Carlo simulation from the same raw trial data used for Table 5, combined with externally-sourced, published per-case cost estimates (Rollin et al., 2015; Rodriguez et al., 2024; Hardie et al., 2023) rather than any farm-specific cost data. Those literature-sourced cost parameters are the economic-evaluation analogue of Tables 1/2's formulated diet values: they are cited inputs, not something recoverable from the raw farm records, and are documented explicitly in _economics.py and in docs/DATA_DESCRIPTION.md. Both scripts call a single shared function, _economics.py::run_monte_carlo(), guaranteeing that Table 12 and Figures A.1-A.2 are always numerically identical to each other (see _economics.py docstring).

Documentation

  • docs/CODEBOOK.md -- Script-by-script description and full script-to-manuscript correspondence table
  • docs/DATA_DESCRIPTION.md -- Raw data files, sheets, variable definitions, and the economic evaluation's external cost parameters
  • docs/REPRODUCIBILITY_CHECKLIST.md -- Reproducibility checklist and internal consistency checks
  • docs/Replication_Guide.md -- Step-by-step replication guide, including how every raw-data ambiguity and every economic-evaluation design decision was resolved

Installation

conda env create -f environment.yml
conda activate afst-repro

or

pip install -r requirements.txt

Run

python code/run_all.py

This reproduces the complete analytical workflow: reconstruction of the retained-placenta indicator from free-text herd-health notes, baseline-balance testing, the full 2x2 factorial cell incidence for all 19 binary outcomes, Firth-penalized logistic regression and ordinary least squares main-effects models for all 23 pre-specified outcomes with Benjamini-Hochberg FDR correction, sensitivity analysis, effect-modification analysis, all eleven main-text tables (Tables 3-11) and five main-text figures (Figures 1-5, 600 DPI), and the partial-budget/Monte Carlo/EVPI economic evaluation (Table 12 and Figures A.1-A.2, 600 DPI).

Expected runtime is under one minute on a standard laptop.

Script-to-Manuscript Correspondence

Script Produces Manuscript location
00_prep_retained_placenta.py data/raw/retained_placenta.csv Methods, Section 2.3.1
01_table3_baseline_characteristics.py Table 3 Section 3.1
02_table4_cell_incidence.py Table 4 Section 3.2
03_table5_binary_outcomes.py Table 5 Section 3.2
04_table6_continuous_outcomes.py Table 6 Section 3.2
05_table7_sensitivity_analysis.py Table 7 Section 3.4
06_table8_effect_modification.py Table 8 Section 3.4
07_table9_retained_placenta.py Table 9 Section 3.2
08_table10_dystocia_severity.py Table 10 Section 3.2
09_table11_endometritis_severity.py Table 11 Section 3.2
10_figure1_participant_flow.py Figure 1 Section 3.1
11_figure2_forest_all_outcomes.py Figure 2 Section 3.2
12_figure3_forest_significant.py Figure 3 Section 3.2
13_figure4_incidence_bars.py Figure 4 Section 3.2
14_figure5_calf_trajectory.py Figure 5 Section 3.3
15_table12_economic_evaluation.py Table 12 Sections 2.5 (methods) and 3.4 (results)
16_figureA1A2_appendix.py Figures A.1-A.2 Appendix A

Shared modules _paths.py, _stats_engine.py, _outcomes.py, and _economics.py are imported by the numbered scripts and are not run directly.

Manuscript Tables 1 and 2 (diet composition) have no corresponding script; see "A Note on Tables 1 and 2" above. Manuscript Table A.1 (Appendix, cost-parameter detail) is documented directly in _economics.py and docs/DATA_DESCRIPTION.md rather than written to a separate script output, since it is a parameterization table rather than a fitted-model result.

Transparency Notes

Three data points in the raw farm records required an explicit, documented interpretive decision during package preparation. None affect the manuscript's primary conclusions (the mastitis, fatty liver disease, and calf-morbidity findings all reproduce exactly). See docs/Replication_Guide.md for full detail:

  1. Calf sex (Table 3): two records with an ambiguous sex code were excluded.
  2. Uterine/ovarian status for the Pe and SePe arms (Table 4/5): the raw sheets contain more records than the balanced 35-cow/group subsample reported in the manuscript; this is a pre-existing data-recording limitation, already disclosed in the manuscript's own Table 5 footnote.
  3. Retained placenta (Table 9): reconstructed from free-text notes rather than a dedicated field; see 00_prep_retained_placenta.py.

In addition, the economic evaluation's per-case cost inputs are externally sourced from the published literature (not derived from the raw farm records); see "A Note on the Economic Evaluation" above and docs/DATA_DESCRIPTION.md for full detail and citations.

Citation

Please cite both the published article and this archived repository. Citation metadata are provided in CITATION.cff.

License

MIT License (code). Data files were collected by the authors under institutional animal-care approval (University of Zanjan Animal Care Committee, Approval No. 1253) and are shared here for replication purposes; see docs/DATA_DESCRIPTION.md.

Contact

Halil Tosun -- Department of Animal Science, School of Agricultural and Food Sciences, ADA University, Baku, Azerbaijan

ORCID: https://orcid.org/0000-0001-5117-0390

Email: halilibrahimtosun@gmail.com

Zenodo DOI: https://doi.org/10.5281/zenodo.21515267

Version: 2.0.1

About

Reproducible repository accompanying the study “A Cottonseed-Derived Bioactive Peptide, Not Organic Selenium, Improves Close-Up Dam and Neonatal Calf Health in Holstein Cattle: A Clinical and Economic Decision-Analytic Evaluation.”

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages