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.4.tar.gz (16.4 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.4-py3-none-any.whl (17.3 kB view details)

Uploaded Python 3

File details

Details for the file bamaligncleaner-0.4.tar.gz.

File metadata

  • Download URL: bamaligncleaner-0.4.tar.gz
  • Upload date:
  • Size: 16.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.21

File hashes

Hashes for bamaligncleaner-0.4.tar.gz
Algorithm Hash digest
SHA256 e2634a2d645faea292f77953d174d1a4f33f00ff9a7e7997470ccb13f4693d87
MD5 df5e0fd5af02a2a71208b0c385e92b4a
BLAKE2b-256 f62842152163fd40f8a609ba029d61c546581b1c1df17c025772e0db6f55f550

See more details on using hashes here.

File details

Details for the file bamaligncleaner-0.4-py3-none-any.whl.

File metadata

  • Download URL: bamaligncleaner-0.4-py3-none-any.whl
  • Upload date:
  • Size: 17.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.21

File hashes

Hashes for bamaligncleaner-0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 df5c495608cae5a7ab1b9496636b18fd1a64e580dfe4c3122eaab77eebad4739
MD5 2e61642bd0ae3aca6fd04dc15cd2a4b6
BLAKE2b-256 b59363c5bdc95a0bcacffbcee9158dcbef7c561016190cd95a77da2874aa86f2

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