Skip to content

Commit

Permalink
readme and docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
dubssieg committed Nov 29, 2023
1 parent 32e82fe commit 603c962
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 11 deletions.
31 changes: 21 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,28 @@
[![](https://img.shields.io/badge/Python-3.10-blue.svg)]()
[![](https://img.shields.io/badge/Documentation-unfinished-orange.svg)]()
[![](https://img.shields.io/badge/build-passing-green.svg)]()
[![](https://img.shields.io/badge/Python-3.11-blue.svg)]()
[![](https://img.shields.io/badge/Python-3.12-blue.svg)]()
[![](https://img.shields.io/badge/documentation-unfinished-orange.svg)]()

# GFAgraphs
# GFAGraphs - A Python GFA library

This package aims to be an abstraction layer for GFA file format.
This Python library aims to be an abstraction layer for GFA file format.
Two implementations are proposed:
+ a legacy one, which will remain until deprecated, in `gfagraphs/`
+ a new, cleaner and faster implementation, in `pgGraphs/`

Its a simple, convinient but lack-luster library to extract informations from GFA files, be it as the graph or line level.
> [!WARNING]\
> Moving forward, features will only be added to `pgGraphs`, while `gfagraphs` will remain as it, until full migration is done in [pancat](https://github.com/Tharos-ux/pancat) tool.
Main features are :
+ **Record** (line-level) and **Graph** (file-level) abstractions
+ Full decoding of **GFA tags** (standard+optional)
+ **pip**-installable (`pip install gfagraphs`)
+ **networkx** integration
## Package pgGraphs

![](https://media.discordapp.net/attachments/874430800802754623/1179353568105467964/library.png)

The package is organized in 4 modules:
+ `pgGraphs.abstractions` contains abstractions over GFA formats
+ `pgGraphs.gfaparser` contains an abstract class for parsing and saving GFA file format
+ `pgGraphs.graph` contains the main `Graph` class that represents a GFA graph in memory, and edit functions
+ `pgGraphs.networkx` conains an abstract class for visualization and modelization of GFA in a NetworkX object

> [!NOTE]\
> Want to contribute? Feel free to open a PR on an issue about a missing, buggy or incomplete feature!
2 changes: 1 addition & 1 deletion pgGraphs/gfaparser.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
""
"Abstract class for parsing and saving GFA file format"
from re import match, sub
from typing import Callable
from json import loads, dumps
Expand Down
1 change: 1 addition & 0 deletions pgGraphs/networkx.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
"Abstract class for visualization and modelization of GFA in a NetworkX object"
from networkx import MultiDiGraph, DiGraph
from pgGraphs.graph import Graph
from tharospytools.matplotlib_tools import get_palette
Expand Down
3 changes: 3 additions & 0 deletions test_pggraphs.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,7 @@


def test_init_empty_graph() -> None:
"""
Tests the initialization of an empty graph
"""
graph: Graph = Graph()

0 comments on commit 603c962

Please sign in to comment.