Skip to main content

Calculate consensus sequences

Project description

accord-rs

The accord-rs library calculates a consensus sequence from reads that where aligned against a reference sequence.

To bring something into accord (/əˈkɔrd/) is to make it agree or correspond. In German "Akkordarbeit" (piecework) is used to imply that something is done fast.

BEWARE:
This library is in the early alpha stage, and its API may be subject to change without notice.

Python

Accord provides bindings for consensus calculation from Python code. Install with pip install accord-rs, and then use like so:

from accord import Calculator
from accord.data import AlnQualityReqs

# settings for consensus calculation
reqs = AlnQualityReqs(
    min_mapq=10,            # minimum mapping quality
    mandatory_flags=0,      # required SAM flags, see: https://broadinstitute.github.io/picard/explain-flags.html
    prohibited_flags=1540,  # no unmapped, failing quality or optical duplicate reads
    indel_cutoff=0.1,       # only indels contained in at least 10 % of reads covering that position are considered
    save_ends=0,            # this has no function yet - only relevant when using PCR fragments
    min_observations=50,    # base coverage needs to be at least 50
)

# generate the consensus and alignment statistics
calc = Calculator(reqs)
consensus = calc.calculate("/path/to/reference.fasta", "/path/to/aln.bam")

# print the consensus as a FASTA record
print(consensus.consensus_seq.to_fasta())

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

accord_rs-0.0.6.tar.gz (25.4 kB view details)

Uploaded Source

Built Distributions

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

accord_rs-0.0.6-cp313-cp313t-manylinux_2_34_x86_64.whl (3.1 MB view details)

Uploaded CPython 3.13tmanylinux: glibc 2.34+ x86-64

accord_rs-0.0.6-cp313-cp313-manylinux_2_34_x86_64.whl (3.1 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.34+ x86-64

accord_rs-0.0.6-cp312-cp312-manylinux_2_34_x86_64.whl (3.1 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.34+ x86-64

accord_rs-0.0.6-cp311-cp311-manylinux_2_34_x86_64.whl (3.1 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.34+ x86-64

accord_rs-0.0.6-cp310-cp310-manylinux_2_34_x86_64.whl (3.1 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.34+ x86-64

accord_rs-0.0.6-cp39-cp39-manylinux_2_34_x86_64.whl (3.1 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.34+ x86-64

accord_rs-0.0.6-cp38-cp38-manylinux_2_34_x86_64.whl (3.1 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.34+ x86-64

File details

Details for the file accord_rs-0.0.6.tar.gz.

File metadata

  • Download URL: accord_rs-0.0.6.tar.gz
  • Upload date:
  • Size: 25.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: maturin/1.8.3

File hashes

Hashes for accord_rs-0.0.6.tar.gz
Algorithm Hash digest
SHA256 42b3418e92d9494777c3ba326079a1f93b12bc285953c9c9a08783de349e63a8
MD5 8cec497c2cd73857a4626ea90b73346b
BLAKE2b-256 9d9b610ccebd2341d0543acdd512eb236d4e998415cee13fccba64638c2064ae

See more details on using hashes here.

File details

Details for the file accord_rs-0.0.6-cp313-cp313t-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for accord_rs-0.0.6-cp313-cp313t-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 294809fb8b00c558990dbfe9f1256a3d2c89c891a216eaed61fcfe1530fbd998
MD5 cffce54dcb797a066c9df395b6dad13c
BLAKE2b-256 002e918da5d0bc48353d600ee3a46667b202735f7b2389ad25fbfa0e0cc6b356

See more details on using hashes here.

File details

Details for the file accord_rs-0.0.6-cp313-cp313-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for accord_rs-0.0.6-cp313-cp313-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 73364c5ce4b28fa0c73bf6b26eaa373ffe14cb5bee12945c693f4c65cb5f6547
MD5 ba182cc5dba6c3737bb2ec998db3a2ed
BLAKE2b-256 a02162ca817e6277cbb2ef19d5fde875a064a6bfe63c6ffc0026a03be80a7e01

See more details on using hashes here.

File details

Details for the file accord_rs-0.0.6-cp312-cp312-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for accord_rs-0.0.6-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 74ffe29c35349fc312417f0609b6e29ae763df25ca63d1d83c14a31da6a6dcf9
MD5 255bcceea28a6f91b251d354a8eef697
BLAKE2b-256 4e63a4e733db96f00507a762d34502339cc4e906e0f74e8e67d0518ee5493c14

See more details on using hashes here.

File details

Details for the file accord_rs-0.0.6-cp311-cp311-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for accord_rs-0.0.6-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 f282eaa2d4fa324b91f3d68d773c92fda7be736375cdba06b2e3d8481d826979
MD5 cd0384d0e8567d51a1e67ce128c45a8c
BLAKE2b-256 0810b9152f2a3f571a8cfe4953262de470079a0add4a3df1b2f7997f50d07dab

See more details on using hashes here.

File details

Details for the file accord_rs-0.0.6-cp310-cp310-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for accord_rs-0.0.6-cp310-cp310-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 d9124e590060db2d35345e4c97eb86184e8b5a90376b6533bac39eac32c4492d
MD5 ce49e3f31709928f54ac7dbd5d96bdf7
BLAKE2b-256 ee427d01c2c9541e747879d46597274b350354dddcc9294d399ce794a6c7e549

See more details on using hashes here.

File details

Details for the file accord_rs-0.0.6-cp39-cp39-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for accord_rs-0.0.6-cp39-cp39-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 a4e7900257dc2ced6115b6c4a0fa60bffc5d5d7fa0de9f5f74be9c50a28c45eb
MD5 bebbb855b3cd4efe4a08a0f9a42bd467
BLAKE2b-256 fa6cb2023a579120a73fc3dfe9870a2d44726de7a6ee3258bea7e3fcd7cebebd

See more details on using hashes here.

File details

Details for the file accord_rs-0.0.6-cp38-cp38-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for accord_rs-0.0.6-cp38-cp38-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 2004ca7aeb27918d39ee85eb0bbb35978bf13a5ed1978b6170df9b6f82046977
MD5 1676ab7bc709edc3861c5129d4f5996a
BLAKE2b-256 221023cd3a17a46687c85932a8317af7ec3242ec5c61853bd8521cf7464b809f

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