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

File metadata

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

File hashes

Hashes for accord_rs-0.0.7.tar.gz
Algorithm Hash digest
SHA256 fe5290e32536b3f2a43ca808de29961a1289bd619e6ad006a9ed87bfea9622da
MD5 5cd238e5e8304a45ac763e8a7953bce0
BLAKE2b-256 bd8a5eb253cfb504f372e0e58eb7297f68f528ed1008008c9f0b3e2b41a57f43

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for accord_rs-0.0.7-cp313-cp313t-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 324c670b2b032d833bbd676caa1284cc6cb9a24b32dd1cb892210bb89b6574a3
MD5 b7c50d53360e057abb20ccffa8123b62
BLAKE2b-256 17e87e8f7024c32aca02f24f448ee4e9c39f4fd34e2c5bac4088e2a8a87dc877

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for accord_rs-0.0.7-cp313-cp313-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 2d582d042ce4e427fd6c91968530a284f97b5a41937cc5471aac2d03b39722d8
MD5 a8b5ae2536813c68791dac87263cb4bb
BLAKE2b-256 3130d7495a1e4c7cea965deb675a36593bc404b617b12f965304dff8ed29e7b7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for accord_rs-0.0.7-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 fb3ff0169c914a1cfdb5c776358a85e5bfb7513bc1af420c7ded246c3ccecf10
MD5 6b100c20d21212bd086fc9de03558fa1
BLAKE2b-256 0d757888c5089268de9b62a329762e978dcf0ae879c003c594dc5d589a49eda4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for accord_rs-0.0.7-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 ee5fb23f6d27e1f6ac6d01f76e203e9a1d1e6ea840240605e50cd397cc4cdf3a
MD5 9bddcc6bff66df51e159615ede63636c
BLAKE2b-256 dd9555d1754fb7814289cebfa4cd6c89950baeda832ed80256a1fe147bf66458

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for accord_rs-0.0.7-cp310-cp310-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 917bd78a811b015d6a874503992659da0102a86a9b88b9020a84189c88198c2f
MD5 8d58648766e45a8c769d148a35bee419
BLAKE2b-256 e91be14a7cbf39a3a28c86f0b0b8807650c7cd5dad0bdb2aa7bdb23455995fcc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for accord_rs-0.0.7-cp39-cp39-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 fb683c840eafe22c37ccb1a075aa0471029710c270c7da0727f6b8018a201218
MD5 af145dae87df9d30d8c314c7207c918b
BLAKE2b-256 dd3a3fc0ffa1933cec9aa8d222963177e75517240ebd02b941b83ca7538c96bb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for accord_rs-0.0.7-cp38-cp38-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 0576a64b478b4a91332865e596a3938d8410a1979221252300422c355c4bf9f7
MD5 58188200dd0c77831fdbdb57a66008ca
BLAKE2b-256 97745ed9e39c53014ea2357e6d150270a96c6a5843ee65d0893506129893cd83

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