Metadata-Version: 2.4
Name: ranbo4s
Version: 1.0.2
Summary: A Python package for mining key transcription factors from transcriptome data.
Author-email: Tinghua Huang <thua45@126.com>
License-Expression: MIT
Project-URL: Homepage, https://github.com/thua45/ranbo4s
Project-URL: Documentation, https://github.com/thua45/ranbo4s#readme
Project-URL: Repository, https://github.com/thua45/ranbo4s
Project-URL: Issues, https://github.com/thua45/ranbo4s/issues
Keywords: ranbo4s,Transcription Factor,Binding Site,Transcriptome Data
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: numpy>=1.26; sys_platform == "darwin"
Requires-Dist: numpy>=2.0; sys_platform == "win32"
Requires-Dist: numpy>=2.0; sys_platform == "linux"
Requires-Dist: pandas>=3.0; sys_platform == "darwin"
Requires-Dist: pandas>=3.0; sys_platform == "win32"
Requires-Dist: pandas>=3.0; sys_platform == "linux"
Requires-Dist: statsmodels>=0.14; sys_platform == "darwin"
Requires-Dist: statsmodels>=0.14; sys_platform == "win32"
Requires-Dist: statsmodels>=0.14; sys_platform == "linux"
Requires-Dist: scipy>=1.16; sys_platform == "darwin"
Requires-Dist: scipy>=1.16; sys_platform == "win32"
Requires-Dist: scipy>=1.16; sys_platform == "linux"
Requires-Dist: seaborn>=0.13; sys_platform == "darwin"
Requires-Dist: seaborn>=0.13; sys_platform == "win32"
Requires-Dist: seaborn>=0.13; sys_platform == "linux"
Requires-Dist: matplotlib>=3.11; sys_platform == "darwin"
Requires-Dist: matplotlib>=3.11; sys_platform == "win32"
Requires-Dist: matplotlib>=3.11; sys_platform == "linux"
Provides-Extra: dev
Requires-Dist: matplotlib; extra == "dev"
Provides-Extra: test
Requires-Dist: matplotlib; extra == "test"
Dynamic: license-file

# ranbo4s

A Python package for mining key transcription factors from transcriptome data.

## Installation

```bash
pip install numpy pandas statsmodels scipy seaborn matplotlib ranbo4s
```

## Usage

```python
from ranbo4s import clinks, predict

if __name__ == '__main__':
	# download TF-target set, only need to run once!!!
	clinks.download_data()

	# list available TF-target set
	sets_names = clinks.get_sets(species='Homo sapiens')
	print(sets_names)

	# list avaiable TFs
	tfs_codes = clinks.get_tfs(set_name='human_hocomoco_CLink_rci4_1w_0.8')
	print(tfs_codes)

	# get targets
	targets = clinks.get_targets(set_name='human_hocomoco_CLink_rci4_1w_0.8', tf='NFKB1_HUMAN.H11MO.1.B')
	print(targets)
	
	# predict one DEG-list
	result = predict.rbo(set_names=['Chicken_CLink_Hocomoco_v2_8k', 'Chicken_CLink_Jaspar_v2_8k'], list_file='./ranbo4s_data/input_deg-list.txt', thread_n=16, bs_n=500)

	# save result to text file
	result.to_csv('output.txt', sep='\t', index=False, encoding='utf-8')
	
	# plot OLC matrix
	predict.plot_olc(set_names=['Human_CLink_Hocomoco_v2_8k', 'Human_CLink_Jaspar_v2_8k'], list_file='./ranbo4s_data/input_deg-list.txt', tf='BHA15_HUMAN.H11MO.0.B_RC', win=30)

	# list available annotations
	annots_names = clinks.get_annots(species='Homo sapiens')
	print(annots_names)

	# get diff targets
	result = predict.diff_tars(set_names=['Human_CLink_Hocomoco_v2_8k', 'Human_CLink_Jaspar_v2_8k'], list_file='ranbo4s_data/input_deg-list.txt', tf='BHA15_HUMAN.H11MO.0.B_RC')
	result.to_csv('diff_tars.txt', sep='\t', index=False, encoding='utf-8')

	# annotate one DEG-list (TF)
	result = predict.rbo_annot(set_names=['Human_CLink_Hocomoco_v2_8k', 'Human_CLink_Jaspar_v2_8k'], annot_names=['c5.go.v2025.1.Hs.symbols_Homo_sapiens'], list_file='ranbo4s_data/input_deg-list.txt', tf='BHA15_HUMAN.H11MO.0.B_RC', thread_n=16, bs_n=500)
	result.to_csv('output_annotation.txt', sep='\t', index=False, encoding='utf-8')
	
	# plot annotation matrix
	predict.plot_annot(set_names=['Human_CLink_Hocomoco_v2_8k', 'Human_CLink_Jaspar_v2_8k'], annot_names=['c5.go.v2025.1.Hs.symbols_Homo_sapiens'], list_file='ranbo4s_data/input_deg-list.txt', tf='BHA15_HUMAN.H11MO.0.B_RC', term='GOBP ORGANELLE ASSEMBLY', win=30)
```
