PyOVERCAST 1.0.2__tar.gz → 1.0.4__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: PyOVERCAST
3
- Version: 1.0.2
3
+ Version: 1.0.4
4
4
  Summary: A Python package for mining key transcription factors from transcriptome data.
5
5
  Author-email: Tinghua Huang <thua45@126.com>
6
6
  License-Expression: MIT
@@ -65,25 +65,25 @@ if __name__ == '__main__':
65
65
  print(sets_names)
66
66
 
67
67
  # list avaiable TFs
68
- tfs_codes = clinks.get_tfs(set_name='human_hocomoco_CLink_wtcoor_1w_0.8')
68
+ tfs_codes = clinks.get_tfs(set_name='human_hocomoco_CLink_rci4_1w_0.8')
69
69
  print(tfs_codes)
70
70
 
71
71
  # get targets
72
- targets = clinks.get_targets(set_name='human_hocomoco_CLink_wtcoor_1w_0.8', tf='NFKB1_HUMAN.H11MO.1.B')
72
+ targets = clinks.get_targets(set_name='human_hocomoco_CLink_rci4_1w_0.8', tf='NFKB1_HUMAN.H11MO.1.B')
73
73
  print(targets)
74
74
 
75
75
  # predict one DEG-list
76
- result = predict.olcr(set_names=['human_hocomoco_CLink_wtcoor_1w_0.8', 'human_jaspar_CLink_wtcoor_1w_0.8'], list_file='./PyOVERCAST_data/input_deg-list.txt', win=30, thread_n=16)
76
+ result = predict.olcr(set_names=['human_jaspar_CLink_rci4_1w_0.8', 'human_hocomoco_CLink_rci4_1w_0.8'], list_file='./PyOVERCAST_data/input_deg-list.txt', win=30, thread_n=16)
77
77
 
78
78
  # or predict one DEG-list with bootstrap
79
- result = predict.olcr_bootstrap(set_names=['human_hocomoco_CLink_wtcoor_1w_0.8', 'human_jaspar_CLink_wtcoor_1w_0.8'], list_file='./OVERCAST_data/input_deg-list.txt', win=30, bs_n=1000, thread_n=32)
79
+ result = predict.olcr_bootstrap(set_names=['human_jaspar_CLink_rci4_1w_0.8', 'human_hocomoco_CLink_rci4_1w_0.8'], list_file='./OVERCAST_data/input_deg-list.txt', win=30, bs_n=1000, thread_n=32)
80
80
 
81
81
  # save result to text file
82
82
  result.to_csv('output.txt', sep='\t', index=False, encoding='utf-8')
83
83
 
84
84
  # plot OLC matrix
85
- predict.plot_olc(set_names=['human_hocomoco_CLink_wtcoor_1w_0.8', 'human_jaspar_CLink_wtcoor_1w_0.8'], list_file='./PyOVERCAST_data/input_deg-list.txt', tf='MA0844.2_XBP1', win=30)
85
+ predict.plot_olc(set_names=['human_jaspar_CLink_rci4_1w_0.8', 'human_hocomoco_CLink_rci4_1w_0.8'], list_file='./PyOVERCAST_data/input_deg-list.txt', tf='MA0844.2_XBP1', win=30)
86
86
 
87
87
  # plot fitted 3D U-surface
88
- predict.plot_fit3D(set_names=['human_hocomoco_CLink_wtcoor_1w_0.8', 'human_jaspar_CLink_wtcoor_1w_0.8'], list_file='./PyOVERCAST_data/input_deg-list.txt', tf='MA0844.2_XBP1', win=30)
88
+ predict.plot_fit3D(set_names=['human_jaspar_CLink_rci4_1w_0.8', 'human_hocomoco_CLink_rci4_1w_0.8'], list_file='./PyOVERCAST_data/input_deg-list.txt', tf='MA0844.2_XBP1', win=30)
89
89
  ```
@@ -144,7 +144,7 @@ def compute_dtci_core(df, x_col='x', y_col='y', z_col='z',
144
144
 
145
145
  # 子指标
146
146
  DI = np.abs(beta3) / (np.abs(beta3) + c * z_std)
147
- SI = min(1.0, -np.log10(max(p_values[3], 1e-10)) / 25.0)
147
+ SI = min(1.0, -np.log10(max(p_values[3], 1e-10)) / 10.0)
148
148
  QI = max(0.0, R2_adj)
149
149
 
150
150
  total_weight = alpha + beta_w + gamma
@@ -540,7 +540,7 @@ def thread_one_bs(tfbs_array, deg_list, win, bs_n, shared_list, nn, lock):
540
540
  for i in range(tf_n):
541
541
  # fin_n += 1
542
542
  beta_xy, pval_xy, DTCI, bs_pval = rrho_coor_bs(deg_list, tfbs_array[i][1], win, bs_n)
543
- rank_score = (DTCI * (-1.0 * math.log10(bs_pval + 1E-25) / 25)) ** 0.5
543
+ rank_score = (DTCI * min(1.0, -np.log10(max(bs_pval, 1e-5)) / 5.0)) ** 0.5
544
544
  with lock:
545
545
  shared_list.append([tfbs_array[i][0], beta_xy, pval_xy, DTCI, bs_pval, rank_score])
546
546
  nn[1] += 1
@@ -764,13 +764,13 @@ def plot_fit3D(set_names=['human_hocomoco_CLink_wtcoor_1w_0.8'], list_file='inpu
764
764
 
765
765
  if __name__ == '__main__':
766
766
  '''
767
- result = olcr(set_names=['human_hocomoco_CLink_wtcoor_1w_0.8', 'human_jaspar_CLink_wtcoor_1w_0.8'], list_file='OVERCAST_data/input_deg-list.txt', win=30, thread_n=16)
767
+ result = olcr(set_names=['human_jaspar_CLink_rci4_1w_0.8', 'human_hocomoco_CLink_rci4_1w_0.8'], list_file='OVERCAST_data/input_deg-list.txt', win=30, thread_n=16)
768
768
  result.to_csv('output.txt', sep='\t', index=False, encoding='utf-8')
769
769
 
770
- result = olcr_bootstrap(set_names=['human_hocomoco_CLink_wtcoor_1w_0.8', 'human_jaspar_CLink_wtcoor_1w_0.8'], list_file='OVERCAST_data/input_deg-list.txt', win=30, thread_n=16)
770
+ result = olcr_bootstrap(set_names=['human_jaspar_CLink_rci4_1w_0.8', 'human_hocomoco_CLink_rci4_1w_0.8'], list_file='OVERCAST_data/input_deg-list.txt', win=30, thread_n=16)
771
771
  result.to_csv('output_bootstrap.txt', sep='\t', index=False, encoding='utf-8')
772
772
  '''
773
773
 
774
- #plot_olc(set_names=['human_hocomoco_CLink_wtcoor_1w_0.8', 'human_jaspar_CLink_wtcoor_1w_0.8'], list_file='OVERCAST_data/input_deg-list.txt', tf='MA0844.2_XBP1', win=30)
774
+ #plot_olc(set_names=['human_jaspar_CLink_rci4_1w_0.8', 'human_hocomoco_CLink_rci4_1w_0.8'], list_file='OVERCAST_data/input_deg-list.txt', tf='MA0844.2_XBP1', win=30)
775
775
 
776
- #plot_fit3D(set_names=['human_hocomoco_CLink_wtcoor_1w_0.8', 'human_jaspar_CLink_wtcoor_1w_0.8'], list_file='OVERCAST_data/input_deg-list.txt', tf='MA0844.2_XBP1', win=30)
776
+ #plot_fit3D(set_names=['human_jaspar_CLink_rci4_1w_0.8', 'human_hocomoco_CLink_rci4_1w_0.8'], list_file='OVERCAST_data/input_deg-list.txt', tf='MA0844.2_XBP1', win=30)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: PyOVERCAST
3
- Version: 1.0.2
3
+ Version: 1.0.4
4
4
  Summary: A Python package for mining key transcription factors from transcriptome data.
5
5
  Author-email: Tinghua Huang <thua45@126.com>
6
6
  License-Expression: MIT
@@ -65,25 +65,25 @@ if __name__ == '__main__':
65
65
  print(sets_names)
66
66
 
67
67
  # list avaiable TFs
68
- tfs_codes = clinks.get_tfs(set_name='human_hocomoco_CLink_wtcoor_1w_0.8')
68
+ tfs_codes = clinks.get_tfs(set_name='human_hocomoco_CLink_rci4_1w_0.8')
69
69
  print(tfs_codes)
70
70
 
71
71
  # get targets
72
- targets = clinks.get_targets(set_name='human_hocomoco_CLink_wtcoor_1w_0.8', tf='NFKB1_HUMAN.H11MO.1.B')
72
+ targets = clinks.get_targets(set_name='human_hocomoco_CLink_rci4_1w_0.8', tf='NFKB1_HUMAN.H11MO.1.B')
73
73
  print(targets)
74
74
 
75
75
  # predict one DEG-list
76
- result = predict.olcr(set_names=['human_hocomoco_CLink_wtcoor_1w_0.8', 'human_jaspar_CLink_wtcoor_1w_0.8'], list_file='./PyOVERCAST_data/input_deg-list.txt', win=30, thread_n=16)
76
+ result = predict.olcr(set_names=['human_jaspar_CLink_rci4_1w_0.8', 'human_hocomoco_CLink_rci4_1w_0.8'], list_file='./PyOVERCAST_data/input_deg-list.txt', win=30, thread_n=16)
77
77
 
78
78
  # or predict one DEG-list with bootstrap
79
- result = predict.olcr_bootstrap(set_names=['human_hocomoco_CLink_wtcoor_1w_0.8', 'human_jaspar_CLink_wtcoor_1w_0.8'], list_file='./OVERCAST_data/input_deg-list.txt', win=30, bs_n=1000, thread_n=32)
79
+ result = predict.olcr_bootstrap(set_names=['human_jaspar_CLink_rci4_1w_0.8', 'human_hocomoco_CLink_rci4_1w_0.8'], list_file='./OVERCAST_data/input_deg-list.txt', win=30, bs_n=1000, thread_n=32)
80
80
 
81
81
  # save result to text file
82
82
  result.to_csv('output.txt', sep='\t', index=False, encoding='utf-8')
83
83
 
84
84
  # plot OLC matrix
85
- predict.plot_olc(set_names=['human_hocomoco_CLink_wtcoor_1w_0.8', 'human_jaspar_CLink_wtcoor_1w_0.8'], list_file='./PyOVERCAST_data/input_deg-list.txt', tf='MA0844.2_XBP1', win=30)
85
+ predict.plot_olc(set_names=['human_jaspar_CLink_rci4_1w_0.8', 'human_hocomoco_CLink_rci4_1w_0.8'], list_file='./PyOVERCAST_data/input_deg-list.txt', tf='MA0844.2_XBP1', win=30)
86
86
 
87
87
  # plot fitted 3D U-surface
88
- predict.plot_fit3D(set_names=['human_hocomoco_CLink_wtcoor_1w_0.8', 'human_jaspar_CLink_wtcoor_1w_0.8'], list_file='./PyOVERCAST_data/input_deg-list.txt', tf='MA0844.2_XBP1', win=30)
88
+ predict.plot_fit3D(set_names=['human_jaspar_CLink_rci4_1w_0.8', 'human_hocomoco_CLink_rci4_1w_0.8'], list_file='./PyOVERCAST_data/input_deg-list.txt', tf='MA0844.2_XBP1', win=30)
89
89
  ```
