geney 1.2.18__py2.py3-none-any.whl → 1.2.20__py2.py3-none-any.whl
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.
Potentially problematic release.
This version of geney might be problematic. Click here for more details.
- geney/__init__.py +1 -1
- geney/oncosplice.py +18 -14
- geney/power_utils.py +1 -0
- {geney-1.2.18.dist-info → geney-1.2.20.dist-info}/METADATA +1 -1
- {geney-1.2.18.dist-info → geney-1.2.20.dist-info}/RECORD +7 -7
- {geney-1.2.18.dist-info → geney-1.2.20.dist-info}/WHEEL +1 -1
- {geney-1.2.18.dist-info → geney-1.2.20.dist-info}/top_level.txt +0 -0
geney/__init__.py
CHANGED
geney/oncosplice.py
CHANGED
|
@@ -12,8 +12,7 @@ import matplotlib.pyplot as plt
|
|
|
12
12
|
from matplotlib.patches import Rectangle
|
|
13
13
|
import seaborn as sns
|
|
14
14
|
from collections import namedtuple
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
print('hellp')
|
|
17
16
|
from geney.utils import find_files_by_gene_name, reverse_complement, unload_pickle, contains, unload_json, dump_json #, is_monotonic
|
|
18
17
|
from geney.Fasta_segment import Fasta_segment
|
|
19
18
|
|
|
@@ -29,7 +28,6 @@ tf.config.threading.set_inter_op_parallelism_threads(1)
|
|
|
29
28
|
sai_paths = ('models/spliceai{}.h5'.format(x) for x in range(1, 6))
|
|
30
29
|
sai_models = [load_model(resource_filename('spliceai', x)) for x in sai_paths]
|
|
31
30
|
|
|
32
|
-
|
|
33
31
|
# Load models
|
|
34
32
|
import torch
|
|
35
33
|
from pkg_resources import resource_filename
|
|
@@ -50,15 +48,21 @@ for i in pang_model_nums:
|
|
|
50
48
|
model.eval()
|
|
51
49
|
pang_models.append(model)
|
|
52
50
|
|
|
51
|
+
|
|
52
|
+
# def is_monotonic(A):
|
|
53
|
+
# x, y = [], []
|
|
54
|
+
# x.extend(A)
|
|
55
|
+
# y.extend(A)
|
|
56
|
+
# x.sort()
|
|
57
|
+
# y.sort(reverse=True)
|
|
58
|
+
# if (x == A or y == A):
|
|
59
|
+
# return True
|
|
60
|
+
# return False
|
|
61
|
+
|
|
62
|
+
|
|
53
63
|
def is_monotonic(A):
|
|
54
|
-
x, y
|
|
55
|
-
|
|
56
|
-
y.extend(A)
|
|
57
|
-
x.sort()
|
|
58
|
-
y.sort(reverse=True)
|
|
59
|
-
if (x == A or y == A):
|
|
60
|
-
return True
|
|
61
|
-
return False
|
|
64
|
+
return all(x <= y for x, y in zip(A, A[1:])) or all(x >= y for x, y in zip(A, A[1:]))
|
|
65
|
+
|
|
62
66
|
|
|
63
67
|
def sai_predict_probs(seq: str, models: list) -> list:
|
|
64
68
|
'''
|
|
@@ -1022,7 +1026,7 @@ def find_transcript_missplicing(mutations, ref_transcript, var_transcript, conte
|
|
|
1022
1026
|
|
|
1023
1027
|
class PredictSpliceAI:
|
|
1024
1028
|
def __init__(self, mutation, gene_data,
|
|
1025
|
-
threshold=0.5, force=False, save_results=False, sai_mrg_context=5000, min_coverage=2500, engine='spliceai'):
|
|
1029
|
+
threshold=0.5, force=False, save_results=False, sai_mrg_context=5000, min_coverage=2500, engine='spliceai', organism='hg38'):
|
|
1026
1030
|
self.modification = mutation
|
|
1027
1031
|
self.threshold = threshold
|
|
1028
1032
|
self.transcript_id = gene_data.transcript_id
|
|
@@ -1043,7 +1047,7 @@ class PredictSpliceAI:
|
|
|
1043
1047
|
|
|
1044
1048
|
# self.missplicing = run_spliceai_transcript(self.modification, transcript_data=gene_data, sai_mrg_context=sai_mrg_context, min_coverage=min_coverage, sai_threshold=0.1)
|
|
1045
1049
|
# print(f"RUNNING: {mutation.mut_id}")
|
|
1046
|
-
ref_transcript, var_transcript = Gene(mutation.mut_id.split(':')[0], organism=
|
|
1050
|
+
ref_transcript, var_transcript = Gene(mutation.mut_id.split(':')[0], organism=organism).transcript(gene_data.transcript_id), Gene(mutation.mut_id.split(':')[0], mutation.mut_id, organism='mm39').transcript(gene_data.transcript_id)
|
|
1047
1051
|
# print(f"Second check : {ref_transcript.pre_mrna == var_transcript.pre_mrna}")
|
|
1048
1052
|
self.missplicing = find_transcript_missplicing(self.modification, ref_transcript, var_transcript, context=sai_mrg_context+min_coverage, threshold=threshold,
|
|
1049
1053
|
engine=engine)
|
|
@@ -1531,7 +1535,7 @@ def oncosplice(mut_id, sai_threshold=0.5, protein_coding=True, primary_transcrip
|
|
|
1531
1535
|
continue
|
|
1532
1536
|
|
|
1533
1537
|
cons_vector = transform_conservation_vector(reference.cons_vector, window=window_length)
|
|
1534
|
-
missplicing_obj = PredictSpliceAI(mutation, reference, threshold=sai_threshold, force=force_spliceai, save_results=save_spliceai_results, engine=engine)
|
|
1538
|
+
missplicing_obj = PredictSpliceAI(mutation, reference, threshold=sai_threshold, force=force_spliceai, save_results=save_spliceai_results, engine=engine, organism=organism)
|
|
1535
1539
|
missplicing = missplicing_obj.apply_sai_threshold_primary(threshold=sai_threshold)
|
|
1536
1540
|
|
|
1537
1541
|
for i, new_boundaries in enumerate(develop_aberrant_splicing(variant, missplicing)):
|
geney/power_utils.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
geney/Fasta_segment.py,sha256=0zCdzPUbDeM9Rz642woH5Q94pwI46O0fE3H8w0XWebc,11255
|
|
2
2
|
geney/Gene.py,sha256=abHnvZ4ytbjQmoBtrbsX5G0QAspm06NqZBINkjHgPog,10140
|
|
3
|
-
geney/__init__.py,sha256=
|
|
3
|
+
geney/__init__.py,sha256=knezxgbV2c2gcO2ek2-xxEC15HL4aO1WuoMiYOOvKf8,428
|
|
4
4
|
geney/benchmark_clinvar.py,sha256=LLl77e95Qbg9Kd-m2yL8ilmzubSz9SKogeARwssT4Ks,5532
|
|
5
5
|
geney/compare_sets.py,sha256=TcgL57V7BUPxBoW9lv3xr8qK2Acmykn85Ev3avicQr8,2977
|
|
6
6
|
geney/config_setup.py,sha256=VA6mhVGMRadwlpEx4m1wrssmDM8qpfKT21MAijIwjyQ,428
|
|
@@ -9,11 +9,11 @@ geney/gtex.py,sha256=asL2lHyU5KsbWpV096vkf1Ka7hSo_RRfZqw7p5nERmE,1919
|
|
|
9
9
|
geney/gtex_utils.py,sha256=asL2lHyU5KsbWpV096vkf1Ka7hSo_RRfZqw7p5nERmE,1919
|
|
10
10
|
geney/immune_utils.py,sha256=ZRni5ttrhpYBnmNr0d0ZatIbNPYs4nmQuoUO00SpsS4,5271
|
|
11
11
|
geney/netchop.py,sha256=AMiy9YsdTmX4B3k3Y5Yh7EmoGAojM1O3AzhPKOiB--g,3050
|
|
12
|
-
geney/oncosplice.py,sha256=
|
|
12
|
+
geney/oncosplice.py,sha256=sp6kfKbFqwpZIuLZadvCq0aj-JUnM_GE99eaGRm19eY,78240
|
|
13
13
|
geney/oncosplice_mouse.py,sha256=LYLOukI9qI1IBkyl1qVRFR5d1NAw7Orlj8Zth-4xCW8,12962
|
|
14
14
|
geney/oncosplice_pipeline.py,sha256=hpGqFHOdn8i8tvvs1-t3-G9Ko18zInwoDXBJbbrfbC4,68036
|
|
15
15
|
geney/performance_utils.py,sha256=FQt7rA4r-Wuq3kceCxsSuMfj3wU1tMG8QnbL59aBohs,4700
|
|
16
|
-
geney/power_utils.py,sha256=
|
|
16
|
+
geney/power_utils.py,sha256=MehZFUdkJ2EFUot709yPEDxSkXmH5XevMebX2HD768A,7330
|
|
17
17
|
geney/survival.py,sha256=gNKZGcwxDZ00ixVBHf3ZdjbY_AHQOCU9kKpBC_dokbM,5572
|
|
18
18
|
geney/survival_utils.py,sha256=2CAkC2LsspicHIdrqsiPnjgvpr5KHDUfLFFqnRbPJqs,5762
|
|
19
19
|
geney/tcga_annotations.py,sha256=DjRl6Pk5VAOL1yhbt8SXD6FZhYbcYNu3FtXYMeveGB0,15016
|
|
@@ -46,7 +46,7 @@ geney/translation_initiation/resources/kozak_pssm.json,sha256=pcd0Olziutq-6H3mFW
|
|
|
46
46
|
geney/translation_initiation/resources/tis_regressor_model.joblib,sha256=IXb4DUDhJ5rBDKcqMk9zE3ECTZZcdj7Jixz3KpoZ7OA,2592025
|
|
47
47
|
geney/translation_termination/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
48
48
|
geney/translation_termination/tts_utils.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
49
|
-
geney-1.2.
|
|
50
|
-
geney-1.2.
|
|
51
|
-
geney-1.2.
|
|
52
|
-
geney-1.2.
|
|
49
|
+
geney-1.2.20.dist-info/METADATA,sha256=YRkn1hq4ARDlqMiAWPpDmbUny5v7NxjbN4YcRpaq2o8,1163
|
|
50
|
+
geney-1.2.20.dist-info/WHEEL,sha256=AHX6tWk3qWuce7vKLrj7lnulVHEdWoltgauo8bgCXgU,109
|
|
51
|
+
geney-1.2.20.dist-info/top_level.txt,sha256=O-FuNUMb5fn9dhZ-dYCgF0aZtfi1EslMstnzhc5IIVo,6
|
|
52
|
+
geney-1.2.20.dist-info/RECORD,,
|
|
File without changes
|