Skip to main content

Simple Python interface to CoverM's fast coverage estimation functions

Project description

pyCoverM

This package is still in experimental stages and aims to be a simple Python interface to CoverM's fast coverage estimation functions. Currently, pyCoverM provides two functions: is_bam_sorted, which checks whether a BAM file is sorted by coordinate, and get_coverages_from_bam, that computes average contig coverages from sorted BAM files.

Installation

pip install pycoverm

Usage

/// is_bam_sorted(bam_file)
/// --
///
/// Checks whether a BAM file is sorted by coordinate.
///
/// Parameters
/// ----------
/// bam_file : str
///     Path to a BAM file.
///
/// Returns
/// -------
/// bool
///     Returns `True` if the BAM file is sorted by coordinate and `False`
///     otherwise.
/// get_coverages_from_bam(bam_list, contig_end_exclusion=75, min_identity=0.97,
/// trim_lower=0.0, trim_upper=0.0, contig_list=None, threads=1)
/// --
///
/// Computes contig mean coverages from sorted BAM files. All BAM files must be
/// mapped to the same reference.
/// Trimmed means will be computed if `trim_min` and/or `trim_max` are set to
/// values greater than 0.
///
/// Parameters
/// ----------
/// bam_list : list
///     Paths to input BAM files.
/// contig_end_exclusion : int, optional
///     Exclude bases at the ends of reference sequences from calculation.
///     Default is 75.
/// min_identity : float, optional
///     Exclude reads by overall identity to the reference sequences.
///     Default is 0.97.
/// trim_lower : float, optional
///     Fraction to trim from the lower tail of the coverage distribution.
///     Default is 0.0.
/// trim_upper : float, optional
///     Fraction to trim from the upper tail of the coverage distribution.
///     Default is 0.0.
/// contig_set : set, optional
///     If provided, only the coverages of the contigs within `contig_set` will
///     returned.
///     Default is None (return the coverages of all contigs).
/// threads : int, optional
///     Number of threads to use for coverage computation. Default is 1.
///
/// Returns
/// -------
/// tuple
///     A tuple whose fist element is a list of the contig names and the second
///     one is a numpy matrix of contig coverages in the input BAM files.

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

