Metadata-Version: 2.4
Name: PyTFBS
Version: 1.0.3
Summary: PyTFBS: A Python Package for Transcription Factor Binding Site Prediction
Author-email: Tinghua Huang <thua45@126.com>
License-Expression: MIT
Project-URL: Homepage, https://github.com/thua45/pytfbs
Project-URL: Documentation, https://github.com/thua45/pytfbs#readme
Project-URL: Repository, https://github.com/thua45/pytfbs
Project-URL: Issues, https://github.com/thua45/pytfbs/issues
Keywords: PyTFBS,Transcription Factor,Binding Site
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: torch
Requires-Dist: numpy==1.26; sys_platform == "darwin"
Requires-Dist: numpy>=2.0; sys_platform == "win32"
Requires-Dist: numpy>=2.0; sys_platform == "linux"
Provides-Extra: dev
Requires-Dist: matplotlib; extra == "dev"
Provides-Extra: test
Requires-Dist: matplotlib; extra == "test"
Dynamic: license-file

# PyTFBS

A Python package for dpredicting transcription factor binding sites.

## Installation

```bash
pip install torch numpy PyTFBS
```

## Usage

```python
from PyTFBS import motif, predict

# download PyTFBS data, only need to run once!!!
motif.download_data()

# list available models
motif.list_models(species='Homo sapiens', accuracy=0.9, sensitivity=0.8, specificity=0.9, precision=0.8, f1=0.8)

# get avaiable motifs
motifs = motif.get_motifs(species='Homo sapiens', accuracy=0.9, sensitivity=0.8, specificity=0.9, precision=0.8, f1=0.8)
print(motifs)

# get models based on motif name
models = motif.get_models('RFX2_HUMAN.H11MO.0.A')
print(models)

# predict one model
predict.script('CEBPB_HUMAN.H11MO.0.A', 'CEBPB_HUMAN.H11MO.0.A_1231', 'input_seq_file.fasta', 'out_file.txt')

# speed up using mutil-threading (for Windows OS only)
predict.win_bin('CEBPB_HUMAN.H11MO.0.A', 'CEBPB_HUMAN.H11MO.0.A_1231', 'input_seq_file.fasta', 64, 'out_file.txt')

# run prediction with user motif data
# the my_motif_dir should be organized as [[motif], [trace], [par]]
predict.script('CEBPB_HUMAN.H11MO.0.A', 'CEBPB_HUMAN.H11MO.0.A_1231', 'input_seq_file.fasta', data_dir='my_motif_dir')
predict.win_bin('CEBPB_HUMAN.H11MO.0.A', 'CEBPB_HUMAN.H11MO.0.A_1231', 'input_seq_file.fasta', 64, data_dir='my_motif_dir')
```
