Skip to content

medvir/Coverage

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Coverage Analysis Pipeline

This repository provides a minimal workflow to compute genome coverage from sequencing reads and visualize it.

The workflow has two steps:

  1. Python script (coverage) – maps reads to a reference genome and calculates per-base coverage.
  2. Shiny web app – visualizes coverage across the genome and allows exporting the plot.

Requirements

Command line tools

The Python script requires:

  • bwa
  • samtools
  • Python ≥ 3

Example installation (conda):

conda install -c bioconda bwa samtools

Step 1 — Compute Coverage

Reads are mapped to a reference genome using BWA, and coverage is calculated using samtools.

Usage

coverage -i READS -r REFERENCE

Arguments

Argument Description
-i Input reads (FASTA / FASTQ / FASTQ.GZ)
-r Reference genome (FASTA)

Example

coverage -i sample.fastq.gz -r reference.fasta

Output

Two files are produced:

BAM alignment

sample.bam
sample.bam.bai

Coverage file

sample.coverage

Format:

Reference   Position   Coverage

Example:

Genome1    1    42
Genome1    2    38
Genome1    3    41

This file is used for visualization in the Shiny app.

Step 2 — Visualize Coverage

Coverage can be visualized using the Shiny application:

http://172.23.210.220:3838/NGS/Coverage/

Usage

  1. Open the link in a browser.
  2. Upload the .coverage file generated by the Python script.
  3. The app will display a coverage plot across the genome.

The plot shows:

  • Genome position (x-axis)
  • Coverage depth (log scale)
  • Horizontal coverage (percentage of positions with coverage > 0)
  • Mean vertical coverage (average read depth)

Exporting the Plot

Click “Download PDF” to export the figure.

Output example:

plot_YYYY-MM-DD.pdf

Example Workflow

# compute coverage
coverage -i reads.fastq.gz -r reference.fasta

# upload output file
reads.coverage

Then open:

http://172.23.210.220:3838/NGS/Coverage/

and upload the .coverage file to generate the plot.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors