PyTFBS 1.0.12__tar.gz → 1.0.14__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.
- {pytfbs-1.0.12 → pytfbs-1.0.14}/PKG-INFO +2 -2
- {pytfbs-1.0.12 → pytfbs-1.0.14}/PyTFBS/clink.py +9 -4
- {pytfbs-1.0.12 → pytfbs-1.0.14}/PyTFBS.egg-info/PKG-INFO +2 -2
- {pytfbs-1.0.12 → pytfbs-1.0.14}/README.md +1 -1
- {pytfbs-1.0.12 → pytfbs-1.0.14}/pyproject.toml +1 -1
- {pytfbs-1.0.12 → pytfbs-1.0.14}/LICENSE +0 -0
- {pytfbs-1.0.12 → pytfbs-1.0.14}/PyTFBS/__init__.py +0 -0
- {pytfbs-1.0.12 → pytfbs-1.0.14}/PyTFBS/motif.py +0 -0
- {pytfbs-1.0.12 → pytfbs-1.0.14}/PyTFBS/predict.py +0 -0
- {pytfbs-1.0.12 → pytfbs-1.0.14}/PyTFBS.egg-info/SOURCES.txt +0 -0
- {pytfbs-1.0.12 → pytfbs-1.0.14}/PyTFBS.egg-info/dependency_links.txt +0 -0
- {pytfbs-1.0.12 → pytfbs-1.0.14}/PyTFBS.egg-info/entry_points.txt +0 -0
- {pytfbs-1.0.12 → pytfbs-1.0.14}/PyTFBS.egg-info/requires.txt +0 -0
- {pytfbs-1.0.12 → pytfbs-1.0.14}/PyTFBS.egg-info/top_level.txt +0 -0
- {pytfbs-1.0.12 → pytfbs-1.0.14}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: PyTFBS
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.14
|
|
4
4
|
Summary: PyTFBS: A Python Package for Transcription Factor Binding Site Prediction
|
|
5
5
|
Author-email: Tinghua Huang <thua45@126.com>
|
|
6
6
|
License-Expression: MIT
|
|
@@ -94,7 +94,7 @@ for tf_cname in tf_cnames[tf_code]:
|
|
|
94
94
|
tar_exps = {idx: row.tolist() for idx, row in df_rexps_tars.iterrows()}
|
|
95
95
|
rcis = clink.rci(tar_exps, tf_exp)
|
|
96
96
|
for rci in rcis:
|
|
97
|
-
score = rci[1] + (random.uniform(1E-
|
|
97
|
+
score = rci[1] + (random.uniform(1E-15, 1E-10) * random.choice([1, -1]))
|
|
98
98
|
print(tf_cname[0] + '\t' + rci[0] + '\t' + str(score))
|
|
99
99
|
|
|
100
100
|
```
|
|
@@ -162,7 +162,7 @@ def read_rexp_file(file=None, data_dir=None):
|
|
|
162
162
|
return df_rexps
|
|
163
163
|
|
|
164
164
|
def read_PyTFBS_output(file):
|
|
165
|
-
|
|
165
|
+
tar_scores = {}
|
|
166
166
|
for line in open(file):
|
|
167
167
|
if line[0] == '#':
|
|
168
168
|
continue
|
|
@@ -171,8 +171,13 @@ def read_PyTFBS_output(file):
|
|
|
171
171
|
score = float(lblocks[3])
|
|
172
172
|
jindex = float(lblocks[2])
|
|
173
173
|
if score > 0.8 and jindex > 0.3:
|
|
174
|
-
|
|
175
|
-
|
|
174
|
+
if gene_name in tar_scores:
|
|
175
|
+
if tar_scores[gene_name] < score:
|
|
176
|
+
tar_scores[gene_name] = score
|
|
177
|
+
else:
|
|
178
|
+
tar_scores[gene_name] = score
|
|
179
|
+
sorted_tars = sorted(tar_scores, key=tar_scores.get, reverse=True)
|
|
180
|
+
return sorted_tars[:8000]
|
|
176
181
|
|
|
177
182
|
def get_rexp_files(species=None, data_dir=None):
|
|
178
183
|
if data_dir == None:
|
|
@@ -210,5 +215,5 @@ if __name__ == '__main__':
|
|
|
210
215
|
tar_exps = {idx: row.tolist() for idx, row in df_rexps_tars.iterrows()}
|
|
211
216
|
rcis = rci(tar_exps, tf_exp)
|
|
212
217
|
for rci in rcis:
|
|
213
|
-
score = rci[1] + (random.uniform(
|
|
218
|
+
score = rci[1] + (10 ** random.uniform(-15, -10) * random.choice([1, -1]))
|
|
214
219
|
print(tf_cname[0] + '\t' + rci[0] + '\t' + str(score))
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: PyTFBS
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.14
|
|
4
4
|
Summary: PyTFBS: A Python Package for Transcription Factor Binding Site Prediction
|
|
5
5
|
Author-email: Tinghua Huang <thua45@126.com>
|
|
6
6
|
License-Expression: MIT
|
|
@@ -94,7 +94,7 @@ for tf_cname in tf_cnames[tf_code]:
|
|
|
94
94
|
tar_exps = {idx: row.tolist() for idx, row in df_rexps_tars.iterrows()}
|
|
95
95
|
rcis = clink.rci(tar_exps, tf_exp)
|
|
96
96
|
for rci in rcis:
|
|
97
|
-
score = rci[1] + (random.uniform(1E-
|
|
97
|
+
score = rci[1] + (random.uniform(1E-15, 1E-10) * random.choice([1, -1]))
|
|
98
98
|
print(tf_cname[0] + '\t' + rci[0] + '\t' + str(score))
|
|
99
99
|
|
|
100
100
|
```
|
|
@@ -59,7 +59,7 @@ for tf_cname in tf_cnames[tf_code]:
|
|
|
59
59
|
tar_exps = {idx: row.tolist() for idx, row in df_rexps_tars.iterrows()}
|
|
60
60
|
rcis = clink.rci(tar_exps, tf_exp)
|
|
61
61
|
for rci in rcis:
|
|
62
|
-
score = rci[1] + (random.uniform(1E-
|
|
62
|
+
score = rci[1] + (random.uniform(1E-15, 1E-10) * random.choice([1, -1]))
|
|
63
63
|
print(tf_cname[0] + '\t' + rci[0] + '\t' + str(score))
|
|
64
64
|
|
|
65
65
|
```
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|