I need to structure this as a practical, actionable template or guide that a lab manager or PI could hand to a new student.
Target Audience: Graduate students (often beginners in reproducibility), Lab Managers, PIs.
Tone: Professional, encouraging, structured, and "ready-to-use."
Plan:
Introduction: Briefly explain why this kit is necessary (the "Grad Student Nightmare" of leaving and leaving behind a mess).
Folder Structure: I'll design a standardized directory tree. It needs to separate raw data (read-only), processed data, code, results, and documentation.
Data Dictionaries: Provide a template (CSV or Markdown) for describing datasets. Columns, types, units.
Environment Pinning: Explain how to freeze environments (requirements.txt for Python, renv for R, Docker/Conda). This is crucial for "it worked on my machine" issues.
Lab Notebooks: Contrast electronic (ELN) vs. code-integrated (Jupyter/R Markdown). Propose a standard format for entries.
Review Gates: Define checkpoints. Before data collection, before analysis, before publication. This adds a management layer.
Boilerplate Files: Create actual text files that can be copied (README templates, .gitignore, etc.).
Usually a CSV or Excel file accompanying a dataset.
Fields: Variable Name, Description, Unit, Type, Range/Allowed Values.
Environment Pinning:
Python: requirements.txt or environment.yml (Conda).
R: renv.
Containerization (Docker) is a bit advanced for a starter kit, but worth mentioning as the "gold standard." I'll stick to package managers for the starter level.
Lab Notebooks:
Don't just keep a paper notebook.
Suggest a digital format. Maybe a README.md per experiment or a structured markdown file.
Structure: Goal, Method, Results, Issues, Next Steps.
Review Gates:
This is about workflow.
Gate 1: Project Setup (Is the data organized? Is the plan clear?)
Gate 2: Pre-registration/Analysis Plan (Are hypotheses set?)
Gate 3: Pre-submission (Is the repo clean? Can someone else run it?)
Refining the Output:
I should format this as a "Kit" with files they can actually copy-paste.
I will use Markdown code blocks for file templates.
Self-Correction during drafting: I initially thought about just listing rules, but a "Starter Kit" implies templates. I will provide a template for the README.md, the folder tree, and the data dictionary.
Specifics for "Review Gates":
Make this actionable. A checklist for the PI or Reviewer.
Data Audit.
Code Run-through.
Final Sanity Check.
Final Polish:
Add a section on "How to implement this." (Git, shared drives, onboarding).
Let's build the content.
Structure:
Overview
The Directory Map
The Data Dictionary (Template)
The Environment (Pinning strategies)
The Digital Lab Notebook (Template)
The Review Gates (Checklists)
Implementation Guide
This looks solid. I will generate the response following this structure.
This starter kit is designed to be language-agnostic (works for Python, R, Matlab, etc.) and focuses on conventions rather than specific tools.
Here is a reproducible research starter kit tailored for a graduate lab environment.
The "Repro-Kit" Framework
1. Folder Structure Conventions
The goal is to separate Data (read-only), Code (executable), Results (generated), and Manuscripts (communication).
The Golden Rule: Never mix raw data with processed data, and never manually edit generated results.
Template Directory:
project_name/
├── 01_raw_data/ # Original, immutable data (Read-Only)
├── 02_processed_data/ # Cleaned, transformed data (Generated by scripts)
├── 03_src/ # All code (R, Python, Matlab, etc.)
├── 04_results/ # Outputs (Figures, Tables, Model Objects)
├── 05_manuscript/ # Drafts, LaTeX/Word files
├── 06_admin/ # Grant info, IRB protocols, correspondence
├── environment/ # Dependency files (requirements.txt, renv)
├── README.md # Project abstract and "How to run"
└── makefile / run_all.py # Master script to execute the pipeline
Naming Convention: Use dates (YYYY-MM-DD) or numbers (01_, 02_) to enforce order.
No Spaces: Use underscores _ or hyphens - in folder/file names to prevent command line errors.
2. Data Dictionaries
Grad students often leave, leaving behind CSVs with columns like x1, cond, and temp. A Data Dictionary is mandatory metadata.
The Rule: Every raw data file must have an accompanying data_dictionary.csv (or markdown file) in the same folder.
Template (data_dictionary.csv):
Variable_Name
Description
Units
Type
Allowed_Values
Missing_Value_Code
subject_id
Unique identifier for participant
N/A
String
N/A
N/A
reaction_time
Time to press button
Milliseconds
Float
> 0
-999
treatment_group
Experimental condition
N/A
Categorical
control, drug_a
N/A
3. Environment Pinning
"If it works on my laptop, it works" is the enemy of reproducibility. You must capture the specific versions of libraries used.
Option A: Python (The requirements.txt method)
Generate the file:
pip freeze > environment/requirements.txt
Recreate the environment:
pip install -r environment/requirements.txt
Option B: R (The renv method)
In the R project console:
install.packages("renv")
renv::init() # Creates a lockfile
renv::snapshot() # Save current state
To restore later: renv::restore()
Option C: Docker (The "Nuclear" Option)
For complex labs, create a Dockerfile. This captures the entire Operating System state, ensuring that code running in 2024 runs exactly the same in 2034.
4. The Digital Lab Notebook
The code explains how you analyzed data, but not why you made specific decisions. You need a lab notebook.
Convention: Do not use paper. Use a text file (Markdown) or a Wiki (GitHub/GitLab Wiki) stored in the repo.
Template (notebook_2023-10-27.md):
# Entry: Initial Outlier Removal
**Date:** 2023-10-27
**Author:** Jane Doe
## Goal
Remove participants who guessed the study hypothesis.
## Decision Process
- Identified participants with `survey_guess` accuracy > 90%.
- Removed 3 subjects (IDs: 104, 209, 305).
- NOTE: I debated keeping 104 because their RTs were normal, but decided to stick to the pre-registration protocol.
## Files Modified
- `03_src/clean_data.py`
## Next Steps
- Re-run the ANOVA.
5. Review Gates (Quality Control)
Before a project is submitted for publication or a thesis defense, it must pass through "Review Gates." This prevents "datacriminality" (undisclosed exclusions, p-hacking).
Gate 1: The Set-Up Review (Pre-Data)
Check: Is the raw data backed up in a location separate from the working directory?
Check: Is the hypothesis clearly stated in the README?
Check: Is the folder structure compliant with the Lab Standard?
Gate 2: The "Fresh Eyes" Review (Pre-Submission)
This is the ultimate test of reproducibility.
The Scorch Protocol: A labmate (or advisor) deletes the 02_processed_data and 04_results folders on their machine.
The Run: They run the master script (make or python run_all.py).
The Verdict: If the script crashes or produces different numbers, the project cannot be submitted until fixed.
Gate 3: The Archive Review (Post-Publication)
Check: Is the GitHub repo tagged with a Release (v1.0)?
Check: Is the raw data deposited in a public repository (e.g., OSF, Zenodo, Dryad)?
Summary Checklist for New Students
Structure: Did you create the standard folder hierarchy?
Raw Data: Is the raw data read-only?
Dictionary: Does every dataset have a metadata file?
Environment: Did you generate a requirements.txt or renv.lock file?
Master Script: Can you run the whole project with one command?