A package for visualizing kmers.
Project description
Kmer Manifold Approximation and Projection (KMAP)
kmap is a package for visualizing kmers in 2D space.
Installation
conda create --name=kmap_test python=3.11
conda activate kmap_test
conda install anaconda::scipy
conda install anaconda::numpy
conda install anaconda::matplotlib
conda install anaconda::pandas
conda install anaconda::click
conda install anaconda::tomli-w
conda install anaconda::requests
conda install conda-forge::biopython
conda install bioconda::logomaker
pip install taichi
pip install kmer-map
Example usage
The following code shows the typical workflow of the test data in ./tests/test.fa
# step 0: preprocess input fast file
kmap preproc --fasta_file ./tests/test.fa --res_dir ./test
# step 2: scanning for motifs
kmap scan_motif --res_dir ./test --debug true
# step 3: visualize kmers
# now edit the "./test/config.toml" file, in the 3rd section "visualization"
# change "n_max_iter = 2500" to "n_max_iter = 100"
kmap visualize_kmers --res_dir ./test --debug True
If you feel the consensus is AATCGATAGC, instead of A[AATCGATAGC]GA you can use the following commands.
The motif logo for this consensus sequence is given by ./test/hamming_balls/logo.pdf
kmap ex_hamball --res_dir ./test --conseq AATCGATAGC --return_type matrix --output_file ./test/hamming_balls/AATCGATAGC_cntmat.csv
kmap draw_logo --cnt_mat_numpy_file ./test/hamming_balls/AATCGATAGC_cntmat.csv --output_fig_file ./test/hamming_balls/logo.pdf
Or if you want to change the number of maximum mutations to the consensus sequence `` to 3,
you can use the following commands to derive the motif.
The motif logo for this consensus sequence is given by ./test/hamming_balls/logo.pdf
kmap ex_hamball --res_dir ./test --conseq GTACGTAGGTCCTA --return_type matrix --max_ham_dist 3 --output_file ./test/hamming_balls/GTACGTAGGTCCTA_cntmat.csv
kmap draw_logo --cnt_mat_numpy_file ./test/hamming_balls/GTACGTAGGTCCTA_cntmat.csv --output_fig_file ./test/hamming_balls/logo.pdf
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file kmer-map-0.0.1.tar.gz.
File metadata
- Download URL: kmer-map-0.0.1.tar.gz
- Upload date:
- Size: 64.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e8cf6defdc6d5f2b6e50d5735abb22484b65d6ec01cbcbefaa728c4e3ef5d525
|
|
| MD5 |
c10fc25308f932e96ec5396e91a7fb3e
|
|
| BLAKE2b-256 |
673f2e95aaa63c066782785ba3bfae637ab05549d31becbaef29f7515e68b407
|
File details
Details for the file kmer_map-0.0.1-py3-none-any.whl.
File metadata
- Download URL: kmer_map-0.0.1-py3-none-any.whl
- Upload date:
- Size: 34.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4cfa18cc6073a8230d24c5074c6f9bb182a492ab5772335f7655f9486cd337ab
|
|
| MD5 |
c4c158e7e1d9083c6526327c0f3a3551
|
|
| BLAKE2b-256 |
6a0fd1c1d1ea6fade12ac96c8f91c5405434877e2a7617798fe45fac0624cfb8
|