@@ -0,0 +1,46 @@
1
+ # PyOVERCAST
2
+
3
+ A Python package for mining key transcription factors from transcriptome data.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ pip install numpy pandas statsmodels scipy seaborn matplotlib PyOVERCAST
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ ```python
14
+ from PyOVERCAST import clinks, predict
15
+
16
+ if __name__ == '__main__':
17
+ # download TF-target set, only need to run once!!!
18
+ clinks.download_data()
19
+
20
+ # list available TF-target set
21
+ sets_names = clinks.get_sets(species='Homo sapiens')
22
+ print(sets_names)
23
+
24
+ # list avaiable TFs
25
+ tfs_codes = clinks.get_tfs(set_name='human_hocomoco_CLink_rci4_1w_0.8')
26
+ print(tfs_codes)
27
+
28
+ # get targets
29
+ targets = clinks.get_targets(set_name='human_hocomoco_CLink_rci4_1w_0.8', tf='NFKB1_HUMAN.H11MO.1.B')
30
+ print(targets)
31
+
32
+ # predict one DEG-list
33
+ result = predict.olcr(set_names=['human_jaspar_CLink_rci4_1w_0.8', 'human_hocomoco_CLink_rci4_1w_0.8'], list_file='./PyOVERCAST_data/input_deg-list.txt', win=30, thread_n=16)
34
+
35
+ # or predict one DEG-list with bootstrap
36
+ result = predict.olcr_bootstrap(set_names=['human_jaspar_CLink_rci4_1w_0.8', 'human_hocomoco_CLink_rci4_1w_0.8'], list_file='./OVERCAST_data/input_deg-list.txt', win=30, bs_n=1000, thread_n=32)
37
+
38
+ # save result to text file
39
+ result.to_csv('output.txt', sep='\t', index=False, encoding='utf-8')
40
+
41
+ # plot OLC matrix
42
+ predict.plot_olc(set_names=['human_jaspar_CLink_rci4_1w_0.8', 'human_hocomoco_CLink_rci4_1w_0.8'], list_file='./PyOVERCAST_data/input_deg-list.txt', tf='MA0844.2_XBP1', win=30)
43
+
44
+ # plot fitted 3D U-surface
45
+ predict.plot_fit3D(set_names=['human_jaspar_CLink_rci4_1w_0.8', 'human_hocomoco_CLink_rci4_1w_0.8'], list_file='./PyOVERCAST_data/input_deg-list.txt', tf='MA0844.2_XBP1', win=30)
46
+ ```
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "PyOVERCAST"
7
- version = "1.0.2"
7
+ version = "1.0.4"
8
8
  license = "MIT" # SPDX expression
