Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bioinformatics Workflow Practice

Python SQLite Snakemake Docker License

A small reproducible data-analysis workflow demonstrating introductory use of Python, pandas, SQL, Conda, Snakemake and Docker.

Tech Stack

  • Python 3.12
  • pandas
  • SQLite
  • SQL
  • Conda
  • Snakemake
  • Docker

Motivation

This project was developed as a practical exercise to explore reproducible workflow engineering techniques commonly used in bioinformatics and data science. It demonstrates how Python, SQL, Conda, Snakemake and Docker can be combined to create a portable and reproducible analysis pipeline.

Project overview

This project analyses a small synthetic patient-infection dataset. It:

  1. reads and validates a CSV file;
  2. loads the data into a SQLite database;
  3. runs SQL queries to summarise pathogen counts and select patients over 50;
  4. exports reproducible result files;
  5. automates the workflow with Snakemake;
  6. provides both Conda and Docker execution options.

This repository contains synthetic demonstration data only. It does not contain real patient information or restricted research data.

Workflow

flowchart TD
    A[patients.csv] --> B[Python & pandas<br/>Load and validate data]
    B --> C[SQLite database]
    C --> D[SQL queries]
    D --> E[Generate output files]
    E --> F[Workflow automation with Snakemake]
    F --> G[Optional containerised execution with Docker]
Loading

Repository structure

bioinformatics-workflow-practice/
├── data/
│   └── patients.csv
├── scripts/
│   └── analyse.py
├── sql/
│   └── queries.sql
├── results/
├── Dockerfile
├── environment.yml
├── requirements.txt
├── Snakefile
└── README.md

Requirements

  • Python 3.12
  • Conda (Miniconda or Anaconda)
  • Snakemake
  • Docker (optional)

Getting Started

Using Conda

conda env create -f environment.yml
conda activate bioinformatics-workflow-practice
python scripts/analyse.py

Running the Workflow with Snakemake

snakemake --cores 1

To preview the workflow without executing commands:

snakemake --dry-run

Running with Docker

docker build -t bioinformatics-workflow-practice .
docker run --rm -v "$(pwd)/results:/app/results" bioinformatics-workflow-practice:latest

Outputs

The workflow generates the following outputs:

  • results/pathogen_summary.csv – summary of pathogen frequencies
  • results/patients_over_50.csv – filtered patient records (age > 50)
  • results/summary.md – analysis summary
  • results/patients.db – SQLite database generated during analysis

Technical Skills

  • Python
  • pandas
  • SQL
  • SQLite
  • Conda
  • Docker
  • Snakemake
  • Reproducible workflow development

Learning Outcomes

Through this project I gained introductory practical experience with:

  • Creating reproducible environments using Conda
  • Writing and executing SQL queries
  • Managing workflow automation using Snakemake
  • Containerising applications using Docker
  • Organising reproducible bioinformatics projects

Future Work

Potential future improvements include:

  • Integration of publicly available biological datasets
  • Automated testing using pytest
  • Continuous integration with GitHub Actions
  • Interactive data visualisation dashboards
  • Workflow extension for larger-scale bioinformatics datasets

Disclaimer

This repository is intended solely for educational and portfolio purposes.

All datasets are synthetic and do not contain real patient information or restricted research data.

Author

Prithvi A. J.

MSc Bioinformatics
University of Birmingham

This repository forms part of my personal portfolio for learning reproducible bioinformatics workflows and software engineering practices.

License

This project is released under the MIT License.

About

Introductory reproducible bioinformatics workflow demonstrating Python, SQL, Conda, Snakemake and Docker.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages