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

File metadata

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

File hashes

Hashes for accord_rs-0.0.4.tar.gz
Algorithm Hash digest
SHA256 f622bd6d5f3d7616fe58db02c8e50ddb52a7d38e7320b2fcc52a1ee327673122
MD5 070234db23cfa581744b53efd5ed124b
BLAKE2b-256 8a3558f69a9973b41c1ec0687c2c53d27159d404c68708b986c5300ed2f4cd83

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for accord_rs-0.0.4-cp313-cp313t-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 d400ef10df508077c7d51c28e556bdb982fc91ce4a856866e556be35bd5afe29
MD5 9cea26b81e5cbbd3a0cbb538210cbed3
BLAKE2b-256 ec7c9702fd4406a6801256e62998a9d47557ca2fa8fadc03dac7c36f14cbb140

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for accord_rs-0.0.4-cp313-cp313-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 e3669b7c5ff5893813f24b40757a02e64eabf41a9d4995f9d779def95a7dbc08
MD5 e68b7c5cf055f23386f71023faad6d8d
BLAKE2b-256 a82806c0a2e245f27e0ef89cb102a177a454880255cee0eaf57367b36e74776d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for accord_rs-0.0.4-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 a40c771b3c244214d0087a6489995bd1384e580badba82569e85940540379188
MD5 7e58c1c09d5175e72b934a36cba55781
BLAKE2b-256 ad6cb2ae5b716d69018c2db14372ad23fd67679735beb754e7d46d862ba7051c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for accord_rs-0.0.4-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 0e4a58b5e728a2457e5149dae89032efeb0b7d854a543a8fe2fec47980e2c852
MD5 9737ccd80472147338c3514e74caf4a0
BLAKE2b-256 22f8412a33560556121fe53c61c301861473f3167e1b61009746c0bd3ae1e05e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for accord_rs-0.0.4-cp310-cp310-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 d151234bfc48a3c18f3f2d0db679aa9216092f2a81bd16f8abcef13aff665a81
MD5 8dfb9dbf315998d77b89641f04773c46
BLAKE2b-256 f9bee4828c6087d3f4a2b087af744a462c2621f0840b2931febcb3b444b9c97d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for accord_rs-0.0.4-cp39-cp39-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 32fb206da90f886bd52bd13d764d8ac833bc06c322fea5f8f655929a2c1f8ba2
MD5 f4b9c04ddf3faa4bba545fa9c89c275d
BLAKE2b-256 7ce8939d4bc5f1f925f95852a90c1ad2f692473db6c5982380ca0bd82f25379f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for accord_rs-0.0.4-cp38-cp38-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 7290b871046801cbd27bf75bf98a990510089e96a568c99ea660ac542d4df5e2
MD5 ae7a058d0d852e47e0964f1bf1d9ecb0
BLAKE2b-256 48dd7d50e1867ed1e76aaf8893ab18af1a895f6b85b3d40dfa9b55fb40dc017e

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