Skip to content

Latest commit

 

History

8 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

genome-player

Turns a VCF (Variant Call Format) file into music. Each variant's REF/ALT alleles are mapped to pitches on a minor scale, quality score becomes velocity, and genomic position becomes time. One .midi file is written per chromosome.

Usage

Place a VCF file named gfx0237502_401-freebayes.final.vcf in the working directory, then:

cargo run --release

This produces one <chromosome>.midi file per chromosome found in the input (e.g. chr1.midi, chr2.midi, ...).

Only PASS records on chr1-chr22, chrX, chrY, and chrM are used; everything else is skipped.

How it works

  • src/variant.rs — parses VCF lines into Variants (chromosome, position, ref/alt alleles, quality).
  • src/converter.rs — maps each variant's alleles to a pitch on a randomly rooted minor scale, merges variants that land on the same time slot, and writes the result as a Standard MIDI File via midly.

Development

cargo test    # run unit tests
cargo build   # debug build

About

Turns VCF genome variant files into MIDI music, mapping alleles to pitch, quality to velocity, and position to time.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages