Skip to main content

A python package to efficiently store oriented DNA fragments succession relationships in a directed graph. For example, succession relationships can be overlaps between two reads.

Project description

Reverse Symmetric Graph: a Python3 API to store succession relationships between DNA oriented fragments in an oriented graph

Latest release PyPI version Coverage report Pylint score Mypy Pipeline status Documentation Status

revsymg logo

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

revsymg-0.4.1.tar.gz (63.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

revsymg-0.4.1-py3-none-any.whl (61.4 kB view details)

Uploaded Python 3

File details

Details for the file revsymg-0.4.1.tar.gz.

File metadata

  • Download URL: revsymg-0.4.1.tar.gz
  • Upload date:
  • Size: 63.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for revsymg-0.4.1.tar.gz
Algorithm Hash digest
SHA256 be9d7c4ff1072f676fabf9444991a7baf8815428a8a19b0b10760c84f53c0dd8
MD5 db290743cf84d6e7412171fd5696f88e
BLAKE2b-256 5718b08424703a07a8e47bde2e959707cfae30aefeeb156fdbd40d7b021d1b9d

See more details on using hashes here.

File details

Details for the file revsymg-0.4.1-py3-none-any.whl.

File metadata

  • Download URL: revsymg-0.4.1-py3-none-any.whl
  • Upload date:
  • Size: 61.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for revsymg-0.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b5d8fd3032e6695aef4145a77825bf4026ca73cb28fb112d645710b3b8b01edb
MD5 009f110329b25e8a95fc7fb59e342549
BLAKE2b-256 af3e8e7487add403dc6d8db956b8a08f43a60a6372405d15cb114fd71dd78232

See more details on using hashes here.

Supported by

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