Computational biology / Reproducible research

Computational biology and quantitative methods

I use computational methods to connect sequencing data, field observations and molecular measurements. Here I share small, reproducible examples of the analytical concepts behind my research.

All datasets and calculator inputs on this page are synthetic. The examples demonstrate methods rather than experimental findings.

Reproducible Python examples

Python workflows

Microbial diversity and sequence quality

Download the scripts and example inputs to reproduce the calculations.

01 / PYTHON · MICROBIAL ECOLOGY

Microbial alpha and beta diversity

01 · Validate counts02 · Calculate alpha diversity03 · Compute Bray–Curtis04 · Export CSV tables

Calculate observed richness, Shannon diversity, Pielou evenness and pairwise Bray–Curtis dissimilarity on relative abundances. The workflow handles empty samples explicitly and includes seven deterministic numerical checks.

Four equally abundant taxa have Shannon H = ln(4) ≈ 1.386 and Pielou J = 1. Pielou evenness is undefined for a single taxon.

cd examples/diversity
python3 diversity_demo.py --self-test
python3 diversity_demo.py synthetic_counts.csv --out results
02 / PYTHON · 16S AMPLICON QC · SYNTHETIC DATA

Paired-end sequencing quality control

This script checks FASTQ record integrity, paired-read identifiers and per-cycle Phred quality before downstream amplicon analysis.

01 · Validate paired FASTQ02 · Summarize Phred quality03 · Inspect per-cycle trends04 · Export QC reports
Synthetic forward and reverse read qualityForward reads stay at Q35 for forty cycles. Reverse reads drop from Q35 to Q20 after cycle thirty. The dashed horizontal reference indicates Q30.Q30010203040110203040Sequencing cycleMean Phred score
Forward Reverse Synthetic data: four artificial 40-base read pairs, not biological 16S sequences.
Example QC summary
MetricForwardReverse
Reads44
Bases160160
Mean Phred35.0031.25
Q30 bases100%75%

Validation covers numerical output, malformed FASTQ inputs and gzip support. The script checks read integrity and quality; it does not perform denoising or taxonomic classification.

cd examples/amplicon-qc
python3 fastq_qc.py --demo --out demo_results
03 / Interactive · Synthetic data

Community dissimilarity and PCoA

Principal coordinates analysis represents distances between samples as coordinates. Modify community C and observe its position relative to A and B.

A: 70 / 20 / 10; B: 10 / 70 / 20 (percentages of three hypothetical taxa).

Taxon 2 stays at 20%; taxon 3 balances the total to 100%.

Bray–Curtis distances

PCoA 1PCoA 2ABC

This three-sample demonstration preserves Bray–Curtis distances using equal axis scaling. Axis signs are arbitrary. Larger datasets can produce negative eigenvalues; ordination alone does not establish treatment effects.

04 / Experimental design · Teaching example

Experimental units and blocking

A hypothetical randomized complete-block experiment has one independently assigned plot per treatment in each of three blocks. Plot means (arbitrary units) are shown below.

BlockControlTreatmentDifference
110122
211154
312186
Mean within-block difference: 4.00Standard error across three differences: 1.155.

Plants sampled within a plot are subsamples, not independent treatment replicates. In a real analysis, choose a model that reflects randomization, blocking, repeated measurements and the outcome distribution; evaluate residuals, dispersion and estimability. Count outcomes may require Poisson or negative-binomial models. A mixed model cannot repair a lack of independent treatment replication.

This example illustrates paired block differences and their standard error, not a fitted mixed model.

05 / Interactive · Synthetic inputs

From chamber concentration to gas flux

Illustrative chamber: 0.010 m³ volume, 0.050 m² area, 101325 Pa pressure. Fixed values are synthetic, not actual equipment specifications.

Ideal-gas conversion of a pre-estimated linear dry-gas mole-fraction slope. Positive values denote emission; negative values denote uptake. Units report mass of the selected gas, not elemental C or N, and not CO₂ equivalents.

Does not fit concentration traces, choose a closure window, correct water vapor or apply nonlinear chamber models. Real measurements require pressure, temperature, effective headspace, calibration and trace-level quality review. Static chamber methods reference.

06 / Interactive · Molecular quantification

qPCR standard-curve interpretation

Illustrative calibration: Cq = 40 − 3.32 × log₁₀(copies/reaction). Slider spans 10²–10⁶ copies/reaction.

Calculated from the hypothetical standard curve.

I am interested in applying qPCR to nitrogen-cycle targets such as amoA, nirK, nirS and nosZ clades I/II. Environmental gene quantification requires assay specificity, calibration, inhibition checks, controls and appropriate normalization. Gene copies do not directly measure process rates.

The standard curve is illustrative, not a validated assay. MIQE 2.0 guidelines.

07 / Methods guides

Interpreting microbial community shifts

Differential abundance

Example: a taxon remains at 100 cells while total community size increases from 200 to 1000 cells. Its relative abundance falls from 50% to 10% despite unchanged absolute abundance.

In differential-abundance analysis, I consider prevalence, library size, experimental design, covariates and repeated observations. ANCOM-BC2 provides a bias-correction approach; effect sizes, uncertainty and false discovery control are central to interpretation.

Further reading: Official tutorial.

Functional microbiome profiling

PICRUSt2 predicts gene-family and pathway potential from marker-gene sequences using reference genomes. Inspect sequence placement and NSTI, retained read abundance, and sensitivity to filtering before interpreting predicted functions.

Relate nitrogen-cycle hypotheses to independent measurements such as validated qPCR or process-rate assays. Predicted pathways do not establish gene expression, enzyme activity or measured fluxes.

Further reading: PICRUSt2 limitations.

Reproducibility and scope

Download the calculator source and validation notes to inspect the numerical methods and reproduce the examples.