Skip to main content

Tools to filter sam o bam files by percent identity or percent of matched sequence

Project description

logo

A Python tool to filter sam/bam files by percent identity or percent of matched sequence

PyPI GitHub release (latest by date) GitHub license Contributor Covenant DOI


Percent identity is computed as:

$$PI = 100 \frac{N_m}{N_m + N_i}$$

where $N_m$ is the number of matches and $N_i$ is the number of mismatches.

Percent of matched sequences is computed as:

$$PM = 100 \frac{N_m}{L}$$

where $L$ corresponds to query sequence length.

NOTES

  1. Percent of matched sequence is also an alternative definition of percent identity used in some cases, for intance, in BLAST.

  2. BAM/SAM files must contain MD tags to be able to filter by percent identity. Aligners such as BWA add MD tags to each queried sequence in a BAM file. MD tags can also be generated with samtools.

Installation

pip install filtersam

Usage

You can find a jupyter notebook with usage examples here.

Citation

If you use this software, please cite it as below:

Robaina-Estévez, S. (2022). filterSAM: filter sam/bam files by percent identity or percent of matched sequence (Version 0.0.11)[Computer software]. https://doi.org/10.5281/zenodo.7056278.

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

filtersam_tools-0.0.11.tar.gz (11.7 kB view details)

Uploaded Source

Built Distribution

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

filtersam_tools-0.0.11-py3-none-any.whl (10.6 kB view details)

Uploaded Python 3

File details

Details for the file filtersam_tools-0.0.11.tar.gz.

File metadata

  • Download URL: filtersam_tools-0.0.11.tar.gz
  • Upload date:
  • Size: 11.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for filtersam_tools-0.0.11.tar.gz
Algorithm Hash digest
SHA256 a8557f3b1f2da22dd5ad7279edf19ed1982aa5155008e4e1308bbb97130b554a
MD5 d1bea634c8082c149f240209f623505f
BLAKE2b-256 ca0c76209641972ab02b80cf359ddee92a8eb976d5265ce14f5a6240d98895f4

See more details on using hashes here.

Provenance

The following attestation bundles were made for filtersam_tools-0.0.11.tar.gz:

Publisher: publish.yml on Robaina/filterSAM

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file filtersam_tools-0.0.11-py3-none-any.whl.

File metadata

File hashes

Hashes for filtersam_tools-0.0.11-py3-none-any.whl
Algorithm Hash digest
SHA256 7f704a93098eb7aa60a570f3e77964587195ca465c532b73837be7439fc78f08
MD5 bb6be28580962642e0bd14765ceb611d
BLAKE2b-256 99274a75e18ec18cda710916c9e0e8727f63dd7947a742d58eadea3882e8ae29

See more details on using hashes here.

Provenance

The following attestation bundles were made for filtersam_tools-0.0.11-py3-none-any.whl:

Publisher: publish.yml on Robaina/filterSAM

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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