A python for plotting dot plots from blast results.
Project description
dotplotter
build dotplots from blastn results
Description
dotplotter
can take blast results, either as standard input or from a .tsv file and plots a standard dot plot. It can also highlight regions based on provided arguments (single region) or from a file (single or multiple regions) see below. Dot plots are a classic way to visualise DNA similarity and can be used for whole chromosomes or small regions.
Installation
The easiest way to install dotplotter is though the python package index.
pip install dotplotter
This will fetch and install the latest version from: LINK
You can also install by cloning this repository.
dotplotter
only requires matplotlib
and this should be installed automatically.
Usage
Basic Usage
You can use dotplotter
in two ways: using stdin, or reading a .tsv file.
Example data can be found in this repository ./example_data
.
Important: Regardless of method, make sure your results are in blast outfmt 6. This is specified in the search with -outfmt 6
stdin method
You can pipe your blastn
results straight into dotplotter
:
blastn -query streptomyces_coelicolor.fna -subject streptomyces_albus.fna -outfmt 6 | dotplotter
.tsv method
You can also read your results in from a previously generated .tsv file (e.g. blastn -query streptomyces_coelicolor.fna -subject streptomyces_albus.fna -outfmt 6 > blastn.tsv
)
dotplotter -i blastn.tsv
Highlighting
You can also highlight regions of interest.
Important: Highlighted regions are based on the query sequence ONLY.
Single Region Highlighting
The easiest way to highlight a single region is to use the in-built parameters: -hs
/highlight-start
and -he
/--highlight-end
. For example:
dotplotter -i blastn.tsv -hs 3024902 -he 3054689
Multiple Region Highlighting
To highlight multiple regions, you can provide a .csv file containing the required information. Each line should contain the start position, end position and the hex value (or colour name).
See .example_data/highlight.csv
for an example. You can specify this file with -hf
/--highligh-file
.
dotplotter -i blastn.tsv -hf highlight.csv
Further Usage
For more usage information, use the help command:
dotplotter -h
Citation
Coming soon...
Patch Notes
Verion 1
- 1.0.0
- initial release
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file dotplotter-1.0.0.tar.gz
.
File metadata
- Download URL: dotplotter-1.0.0.tar.gz
- Upload date:
- Size: 18.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 colorama/0.4.4 importlib-metadata/4.6.4 keyring/23.5.0 pkginfo/1.8.2 readme-renderer/34.0 requests-toolbelt/0.9.1 requests/2.31.0 rfc3986/1.5.0 tqdm/4.57.0 urllib3/1.26.5 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0df87ba435e55b77fc2b735bb576093aaba7d227d7fae3b18e4bf0ae066397ea |
|
MD5 | d87d1b283723b33b6e86e6b3bcbb91dd |
|
BLAKE2b-256 | c3f3b31cbe4649b1f2e1dde75580e1a7b185c4df9be88b69296c0d443d4970c4 |
File details
Details for the file dotplotter-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: dotplotter-1.0.0-py3-none-any.whl
- Upload date:
- Size: 19.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 colorama/0.4.4 importlib-metadata/4.6.4 keyring/23.5.0 pkginfo/1.8.2 readme-renderer/34.0 requests-toolbelt/0.9.1 requests/2.31.0 rfc3986/1.5.0 tqdm/4.57.0 urllib3/1.26.5 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7312917bafb89802e227c7888178652179ce1d61a0929f7d14d2af3618fb93b7 |
|
MD5 | 488ba48dbce6607edcb380160e3bfe86 |
|
BLAKE2b-256 | 31812897f3e2aea6347e317329f9789101dcdd8a846524d8daeb5983bc355c14 |