BWTsearch-0.1.15
توضیحات
Burrows Wheeler Transform (BWT) search
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | BWTsearch-0.1.15 |
| نام | BWTsearch |
| نسخه کتابخانه | 0.1.15 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | - |
| ایمیل نویسنده | - |
| آدرس صفحه اصلی | - |
| آدرس اینترنتی | https://pypi.org/project/BWTsearch/ |
| مجوز | MIT |
**Burrows Wheeler Transform (BWT) search**
Import the `BWT` class into your namespace for convenience:
```
from BWTsearch import BWT
```
Initialize a BWT of text with instantiating the BWT class:
```
text = "AGATA"
```
```
bwt = BWT(text)
```
The instance bwt now will contain all necessary indices for efficiently searching:
- `bwt.bwt` ... contains the BWT string
- `bwt.position_list` ... contains the start positions of the rotations for each character of bwt
- `bwt.ranks` ... contains rank indices for each character of the alphabet in bwt
- `bwt.cnums` ... contains number of character occurances of the alphabet in bwt
Use the `search()` function to obtain a list of positions of exact matches for pattern in text:
```
pattern = "AT"
```
```
bwt.search(pattern)
```
This returns a list with indexes into text where an exact match occurs. Empty list if none.
The pattern will be searched case-sensitive and should not contain $.
Use the `get_text()` function to retrieve the original text from the BWT instance:
```
bwt.get_text()
```
If a sequence file is available, a genome can be loaded from a FASTA file:
```
phix = BWT.from_fast_file("phix.fa")
```
```
phix.search("AGATA")
```
نحوه نصب
نصب پکیج whl BWTsearch-0.1.15:
pip install BWTsearch-0.1.15.whl
نصب پکیج tar.gz BWTsearch-0.1.15:
pip install BWTsearch-0.1.15.tar.gz