A package to detect IBS regions
Project description
IBSpy
Python library to identify Identical By State regions
Installyng IBSpy
There easiest way to install IBSpy is to use pip3.
pip3 install IBSpy
If pip3
fails, you can clone the project and compiling it with:
pip3 install cython biopython pyfaidx
python3 setup.py develop
Then you should have the IBSpy command available.
Preparing the databases
IBSpy requires to have a kmer database from the sequencing files. Currently two formats are supported:
- Jellyfish: Follow the instructions in its website
- kmerGWAS: Has an adhoc file format that contains only the kmers in a binary representation, sorted. This option is faster than the jellyfish version, but creating the kmer table is less straight forward. The manual is here.
Running IBSPy
IBSpy has relatively few options, you can look at them with the ---help
command.
IBSPy --help
usage: IBSPy [-h] [-w WINDOW_SIZE] [-k KMER_SIZE] [-d DATABASE] [-r REFERENCE]
[-z] [-o OUTPUT] [-f {kmerGWAS,jellyfish}]
optional arguments:
-h, --help show this help message and exit
-w WINDOW_SIZE, --window_size WINDOW_SIZE
window size to analyze
-k KMER_SIZE, --kmer_size KMER_SIZE
Kmer size of the database
-d DATABASE, --database DATABASE
Kmer database
-r REFERENCE, --reference REFERENCE
The reference with the position of the kmers
-z, --compress When an ouput file is present, it is compressed as .gz
-o OUTPUT, --output OUTPUT
Output file. If missing, the ouptut is sent to stdout
-f {kmerGWAS,jellyfish}, --database_format {kmerGWAS,jellyfish}
Database format (kmerGWAS, jellyfish)
To generate the table with the number of observed kmers and variants run the following command, using the kmer database from kmerGWAS use the following command:
IBSpy --output "kmer_windows_LineXXX.tsv.gz" -z --database kmers_with_strand --reference arinaLrFor.fa --window_size 50000 --compress
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
IBSpy-0.1.0.tar.gz
(149.7 kB
view hashes)