Simple GFA parsing, printing, and pre-processing in Python.
Project description
mygfa
This is a simple Python library for parsing, manipulating, and emitting pangenomic graphs in the GFA format. It prioritizes simplicity and clarity over performance and functionality.
As demonstrated in example.py
, this is what it looks like to compute the node depth for a GFA file:
import mygfa
import sys
graph = mygfa.Graph.parse(sys.stdin)
seg_depths = {name: 0 for name in graph.segments}
for path in graph.paths.values():
for step in path.segments:
seg_depths[step.name] += 1
Type pip install mygfa
to get started.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
mygfa-0.1.tar.gz
(5.0 kB
view hashes)