Skip to content

Draw chromosome ideograms highlighting BED coverage, centromeres, and telomeres.

License

Notifications You must be signed in to change notification settings

MaxSimonNm/IdeoCoverage

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

8 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

IdeoCoverage

🧬 IdeoCoverage is a Python-based tool for visualizing chromosome ideograms with integrated coverage information from BED files. It highlights centromeric and telomeric regions using cytoband annotations and shows whether these critical genomic features are covered or not.


✨ Features

  • Draws scaled chromosome ideograms (chr1–22, X, Y)
  • Highlights:
    • πŸŸ₯ Covered / Uncovered centromeres
    • 🟩 Covered / Uncovered telomeres
    • πŸ”· BED coverage regions
  • Uses cytoband files to annotate centromeres and telomeric regions
  • Generates high-resolution SVG plots
  • Adds minor ticks and a clean legend for publication-quality visuals

πŸ› οΈ Requirements

  • Python 3.7+
  • Packages:
    • matplotlib
    • pandas
    • pybedtools # needs bedtools installed on your system (for pybedtools to work)
    • pyfaidx

Install dependencies:

pip install -r requirements.txt

πŸ“¦ Usage

python3 coverage_ideogram.py \
    --fasta path/to/reference.fasta \
    --bed path/to/regions.bed \
    --cytoband path/to/cytoBand.txt \
    --output coverage_ideogram.svg

Example

python3 coverage_ideogram.py \
    --fasta hg19.fa \
    --bed example.bed \
    --cytoband cytoBand.txt \
    --output ideogram_output.svg

βœ… Inputs

Argument Description
--fasta Reference genome FASTA file (like hg19.fasta)
--bed BED file containing regions of interest (like regions.bed)
--cytoband Cytoband annotation file (UCSC-style hg19_cytoBand.txt)
--output Output image filename (recommended: .svg)

πŸ–ΌοΈ Example Output

  • When full fasta file is provided:

Ideogram Preview

  • When specific chromosome fasta file is provided:

Ideogram Preview

🌐 Cytoband Files

You can download a cytoband file from the UCSC Table Browser:

πŸ™ Acknowledgements

  • UCSC Genome Browser β€” for cytoband annotations
  • pyfaidx β€” for efficient FASTA file parsing
  • pybedtools β€” for BED file manipulation
  • matplotlib β€” for visualization
  • pandas β€” for data handling

πŸ“œ License

This project is licensed under the MIT License.

About

Draw chromosome ideograms highlighting BED coverage, centromeres, and telomeres.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages