PyTFBS 1.0.13__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.13 → pytfbs-1.0.14}/PKG-INFO +1 -1
- {pytfbs-1.0.13 → pytfbs-1.0.14}/PyTFBS/clink.py +9 -4
- {pytfbs-1.0.13 → pytfbs-1.0.14}/PyTFBS.egg-info/PKG-INFO +1 -1
- {pytfbs-1.0.13 → pytfbs-1.0.14}/pyproject.toml +1 -1
- {pytfbs-1.0.13 → pytfbs-1.0.14}/LICENSE +0 -0
- {pytfbs-1.0.13 → pytfbs-1.0.14}/PyTFBS/__init__.py +0 -0
- {pytfbs-1.0.13 → pytfbs-1.0.14}/PyTFBS/motif.py +0 -0
- {pytfbs-1.0.13 → pytfbs-1.0.14}/PyTFBS/predict.py +0 -0
- {pytfbs-1.0.13 → pytfbs-1.0.14}/PyTFBS.egg-info/SOURCES.txt +0 -0
- {pytfbs-1.0.13 → pytfbs-1.0.14}/PyTFBS.egg-info/dependency_links.txt +0 -0
- {pytfbs-1.0.13 → pytfbs-1.0.14}/PyTFBS.egg-info/entry_points.txt +0 -0
- {pytfbs-1.0.13 → pytfbs-1.0.14}/PyTFBS.egg-info/requires.txt +0 -0
- {pytfbs-1.0.13 → pytfbs-1.0.14}/PyTFBS.egg-info/top_level.txt +0 -0
- {pytfbs-1.0.13 → pytfbs-1.0.14}/README.md +0 -0
- {pytfbs-1.0.13 → pytfbs-1.0.14}/setup.cfg +0 -0
|
@@ -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))
|
|
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
|
|
File without changes
|