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.11.tar.gz (25.6 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.11-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.11-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.11-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.11-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.11-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.11-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.11-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.11.tar.gz.

File metadata

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

File hashes

Hashes for accord_rs-0.0.11.tar.gz
Algorithm Hash digest
SHA256 e549a37299b33be33bc269ad70353c82e1de544d3b4b02e17c8a72a5065748ac
MD5 a894763009d831cc5c0396fede828ddc
BLAKE2b-256 bafc2d1268299acdc77eb553beaeb37b46b20c3d03d397adef1c864ca9ad1dad

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for accord_rs-0.0.11-cp313-cp313t-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 5ac3f7db15f124556a891f92940c82814e52d95299c561c420be891d6ab5d74a
MD5 ba0f728c046738b729989098a53fe06d
BLAKE2b-256 f88dc6c66a9d71a277f66490c1f91ee98adab77eeb2e6bc12aad535311600490

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for accord_rs-0.0.11-cp313-cp313-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 831f761139abb7f50ca2b00234e1475b9c9e0ef6d12a0694039ed662501b0226
MD5 833e686fd902b70a49c21e95ec6b4f1b
BLAKE2b-256 61ea4c8601004e991906096cdd2a3b8831343adacce0c06a327b2a3c65445280

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for accord_rs-0.0.11-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 37a8397eb326a461af437072920f374ab068b72ac28e65082f0c7ab6a09aa6e2
MD5 925e2f75a9121c1c96f86c5c7266c945
BLAKE2b-256 6df752aae8ba0a3d758ca619069c0e9c9caef1184d724343c62dd0b6d08a5292

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for accord_rs-0.0.11-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 5404a03ebce8a911fba82422b6caabee2c2f47231f80bf8c6cebb36f63c7e8be
MD5 0b5a78f8a75ef7429f3985c487d0762d
BLAKE2b-256 2db6940a555fff89ddf116cd0842cb15c2df42db39dd6b224b4265893a806788

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for accord_rs-0.0.11-cp310-cp310-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 cc1b7403241a2acf6576bcebee73abfada381cb8a70229e2fb71b7e5a4374bac
MD5 56dca4e8c03ffcc299a6ade5334b472a
BLAKE2b-256 f4e4e576b645eb0c63efe993af68fe8df132fcf63045c0d4a06db76d586127af

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for accord_rs-0.0.11-cp39-cp39-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 2cf2ec760ba4c3f4b419c0b63e49e4b49c77137b4a6b3587ba53163ba045d4ff
MD5 a6b480e9ddf2b6c703cbc26f47615e88
BLAKE2b-256 5faace2c6875a79ef7e87421b5b6d7f8e7c0989481282322c595c57e2aacd87f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for accord_rs-0.0.11-cp38-cp38-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 7b17b64a1f22095cce41ee875e99860e3230453d61c4914517cdb6ac7383cea2
MD5 cc8908e257f9bed7f38ac1e7e6eaf3c8
BLAKE2b-256 3a5386274a7199f5c22a919a7e3ec3364c126889f574389f64e5538b6e1ce0cf

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