Reverse Symmetric Graph: a Python3 API to store succession relationships between DNA oriented fragments in an oriented graph
revsymg is a Python3 API to store succession relationships between oriented fragments (in forward or reverse orientation) that have been sequenced from nucleotide sequence(s) in an oriented graph.
For example, this API can be used for a genome assembly overlap-layout-consensus method.
You can find the complete documentation here
Quick installation
To install the revsymg package from the PyPI repository, run the pip command :
pip install revsymg
You can find more installation details in the docs/src/install.md file.
Quick usage example
from revsymg.graphs import RevSymGraph
from revsymg.lib import FORWARD_INT, REVERSE_INT
#
# Create an empty graph
#
graph = RevSymGraph()
vertices = graph.vertices()
edges = graph.edges()
#
# Add two vertices v and w that represents e.g. DNA fragments
#
frag_1_index = vertices.add() # = 0
frag_2_index = vertices.add() # = 1
#
# Add to the graph the overlap v reverse overlaps w forward
#
frag_1_r = (frag_1_index, REVERSE_INT)
frag_2_f = (frag_2_index, FORWARD_INT)
overlap_index = edges.add(frag_1_r, frag_2_f) # = 0
for u, v, edge_index in edges:
print(
f'Predecessor:\t{u}\n'
f'Successor:\t{v}\n'
f'Edge index:\t{edge_index}\n',
)
# The for-loop print this:
#
# Predecessor: (1, 1)
# Successor: (0, 0)
# Edge index: 0
#
# Predecessor: (0, 1)
# Successor: (1, 0)
# Edge index: 0
#
Changelog
You can refer to the docs/src/changelog.md file for details.
What next?
Find a list of ideas in the docs/src/todo.md file.
Contributing
- If you find any errors, missing documentation or test, or you want to discuss features you would like to have, please post an issue (with the corresponding predefined template) here.
- If you want to help me code, please post an issue or contact me. You can find coding convention in the docs/src/contributing.md file.
References
- The implemented structure is described as DGF in this preprint:
📰 Victor Epain, ‘Overlap Graph for Assembling and Scaffolding Algorithms: Paradigm Review and Implementation Proposals’, 2022, https://hal.inria.fr/hal-03815190
- Inspired by graph-tool
Licence
This work is licensed under a GNU-GPLv3 licence.
Metadata
Release files for revsymg 0.4.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| revsymg-0.4.1.tar.gz | 63.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| revsymg-0.4.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 124.8 kB
Release files / revsymg-0.4.1.tar.gz
| Download URL | revsymg-0.4.1.tar.gz |
|---|---|
| Size | 63.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
be9d7c4ff1072f676fabf9444991a7baf8815428a8a19b0b10760c84f53c0dd8
|
|
BLAKE2b-256 checksum How to use checksums |
5718b08424703a07a8e47bde2e959707cfae30aefeeb156fdbd40d7b021d1b9d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.16
|
Release files / revsymg-0.4.1-py3-none-any.whl
| Download URL | revsymg-0.4.1-py3-none-any.whl |
|---|---|
| Size | 61.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b5d8fd3032e6695aef4145a77825bf4026ca73cb28fb112d645710b3b8b01edb
|
|
BLAKE2b-256 checksum How to use checksums |
af3e8e7487add403dc6d8db956b8a08f43a60a6372405d15cb114fd71dd78232
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.16
|