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.2.tar.gz (8.3 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.2-py3-none-any.whl (8.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mutview-0.0.2.tar.gz
  • Upload date:
  • Size: 8.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.9

File hashes

Hashes for mutview-0.0.2.tar.gz
Algorithm Hash digest
SHA256 56b51f9912fcfedb4e50ba0b7cf2ec8e47ca712a3a787cad24f4afbfce6e7bf8
MD5 47cc0d3d838d196e81b9baf6f2cd0069
BLAKE2b-256 1c13da1792dd0b91957585e9267f8fed9f099f561f413b5035f8de6237e5e578

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mutview-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 8.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.9

File hashes

Hashes for mutview-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 5fe9a929bcffcbae786248d72cf29ee47c1bf95c24253cd5b5379ca710d6a216
MD5 eafe5c762dd9578f4f5da6b1154be443
BLAKE2b-256 1711313258bd16f808455b918cfb246526ecfe022fa84a5502b8cf1fa7581c86

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