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.5.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.5-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.5-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.5-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.5-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.5-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.5-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.5-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.5.tar.gz.

File metadata

  • Download URL: accord_rs-0.0.5.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.5.tar.gz
Algorithm Hash digest
SHA256 8e5d9704b802c4918f3062485ef9f6513ce04a98ccea31955bfe3ac007c72ee0
MD5 24764cfa7b2bae06a48b392f0565d1ec
BLAKE2b-256 cd0548fb6b86149a54c7a221de99806657b64301d8ab918ed50c9894a7183ef1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for accord_rs-0.0.5-cp313-cp313t-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 a51a520ecffc1ec11c5cd74a29544835de875c72b97be55c15ec72d7d3960104
MD5 4ea83961046d727101e252b397f2d6b4
BLAKE2b-256 3cc9b942ebf37e8134187ddee34fbba78265d8978f289825e711e68dfdbe52f6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for accord_rs-0.0.5-cp313-cp313-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 3f01c5c22d92fe14d07159dc65acffae4e2c1e8e6a073bc9b713cad5b62d0858
MD5 3d29a9d0c01019771594c65558c2e307
BLAKE2b-256 aa0bdeb3fed5ad87a29a9acb4c21eed852f753f85718e8c0d850256e4d9b2da7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for accord_rs-0.0.5-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 c8389b2812a8878ed5e28eac55a8952618e15c53f63b1163fbbd6bd98f247772
MD5 db387c348a0eb8311f9f6092816943d9
BLAKE2b-256 f975b65c06133eee4d62f3cf3b13bc6da25723d90777b051d40a3fc6a570e826

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for accord_rs-0.0.5-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 f30c4bac51a06a706bde0bb576978d1d8be7da3dd9d64207db861a9d196faa26
MD5 7fca55e4be37322d025ee0ed4c54b0ec
BLAKE2b-256 60027ffeeeb1516a77fc70d419229bcfe3b4c5ce4622a6e3b650c26ad711e9f9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for accord_rs-0.0.5-cp310-cp310-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 5fd0c48d14f48301721733f067a119bb39d52c6b797089e1b0eb335834275aba
MD5 8affd1b852ce3ac4901ddb1874f7d6a3
BLAKE2b-256 8f3f33535b60fa90204d078a605efc9e48615bcf6727335594317abdf296566d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for accord_rs-0.0.5-cp39-cp39-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 f82f7f3e68002047e4c41696e913aa03599cf984b563684ee64752f4d7553f70
MD5 6dcf5ba7def715b5530d282434f5f5de
BLAKE2b-256 adeca1d24f3e5c3002e4a65ee63c46dbf3698be1fa063c82b2086a96e67bf9d0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for accord_rs-0.0.5-cp38-cp38-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 b3d050a32fe847210e8af87b109431f5913040736da7a6d5eaa09698d93225d6
MD5 fff89031919168e4b90b92edb6842126
BLAKE2b-256 18bd017d0eaca73bbc72bc11f5fb9ff939d1ab6a244493ded0b0c69359220d8f

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