pycoverm-0.6.2.tar.gz (35.4 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

pycoverm-0.6.2-pp310-pypy310_pp73-musllinux_1_2_x86_64.whl (901.9 kB view details)

Uploaded PyPymusllinux: musl 1.2+ x86-64

pycoverm-0.6.2-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (729.8 kB view details)

Uploaded PyPymanylinux: glibc 2.17+ x86-64

pycoverm-0.6.2-pp39-pypy39_pp73-musllinux_1_2_x86_64.whl (901.9 kB view details)

Uploaded PyPymusllinux: musl 1.2+ x86-64

pycoverm-0.6.2-pp38-pypy38_pp73-musllinux_1_2_x86_64.whl (902.3 kB view details)

Uploaded PyPymusllinux: musl 1.2+ x86-64

pycoverm-0.6.2-cp313-cp313t-musllinux_1_2_x86_64.whl (901.7 kB view details)

Uploaded CPython 3.13tmusllinux: musl 1.2+ x86-64

pycoverm-0.6.2-cp313-cp313-musllinux_1_2_x86_64.whl (901.7 kB view details)

Uploaded CPython 3.13musllinux: musl 1.2+ x86-64

pycoverm-0.6.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (730.5 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

pycoverm-0.6.2-cp313-cp313-macosx_11_0_arm64.whl (625.1 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

pycoverm-0.6.2-cp313-cp313-macosx_10_12_x86_64.whl (648.1 kB view details)

Uploaded CPython 3.13macOS 10.12+ x86-64

pycoverm-0.6.2-cp312-cp312-musllinux_1_2_x86_64.whl (901.7 kB view details)

Uploaded CPython 3.12musllinux: musl 1.2+ x86-64

pycoverm-0.6.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (730.5 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

pycoverm-0.6.2-cp312-cp312-macosx_11_0_arm64.whl (625.1 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

pycoverm-0.6.2-cp312-cp312-macosx_10_12_x86_64.whl (648.1 kB view details)

Uploaded CPython 3.12macOS 10.12+ x86-64

pycoverm-0.6.2-cp311-cp311-musllinux_1_2_x86_64.whl (901.5 kB view details)

Uploaded CPython 3.11musllinux: musl 1.2+ x86-64

pycoverm-0.6.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (730.1 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

pycoverm-0.6.2-cp311-cp311-macosx_11_0_arm64.whl (625.5 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

pycoverm-0.6.2-cp311-cp311-macosx_10_12_x86_64.whl (648.8 kB view details)

Uploaded CPython 3.11macOS 10.12+ x86-64

pycoverm-0.6.2-cp310-cp310-musllinux_1_2_x86_64.whl (901.4 kB view details)

Uploaded CPython 3.10musllinux: musl 1.2+ x86-64

pycoverm-0.6.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (730.3 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

pycoverm-0.6.2-cp39-cp39-musllinux_1_2_x86_64.whl (901.3 kB view details)

Uploaded CPython 3.9musllinux: musl 1.2+ x86-64

pycoverm-0.6.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (729.9 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

pycoverm-0.6.2-cp38-cp38-musllinux_1_2_x86_64.whl (901.0 kB view details)

Uploaded CPython 3.8musllinux: musl 1.2+ x86-64

pycoverm-0.6.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (730.2 kB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ x86-64

File details

Details for the file pycoverm-0.6.2.tar.gz.

File metadata

  • Download URL: pycoverm-0.6.2.tar.gz
  • Upload date:
  • Size: 35.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.9.9

File hashes

Hashes for pycoverm-0.6.2.tar.gz
Algorithm Hash digest
SHA256 e5e96e55ee2756d0cbd1db383e136cd2c1e232204f25b015ce956b7a6f4ddee2
MD5 4f77cadf7743a722b2f92d0af73c6216
BLAKE2b-256 75f849eff332d61bbbc697f101e18a29d3f72007c699f063da85b74574f61820

See more details on using hashes here.

File details

Details for the file pycoverm-0.6.2-pp310-pypy310_pp73-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for pycoverm-0.6.2-pp310-pypy310_pp73-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 16f89a793c0f369f1ef29fe100b355a0f075be81fb4b403746822d57778e39d7
MD5 b7235406425cc450ea3afe8ed504f5d8
BLAKE2b-256 1c9bc94e0a8e3abaabfcd220a66e22aeda2300cc302964a4ec72880dde4f1697

See more details on using hashes here.

File details

Details for the file pycoverm-0.6.2-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pycoverm-0.6.2-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d813ce327c533ec43462b1d4e496f4126fc62389f3e9d2458a3036cfc8f084aa
MD5 42ef60f3379571f85603a56a498c80b1
BLAKE2b-256 45d645f601b5be7d45a101f46eac9ffc01556041dc9254cf57a661a27a9fdfe2

See more details on using hashes here.

File details

Details for the file pycoverm-0.6.2-pp39-pypy39_pp73-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for pycoverm-0.6.2-pp39-pypy39_pp73-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 d923fc7b10abf031ca1afa0ea49040060f7a7f2974a07a99701825a16c5286e9
MD5 60c7a0c4d75ed49a9084e86922ec882d
BLAKE2b-256 9da01ea01e73f0f43da4ea59821dbb0999fd171962056d8dfb0c33110b06c6f9

See more details on using hashes here.

File details

Details for the file pycoverm-0.6.2-pp38-pypy38_pp73-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for pycoverm-0.6.2-pp38-pypy38_pp73-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 2a28f9c5acc172a64b991eb00b8795a44918b7b25a35197ab1fc6eba8b24b0df
MD5 04ab1051d1dfc2853f011797001c0fde
BLAKE2b-256 f5d169a97e7931c13d2afdd2f762504c38213f480ba29e66ac1c94cd655bf0f1

See more details on using hashes here.

File details

Details for the file pycoverm-0.6.2-cp313-cp313t-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for pycoverm-0.6.2-cp313-cp313t-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 44ae1f4a99ebd206a006778e4a09da8c9d4e655dd424727899f3fe300fa8da41
MD5 e01b9bb308fea05ccadb6f83c0144075
BLAKE2b-256 50b331c9260b20f943d093e0f26aa9aa6cb4be1afbb2672e7e77529e7345fe5b

See more details on using hashes here.

File details

Details for the file pycoverm-0.6.2-cp313-cp313-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for pycoverm-0.6.2-cp313-cp313-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 5f7b304ac2bd2fde65a045ec385eea82199a2a768563e81a777a62c9550a786b
MD5 9d9aafcb8e6d63dbd06bdb6410f8c29a
BLAKE2b-256 93c6c0e0271c009e7f20ea51d5d42cba235e5b63b27b2a62403aeb09474511d8

See more details on using hashes here.

File details

Details for the file pycoverm-0.6.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pycoverm-0.6.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e1c9f23db8d64dd372cd567d5357fc5f68a7b47f437a51dfbb26a74177ce12e3
MD5 24b54a42206bf0a7ab823c65bf529090
BLAKE2b-256 22853e81dd473dbdc527d662e928dcfa7fa7fe5b32f32e08dc6337ab66aede11

See more details on using hashes here.

File details

Details for the file pycoverm-0.6.2-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pycoverm-0.6.2-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 d780a07508c7740ae6f64fbc8f563e981e8db149053d7dd099419f9281cb1a31
MD5 c20027178a6d956cf0c3c92624a70931
BLAKE2b-256 fb76ae906debdcecb36b9ad6850883a94c57a32426a803b264abb0612f7af983

See more details on using hashes here.

File details

Details for the file pycoverm-0.6.2-cp313-cp313-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for pycoverm-0.6.2-cp313-cp313-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 3357fc80c692c7d66d1fe8bdf591efee5923e04c616aa0a6d79831f27534d85a
MD5 a8db78520edbaa7275ceafb3404cc080
BLAKE2b-256 e45d70319aec37d8d5f4fab43484cafe8196fb21d9a24b0ca3edb80601b373ee

See more details on using hashes here.

File details

Details for the file pycoverm-0.6.2-cp312-cp312-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for pycoverm-0.6.2-cp312-cp312-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 84c6c02cb719d47f872dae8d0130cb8a8a785040a1ba784e1d4f56ec1add352d
MD5 950c81199df84ae4a0d2ed909ebd66c0
BLAKE2b-256 96601d8fe50225f192fe3215d01ed4ea0e3bae0275cd9b6cfa19c91a34d43425

See more details on using hashes here.

File details

Details for the file pycoverm-0.6.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pycoverm-0.6.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 37a8cb2acecccbe85480b35e2bc142f3f225a567d4d4361284967ff6b4cfbd3b
MD5 c6bd88ffbdd02948774fbd4d0c65dcea
BLAKE2b-256 62452a0d3d05f0be9c330a20d1208741d3df81dab7becf5b6a08fc101591544d

See more details on using hashes here.

File details

Details for the file pycoverm-0.6.2-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pycoverm-0.6.2-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 af342a24a850cc85441646af2a63b68a7053eb1ae228b92c0f50260dab91a87a
MD5 5f0df2806309d25710f0364324963dd0
BLAKE2b-256 278b46dba3a47a90d8a82e171c1f070472e4200ebd98d579f8189a4c54c924af

See more details on using hashes here.

File details

Details for the file pycoverm-0.6.2-cp312-cp312-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for pycoverm-0.6.2-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 11093849aa749259be3436c216cc4f0e05e17b18ff79b3214439eb0c9a6bc26a
MD5 236ebe419eba5eb601b409877ee0285b
BLAKE2b-256 fb4bfd04339ed3fb02c1e6404821e2bfca19628d1ea4abfd79b4940ba877c127

See more details on using hashes here.

File details

Details for the file pycoverm-0.6.2-cp311-cp311-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for pycoverm-0.6.2-cp311-cp311-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 b0e14d5c8df82ddc686207e5f35b303c8109148c8a9c7048bba43475d86bdb47
MD5 ca9018699e01e6d83f669645a9bae657
BLAKE2b-256 65db0c1be85fa5982f290a77fc4ad2453010e64178671fd982b5575184e6a673

See more details on using hashes here.

File details

Details for the file pycoverm-0.6.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pycoverm-0.6.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d78ef5b0c3ec8fdcd08b0a58a4cf7879b127e399055632f8c9ed805f796e2fb2
MD5 3323a3a092d0b8eebcc844b7d0069a85
BLAKE2b-256 7cca931e9579008e6cba788d03decb40c355a350b37c68db1199bd01f6b2406c

See more details on using hashes here.

File details

Details for the file pycoverm-0.6.2-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pycoverm-0.6.2-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 e9287af675071a396b80fea81276d0549bf2a7dc14d2e631d47968053b0c55d9
MD5 311b1f04130d1f97f02a43933a206e85
BLAKE2b-256 d76fbfb9e0fda4b91a9eb7d8325d86f1621e2d4d48b3da75ff781d3510ee8b81

See more details on using hashes here.

File details

Details for the file pycoverm-0.6.2-cp311-cp311-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for pycoverm-0.6.2-cp311-cp311-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 01cc815e9de3633cc872df3b1508fa0a74bc07f27e0cb520b959cce10e886b86
MD5 02685a33d6b3a808d2edcd5920919586
BLAKE2b-256 7838d21507de4ba31392d836168809cdfbd532e6debd19903bd4d59d25bc71c3

See more details on using hashes here.

File details

Details for the file pycoverm-0.6.2-cp310-cp310-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for pycoverm-0.6.2-cp310-cp310-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 bca29c645d33e12a6c4bb3a092b44321c54f366dd2e307bc27573ff38f4a3a01
MD5 2ee4896b61fe97a4b018ab52626451bf
BLAKE2b-256 96d2a096420bcd09b2c4b17a4f9da84cb3cb5c32320b4c659b8a96d0c32c3143

See more details on using hashes here.

File details

Details for the file pycoverm-0.6.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pycoverm-0.6.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 521cd6be414fe0ec26b7600018e0a3eba323759986faf0a99e6f279cca624f51
MD5 09bd45e9c35e5c1d78ded73a3c583f86
BLAKE2b-256 129d880a00b764cd79db34011fff88595985a9f4c57cceb97f086a3459576bc9

See more details on using hashes here.

File details

Details for the file pycoverm-0.6.2-cp39-cp39-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for pycoverm-0.6.2-cp39-cp39-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 2e24ef5955df3386fb61db3e3d4274ebc65a738bc9f183b8859b32922e68f1d3
MD5 bc6cc7158a844e80eb5a9062f5e87a0a
BLAKE2b-256 da3cc2ef571188d1150d484f0e1d9a22c12b4bd1537c9eb75831dc6802ed6635

See more details on using hashes here.

File details

Details for the file pycoverm-0.6.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pycoverm-0.6.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 6dd9fd5719e1cbff770473a9d4411fc2b377c41ebfeb2517bcf1fd9af807a21b
MD5 6496c2f1e891f81ee249334422b921eb
BLAKE2b-256 9c8fec227e2a4cf2c416ff9744e0a1656103e7a8757d80a2847f465f57964769

See more details on using hashes here.

File details

Details for the file pycoverm-0.6.2-cp38-cp38-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for pycoverm-0.6.2-cp38-cp38-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 6ad1ede5d0c2760f33d382f4aeafc62e51f3a17b4e5af928fdc50f08b3767f33
MD5 3886e543b7ea23f5bc7bab041d1bbdef
BLAKE2b-256 484a0525b70b81257c04815df0a44e03f2a81a99d161c9775c8b16b8f523134e

See more details on using hashes here.

File details

Details for the file pycoverm-0.6.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pycoverm-0.6.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 789ba7fe5a5035075bed33b3880f86a8b4cbec77e886a2a48c056ccb77e30637
MD5 c2b75ae5ccc39dbdfaa8bd63c5dc2011
BLAKE2b-256 eb7b78888f45ee4fbf05aca55d6a2ec0d0316a29d4f42dfc51b168411c3f8414

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