Skip to main content

Calculate consensus sequences

Project description

accord-rs

To bring something into accord (/əˈkɔrd/) is to make it agree or correspond. The accord-rs library calculates a consensus from reads that where aligned against a reference sequence.

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("/path/to/reference.fasta", "/path/to/aln.bam", reqs)
consensus, stats = calc.calculate()

# print the consensus as a FASTA record
print(consensus.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.3.tar.gz (24.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.3-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.3-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.3-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.3-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.3-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.3-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.3-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.3.tar.gz.

File metadata

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

File hashes

Hashes for accord_rs-0.0.3.tar.gz
Algorithm Hash digest
SHA256 5334ac8cceea0d900c5ca6446fb20a8dbe6fd6354b8fc518f6b9e3c0d303ce91
MD5 2adbf3bb326a84855666780633eded90
BLAKE2b-256 2baeda1068433c9fe3c9f680b98e2bbf325297f7de275360dc5efd3ce06b135a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for accord_rs-0.0.3-cp313-cp313t-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 606e54ba8a28e34d6ebe1720f9399de0970c30dbb5304d8a293e9efe12ffdad3
MD5 e8ce48e96c8c07965441d6e4497d268e
BLAKE2b-256 d4ff3117a044d02dca1e7f6fb4e4a4f32a6f8c6ed7131cafef6e54a502c16ba9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for accord_rs-0.0.3-cp313-cp313-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 33d8a796d891f81b6edb4dd7b8b8121ec99d2d811e858b911f55f92404187190
MD5 5e4377d0339551243bd12fc1ba5ffd60
BLAKE2b-256 ce26be8f2c6ed0af8782a2e38a84a4a11ac6d577c1881f3b4f31ab347c256890

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for accord_rs-0.0.3-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 2ccb06f1d46582536eefa3889b7a40f34ace92a374f41dbe9ac72ff664ae2284
MD5 e597aace1376e3a7b8d6ab58e9965489
BLAKE2b-256 f3c11028f184a5c5d90c6cf843f751b6d4522aadc1fb5001b2575676879ad7c4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for accord_rs-0.0.3-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 b70e20b04ceaca165fe37f74a2e303ffeae4f7720367577c9f5a76b389f676a4
MD5 de31d64fc28895244245380fceff9822
BLAKE2b-256 a3c1c5aaeac03d784be81bacfc5cadf1802a2c2b9c0d7496d6523ba6fef7841c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for accord_rs-0.0.3-cp310-cp310-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 44b61181d5a89a79e34d43b4ef0eb791c18cca3c4923794dfc357db20ee865ba
MD5 11e7a85e32e23a6c119800149f1504f4
BLAKE2b-256 38e1d9062522df952dc3ec4acae77d55b28f43950deff23ec29707ad17f92ab5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for accord_rs-0.0.3-cp39-cp39-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 01b21e8b907944cbc1360a9b21cd0ebe1f4591eae3e505da7dd6cdf3b25ceb8b
MD5 71ee220a89ad1db347e82fdf81a5dcdf
BLAKE2b-256 962f008d0e2b4abd36b44d5aa3b69e52e6ae584897c22b80141faf9034ea9553

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for accord_rs-0.0.3-cp38-cp38-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 ffadb38a5edf13b2db3cdc5304d68b18dac5a97494b060de591cd39019d1cc89
MD5 62f1a1c0e8eb45e6c48598fc0db10ba3
BLAKE2b-256 4ec75b03111c0d38c5c9eb6999a15e67f82817339d7f5534c3a8f130dc82ab00

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