A Fritsche Lab guide to using AI assistants in biostatistics, bioinformatics, and research coding. Follow eight steps from a clear analysis plan to reviewed code, tested behavior, and reproducible documentation.
- Try the hands-on quick start: a small synthetic dataset, an R task, and checks with independently specified results.
- Read the eight chapters: planning, research, prompting, review, refinement, testing, standardization, and documentation.
- Use the coding agent playbook: task scope, context handoffs, review, permissions, and reproducible R workflows.
- Copy a template: task briefs, handoffs, project plans, code review, and documentation prompts.
Continue with Part 2: Practical GenAI Agentic Coding Guide: work through a complete change in a runnable Python repository, from the task brief to tests, review, and a reproducible handoff.
The September 2026 update notes explain the source-backed content changes and alignment with the lab website. The guide uses synthetic examples; keep protected data in its approved environment.
Use Ruby 3.3 and Bundler from the repository root:
bundle install
bundle exec jekyll build
bundle exec jekyll serve --host 127.0.0.1 --port 4000Open http://127.0.0.1:4000/practical-genai-coding-guide/. See Development Setup for platform-specific setup, the Conda/Miniforge compiler workaround, and GitHub Pages deployment. Generated site and dependency directories stay ignored.
The EHR simulator creates measurements, demographic records, and data dictionaries. Install its documented R dependency before running, then use explicit output paths:
Rscript scripts/simulate_ehr_data.R \
--output_ehr "./data/raw/ehr_bmi_simulated_data.tsv" \
--output_ehr_dict "./data/raw/data_dictionary.txt" \
--output_demo "./data/raw/demographics_simulated_data.tsv" \
--output_demo_dict "./data/raw/demographics_data_dictionary.txt" \
--seed 123 \
--n_individuals 1000For a first exercise requiring no R packages, use the quick start.
Open an issue or pull request with a concrete correction, a useful research-code example, or a source-backed workflow improvement. Keep existing page paths, use synthetic fixtures, and build the site before submitting. Repository conventions are in AGENTS.md; Codex Agent Setup describes the project's automation support.
Created and maintained by Lars G. Fritsche and the Fritsche Lab at the University of Michigan.
Fritsche, Lars G. Practical GenAI Coding Guide: A practical 8-step process for integrating GenAI tools into coding and research workflows. Fritsche Lab, University of Michigan. https://fritschelab.org/practical-genai-coding-guide/. Accessed YYYY-MM-DD.
CITATION.cff provides citation metadata for GitHub and reference managers.
