Skip to main content

A command tool to view reads over a loci from bam file, like a lightweigth IGV

Project description

MutView

MutView is a tool to view the reads cover a mutation in bam file, output file is html format. It's so fast and efficient, just like a lightweight IGV(Integrative Genomics Viewer).

example

Requires

  • python >= 3.7
  • samtools

Installation

pip install mutview

or

pip install git+https://github.com/TuBieJun/MutView.git

Example use

mutview -s -n 250 -c 2 -p 25466919 -r path_of_ref_fasta -S path_of_samtools -b input_bam -o out.html

Argument description

$ mutview
usage: mutview [-h] -p POS -c CHROM -b BAM -r REF -o OUT [-w WINDOW_SIZE] [-s]
               [-n NUM_READS] [-q BASE_Q] [-Q ALN_Q] [-f FONT] [-S SAMTOOLS]

optional arguments:
  -h, --help            show this help message and exit
  -p POS, --pos POS     the mutation position
  -c CHROM, --chrom CHROM
                        the chrom of mutation
  -b BAM, --bam BAM     the input bam file
  -r REF, --ref REF     the reference genome fasta file
  -o OUT, --out OUT     the output html file
  -w WINDOW_SIZE, --window_size WINDOW_SIZE
                        the window size of reference genome around the
                        mutation, default is 300
  -s, --sort            sort as base like igv, default is False
  -n NUM_READS, --num_reads NUM_READS
                        the max reads number to view default is 100
  -q BASE_Q, --base_q BASE_Q
                        the min base quality, reads with bq below the
                        specified threshold will be lowercases. default is 20.
  -Q ALN_Q, --aln_q ALN_Q
                        the min aln quality, bases with mq below the specified
                        threshold will be highlighted. default is 20.
  -f FONT, --font FONT  the the font of the out html file, it should be
                        monospaced font, default is consolas for windows, if
                        you view the out html file in mac, you need set the
                        value to Menlo or other monospaced fonts
  -S SAMTOOLS, --samtools SAMTOOLS
                        the samtools path, default is samtools


Out html Description

  • The bases that are inconsistent with the reference genome will be highlighted.
  • The bases with quality below the specified threshold will be represented in lowercase letters.
  • The background color of reads with alignment quality below the specified threshold will be highlighted.
  • Indels are represented using the characters "I" and "_".
  • The count of each base type will be displayed at the top
  • The left sidebar will display the name of the reads, pair information, and forward/reverse strand information.

Here is example out:

example

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

mutview-0.0.3.tar.gz (9.5 kB view details)

Uploaded Source

Built Distribution

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

mutview-0.0.3-py3-none-any.whl (8.1 kB view details)

Uploaded Python 3

File details

Details for the file mutview-0.0.3.tar.gz.

File metadata

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

File hashes

Hashes for mutview-0.0.3.tar.gz
Algorithm Hash digest
SHA256 5f8429749780206e79be86befb42ed755d4b4219a447f3e0fcd53575640895d9
MD5 eabd780ff9e922609557287cd4ce0930
BLAKE2b-256 f26b9574fb4f13eb004eb0c43ad93311ff11497f14ac74706b3acb56e788c70c

See more details on using hashes here.

Provenance

The following attestation bundles were made for mutview-0.0.3.tar.gz:

Publisher: release.yml on TuBieJun/MutView

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

File details

Details for the file mutview-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: mutview-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 8.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for mutview-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 4292959eb7b46016cddd5ecfcfeac7475cf53d795f844db5ad501b745da0a6f7
MD5 dc9cda3d3053ca3f4b615c2a4683ace3
BLAKE2b-256 42511fe0186e22dceb568e402222e891fdfc912527aa7ebd2bbdd10f36b222ea

See more details on using hashes here.

Provenance

The following attestation bundles were made for mutview-0.0.3-py3-none-any.whl:

Publisher: release.yml on TuBieJun/MutView

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