Last updated on 2026-08-24 | Edit this page
Reference
Quick reference for tools and concepts covered in this workshop.
Git Essentials
Common Commands
BASH
# Setup
git config user.name "Your Name"
git config user.email "your@email.com"
# Create/clone repository
git init
git clone <url>
# Check status
git status
git log --oneline
git diff
# Stage and commit
git add <file>
git add .
git commit -m "message"
# Branches
git branch <branch-name>
git checkout <branch-name>
git checkout -b <branch-name>
git merge <branch-name>
# Remote
git push origin <branch-name>
git pull origin <branch-name>
git fetch origin
# Tags
git tag v1.0
git tag -a v1.0 -m "Version 1.0"
git push origin --tags
Writing Good Commit Messages
Fix bug in data filtering
The filter() function was excluding valid samples with missing
metadata. Changed from strict equality check to hasattr() to allow
samples with optional metadata.
Fixes issue #42.
Format: Subject line (50 chars) + blank line + detailed explanation
Conda Essentials
Common Commands
BASH
# Create environment
conda create -n env-name python=3.11 numpy pandas
# Activate/deactivate
conda activate env-name
conda deactivate
# Install packages
conda install package-name
pip install package-name
# List environments
conda env list
# Export environment
conda env export > environment.yml
conda env export --no-builds | grep -v "^prefix" > environment.yml
# Create from file
conda env create -f environment.yml
# Remove environment
conda env remove -n env-name
Make Essentials
Project Structure Template
project/
├── README.md
├── LICENSE
├── CITATION.cff
├── environment.yml
├── Makefile
│
├── data/
│ ├── raw/README.md
│ └── processed/.gitignore
│
├── src/
│ ├── module1.py
│ ├── module2.py
│ └── utils.py
│
├── results/
│ ├── figures/
│ └── tables/
│
├── notebooks/
│ └── exploration.ipynb
│
├── scripts/
│ ├── preprocess.sh
│ └── analyze.sh
│
└── .gitignore
.gitignore Template
# Data
data/raw/
data/processed/
*.csv
*.xlsx
*.fasta
*.bam
# Large files
*.pkl
*.npy
*.h5
*.mat
# Results
results/
outputs/
# Python
__pycache__/
*.py[cod]
.env
venv/
env/
# R
.Rhistory
.RData
# OS
.DS_Store
Thumbs.db
# IDE
.vscode/
.idea/
*.swp
# Job logs
*.log
.job_ids
slurm-*.out
Key Concepts
Reproducibility Levels
- Numerical: Same numbers from same code and data
- Logical: Same conclusions from same methodology
- Process: Understanding of the full workflow and decisions
Environment Reproducibility
Problem: Code works on laptop but not on HPC, or works today but not next year
Solution: Lock down: - Programming language version - All package versions - System libraries - Compiler versions
Tools and Resources
| Tool | Purpose | Reference |
|---|---|---|
| git | Version control | https://git-scm.com/ |
| conda | Environment management | https://docs.conda.io/ |
| Make | Workflow automation | https://www.gnu.org/software/make/ |
| SLURM | HPC job scheduling | https://slurm.schedmd.com/ |
| Zenodo | Code archiving, DOI | https://zenodo.org/ |
| OSF | Open Science Framework | https://osf.io/ |
Useful References
- The Turing Way: Handbook for reproducible research: https://the-turing-way.netlify.app/
- Carpentries Lessons: Learn Unix, Git, Python: https://carpentries.org/
- FAIR Data Principles: Best practices for data: https://www.go-fair.org/
- Reproducibility Guide: Nature: https://www.nature.com/articles/d41586-020-02462-5
Glossary
Commit: A version-controlled snapshot of your code
Branch: A parallel version of your repository for experiments
Environment: Specification of software dependencies and versions
Deterministic: Produces same output given same input
Stochastic: Involves randomness; controlled via random seeds
DOI: Digital Object Identifier; permanent, citable link to your work
Makefile: File defining automated analysis workflow steps
SLURM: Simple Linux Utility for Resource Management; HPC job scheduler
Conda: Package and environment manager for reproducible Python environments
Repository: Version-controlled directory (git repo)