Skip to main content

Removes unaligned references in BAM alignment file

Project description

bamAlignCleaner-CI PyPI DOI

bamAlignCleaner

A simple utility tool to remove references with no aligned reads in a bam/cram file

Installation

  • with pip
pip install bamAlignCleaner 
  • with conda
conda install -c bioconda bamAlignCleaner

Usage

  • Quick start
bamAlignCleaner input.bam
  • Advanced
bamAlignCleaner --output output.bam --method parse input.bam

Help

$ bamAlignCleaner --help
Usage: bamAlignCleaner [OPTIONS] BAM

  bamAlignCleaner: removes unaligned references in BAM/CRAM alignment files
  * Homepage: https://github.com/maxibor/bamAlignCleaner
  * Author: Maxime Borry

  BAM: BAM alignment file (sorted, and optionally indexed)

Options:
  --version                       Show the version and exit.
  -m, --method [parse|index_stat]
                                  unaligned reference removal method
                                  [default: parse]
  -o, --output FILE               filtered bam file [default: STDOUT]
  --help                          Show this message and exit.

Methods

bamAlignCleaner uses either one of the two following methods to remove references not having reads mapped against them.

  • The parse method goes through each read of the alignment file and keeps the references if the read maps to it. This method should be faster if you have more references than reads.
  • The check_index checks index for the number of mapped reads to each reference. This method should be faster if you have more reads than references.

Cite

@software{maxime_borry_2022_6344905,
  author       = {Maxime Borry},
  title        = {maxibor/bamAlignCleaner: bamAlignCleaner},
  month        = mar,
  year         = 2022,
  publisher    = {Zenodo},
  version      = {0.2.2},
  doi          = {10.5281/zenodo.6344904},
  url          = {https://doi.org/10.5281/zenodo.6344904}
}

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

bamAlignCleaner-0.3.tar.gz (16.3 kB view details)

Uploaded Source

Built Distribution

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

bamAlignCleaner-0.3-py3-none-any.whl (17.0 kB view details)

Uploaded Python 3

File details

Details for the file bamAlignCleaner-0.3.tar.gz.

File metadata

  • Download URL: bamAlignCleaner-0.3.tar.gz
  • Upload date:
  • Size: 16.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.13

File hashes

Hashes for bamAlignCleaner-0.3.tar.gz
Algorithm Hash digest
SHA256 5ba81b7e7b75aeee109820cc5c66c49b36d08a3512eac213dec5c77ccb8bb902
MD5 50d9f5c2330bdd80bbdb525079aaea10
BLAKE2b-256 7c483142ad5924555ff6ffaae5773bb436acd43dcb4d513e7d3d74574ba8a828

See more details on using hashes here.

File details

Details for the file bamAlignCleaner-0.3-py3-none-any.whl.

File metadata

  • Download URL: bamAlignCleaner-0.3-py3-none-any.whl
  • Upload date:
  • Size: 17.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.13

File hashes

Hashes for bamAlignCleaner-0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 ec705be38d7882a88ede6061ee6bb6bd2e47cd1f387780d93897033d49b84ab7
MD5 4fac5074363a13500017623f8fc63c4a
BLAKE2b-256 f0bb43bba0311ad496adb5d9bd17ec1a45f34cae49af63e3d2e4f74a0020ede4

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