Skip to main content

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

This version

0.1

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)

Uploaded Source

Built Distribution

mygfa-0.1-py2.py3-none-any.whl (5.8 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page