9
9
  description = "A Python package for mining key transcription factors from transcriptome data."
10
10
  readme = "README.md"
@@ -1,46 +0,0 @@
1
- # PyOVERCAST
2
-
3
- A Python package for mining key transcription factors from transcriptome data.
4
-
5
- ## Installation
6
-
7
- ```bash
8
- pip install numpy pandas statsmodels scipy seaborn matplotlib PyOVERCAST
9
- ```
10
-
11
- ## Usage
12
-
13
- ```python
14
- from PyOVERCAST import clinks, predict
15
-
16
- if __name__ == '__main__':
17
- # download TF-target set, only need to run once!!!
18
- clinks.download_data()
19
-
20
- # list available TF-target set
21
- sets_names = clinks.get_sets(species='Homo sapiens')
22
- print(sets_names)
23
-
24
- # list avaiable TFs
25
- tfs_codes = clinks.get_tfs(set_name='human_hocomoco_CLink_wtcoor_1w_0.8')
26
- print(tfs_codes)
27
-
28
- # get targets
29
- targets = clinks.get_targets(set_name='human_hocomoco_CLink_wtcoor_1w_0.8', tf='NFKB1_HUMAN.H11MO.1.B')
30
- print(targets)
31
-
32
- # predict one DEG-list
33
- result = predict.olcr(set_names=['human_hocomoco_CLink_wtcoor_1w_0.8', 'human_jaspar_CLink_wtcoor_1w_0.8'], list_file='./PyOVERCAST_data/input_deg-list.txt', win=30, thread_n=16)
34
-
35
- # or predict one DEG-list with bootstrap
36
- result = predict.olcr_bootstrap(set_names=['human_hocomoco_CLink_wtcoor_1w_0.8', 'human_jaspar_CLink_wtcoor_1w_0.8'], list_file='./OVERCAST_data/input_deg-list.txt', win=30, bs_n=1000, thread_n=32)
37
-
38
- # save result to text file
39
- result.to_csv('output.txt', sep='\t', index=False, encoding='utf-8')
40
-
41
- # plot OLC matrix
42
- predict.plot_olc(set_names=['human_hocomoco_CLink_wtcoor_1w_0.8', 'human_jaspar_CLink_wtcoor_1w_0.8'], list_file='./PyOVERCAST_data/input_deg-list.txt', tf='MA0844.2_XBP1', win=30)
43
-
44
- # plot fitted 3D U-surface
45
- predict.plot_fit3D(set_names=['human_hocomoco_CLink_wtcoor_1w_0.8', 'human_jaspar_CLink_wtcoor_1w_0.8'], list_file='./PyOVERCAST_data/input_deg-list.txt', tf='MA0844.2_XBP1', win=30)
46
- ```
File without changes
File without changes