geney 1.2.17__py2.py3-none-any.whl → 1.2.19__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/oncosplice/__init__.py +0 -0
- geney/oncosplice.py +21 -15
- geney/power_utils.py +5 -2
- {geney-1.2.17.dist-info → geney-1.2.19.dist-info}/METADATA +1 -2
- {geney-1.2.17.dist-info → geney-1.2.19.dist-info}/RECORD +7 -6
- {geney-1.2.17.dist-info → geney-1.2.19.dist-info}/WHEEL +1 -1
- {geney-1.2.17.dist-info → geney-1.2.19.dist-info}/top_level.txt +0 -0
|
File without changes
|
geney/oncosplice.py
CHANGED
|
@@ -50,15 +50,21 @@ for i in pang_model_nums:
|
|
|
50
50
|
model.eval()
|
|
51
51
|
pang_models.append(model)
|
|
52
52
|
|
|
53
|
+
|
|
54
|
+
# def is_monotonic(A):
|
|
55
|
+
# x, y = [], []
|
|
56
|
+
# x.extend(A)
|
|
57
|
+
# y.extend(A)
|
|
58
|
+
# x.sort()
|
|
59
|
+
# y.sort(reverse=True)
|
|
60
|
+
# if (x == A or y == A):
|
|
61
|
+
# return True
|
|
62
|
+
# return False
|
|
63
|
+
|
|
64
|
+
|
|
53
65
|
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
|
|
66
|
+
return all(x <= y for x, y in zip(A, A[1:])) or all(x >= y for x, y in zip(A, A[1:]))
|
|
67
|
+
|
|
62
68
|
|
|
63
69
|
def sai_predict_probs(seq: str, models: list) -> list:
|
|
64
70
|
'''
|
|
@@ -824,7 +830,7 @@ def find_transcript_missplicing(mutations, ref_transcript, var_transcript, conte
|
|
|
824
830
|
visible_acceptors = np.intersect1d(ref_transcript.acceptors, ref_indices)
|
|
825
831
|
# print(ref_indices.index(visible_donors[0]), ref_seq_donor_probs[ref_indices.index(visible_donors[0])], mut_seq_donor_probs[mut_indices.index(visible_donors[0])])
|
|
826
832
|
|
|
827
|
-
print(len(ref_seq_donor_probs), len(ref_seq_acceptor_probs), len(mut_seq_donor_probs), len(mut_seq_acceptor_probs), len(ref_indices), len(mut_indices))
|
|
833
|
+
# print(len(ref_seq_donor_probs), len(ref_seq_acceptor_probs), len(mut_seq_donor_probs), len(mut_seq_acceptor_probs), len(ref_indices), len(mut_indices))
|
|
828
834
|
# print(ref_seq_donor_probs)
|
|
829
835
|
|
|
830
836
|
assert len(ref_indices) == len(ref_seq_acceptor_probs), 'Reference pos not the same'
|
|
@@ -856,7 +862,7 @@ def find_transcript_missplicing(mutations, ref_transcript, var_transcript, conte
|
|
|
856
862
|
missplicing = {'missed_acceptors': dap, 'missed_donors': ddp, 'discovered_acceptors': iap, 'discovered_donors': idp}
|
|
857
863
|
missplicing = {outk: {float(k): v for k, v in outv.items()} for outk, outv in missplicing.items()}
|
|
858
864
|
temp = {outk: {int(k) if k.is_integer() else k: v for k, v in outv.items()} for outk, outv in missplicing.items()}
|
|
859
|
-
print(temp)
|
|
865
|
+
# print(temp)
|
|
860
866
|
return temp
|
|
861
867
|
|
|
862
868
|
|
|
@@ -1018,11 +1024,11 @@ def find_transcript_missplicing(mutations, ref_transcript, var_transcript, conte
|
|
|
1018
1024
|
# missplicing = {outk: {float(k): v for k, v in outv.items()} for outk, outv in missplicing.items()}
|
|
1019
1025
|
#
|
|
1020
1026
|
# return {outk: {int(k) if k.is_integer() else k: v for k, v in outv.items()} for outk, outv in missplicing.items()}
|
|
1021
|
-
|
|
1027
|
+
|
|
1022
1028
|
|
|
1023
1029
|
class PredictSpliceAI:
|
|
1024
1030
|
def __init__(self, mutation, gene_data,
|
|
1025
|
-
threshold=0.5, force=False, save_results=False, sai_mrg_context=5000, min_coverage=2500, engine='spliceai'):
|
|
1031
|
+
threshold=0.5, force=False, save_results=False, sai_mrg_context=5000, min_coverage=2500, engine='spliceai', organism='hg38'):
|
|
1026
1032
|
self.modification = mutation
|
|
1027
1033
|
self.threshold = threshold
|
|
1028
1034
|
self.transcript_id = gene_data.transcript_id
|
|
@@ -1043,8 +1049,8 @@ class PredictSpliceAI:
|
|
|
1043
1049
|
|
|
1044
1050
|
# 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
1051
|
# print(f"RUNNING: {mutation.mut_id}")
|
|
1046
|
-
ref_transcript, var_transcript = Gene(mutation.mut_id.split(':')[0], organism=
|
|
1047
|
-
print(f"Second check : {ref_transcript.pre_mrna == var_transcript.pre_mrna}")
|
|
1052
|
+
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)
|
|
1053
|
+
# print(f"Second check : {ref_transcript.pre_mrna == var_transcript.pre_mrna}")
|
|
1048
1054
|
self.missplicing = find_transcript_missplicing(self.modification, ref_transcript, var_transcript, context=sai_mrg_context+min_coverage, threshold=threshold,
|
|
1049
1055
|
engine=engine)
|
|
1050
1056
|
if save_results:
|
|
@@ -1531,7 +1537,7 @@ def oncosplice(mut_id, sai_threshold=0.5, protein_coding=True, primary_transcrip
|
|
|
1531
1537
|
continue
|
|
1532
1538
|
|
|
1533
1539
|
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)
|
|
1540
|
+
missplicing_obj = PredictSpliceAI(mutation, reference, threshold=sai_threshold, force=force_spliceai, save_results=save_spliceai_results, engine=engine, organism=organism)
|
|
1535
1541
|
missplicing = missplicing_obj.apply_sai_threshold_primary(threshold=sai_threshold)
|
|
1536
1542
|
|
|
1537
1543
|
for i, new_boundaries in enumerate(develop_aberrant_splicing(variant, missplicing)):
|
geney/power_utils.py
CHANGED
|
@@ -12,6 +12,7 @@ import gc
|
|
|
12
12
|
import pandas as pd
|
|
13
13
|
import argparse
|
|
14
14
|
|
|
15
|
+
print("remote this")
|
|
15
16
|
tqdm.pandas()
|
|
16
17
|
warnings.filterwarnings('ignore')
|
|
17
18
|
|
|
@@ -63,7 +64,7 @@ def launch_dask_cluster(memory_size="3GB", num_workers=10, queue="tamirQ",
|
|
|
63
64
|
walltime='7200',
|
|
64
65
|
scheduler_options={"dashboard_address": dashboard_address},
|
|
65
66
|
log_directory=log_directory,
|
|
66
|
-
job_script_prologue=[f"cd {config_setup[organism]['BASE']}"]
|
|
67
|
+
# job_script_prologue=[f"cd {config_setup[organism]['BASE']}"]
|
|
67
68
|
)
|
|
68
69
|
|
|
69
70
|
else:
|
|
@@ -75,7 +76,7 @@ def launch_dask_cluster(memory_size="3GB", num_workers=10, queue="tamirQ",
|
|
|
75
76
|
walltime=walltime,
|
|
76
77
|
scheduler_options={"dashboard_address": dashboard_address},
|
|
77
78
|
log_directory=log_directory,
|
|
78
|
-
job_script_prologue=[f"cd {config_setup[organism]['BASE']}"]
|
|
79
|
+
# job_script_prologue=[f"cd {config_setup[organism]['BASE']}"]
|
|
79
80
|
)
|
|
80
81
|
|
|
81
82
|
dask_cluster.scale(num_workers)
|
|
@@ -87,6 +88,8 @@ def launch_dask_cluster(memory_size="3GB", num_workers=10, queue="tamirQ",
|
|
|
87
88
|
return None, None
|
|
88
89
|
|
|
89
90
|
|
|
91
|
+
|
|
92
|
+
|
|
90
93
|
def process_and_save_tasks(tasks, dask_client, funct, save_loc=None, num_workers=10, save_increment=20, file_index=0):
|
|
91
94
|
"""
|
|
92
95
|
Process a list of tasks using Dask, saving the results incrementally.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: geney
|
|
3
|
-
Version: 1.2.
|
|
3
|
+
Version: 1.2.19
|
|
4
4
|
Summary: A Python package for gene expression modeling.
|
|
5
5
|
Home-page: https://github.com/nicolaslynn/geney
|
|
6
6
|
Author: Nicolas Lynn
|
|
@@ -19,7 +19,6 @@ Requires-Dist: networkx ==3.2.1
|
|
|
19
19
|
Requires-Dist: viennarna ==2.6.4
|
|
20
20
|
Requires-Dist: tqdm >=4.66.1
|
|
21
21
|
Requires-Dist: spliceai ==1.3.1
|
|
22
|
-
Requires-Dist: scikit-learn ==1.0.2
|
|
23
22
|
Requires-Dist: biopython ==1.81
|
|
24
23
|
Requires-Dist: tensorflow ==2.15.0
|
|
25
24
|
Requires-Dist: keras ==2.15.0
|
|
@@ -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=YW0GEJqyZHJ8Loi1I488NpMHKSqjkyIb0rB3YzGUQTM,78228
|
|
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
|
|
@@ -33,6 +33,7 @@ geney/immunotherapy/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSu
|
|
|
33
33
|
geney/immunotherapy/netchop.py,sha256=vLy-ahEKxU6IzwmnnqefXDJjZOeGIprLWbKU3t-M7sc,2800
|
|
34
34
|
geney/mutations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
35
35
|
geney/mutations/variant_utils.py,sha256=4exIP02lviMmsZTq8UYkjlunLpnBruGM4GLz0C7P0wM,4285
|
|
36
|
+
geney/oncosplice/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
36
37
|
geney/pipelines/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
37
38
|
geney/pipelines/dask_utils.py,sha256=J68bpbikdUGGirPERczu1cf_ajZmEvDfWEj8GIMJvII,5641
|
|
38
39
|
geney/splicing/__init__.py,sha256=0x9Rt0znGnf3Hs92BYRBjdHZHOMsd_27QNTRlfohzLY,60
|
|
@@ -45,7 +46,7 @@ geney/translation_initiation/resources/kozak_pssm.json,sha256=pcd0Olziutq-6H3mFW
|
|
|
45
46
|
geney/translation_initiation/resources/tis_regressor_model.joblib,sha256=IXb4DUDhJ5rBDKcqMk9zE3ECTZZcdj7Jixz3KpoZ7OA,2592025
|
|
46
47
|
geney/translation_termination/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
47
48
|
geney/translation_termination/tts_utils.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
48
|
-
geney-1.2.
|
|
49
|
-
geney-1.2.
|
|
50
|
-
geney-1.2.
|
|
51
|
-
geney-1.2.
|
|
49
|
+
geney-1.2.19.dist-info/METADATA,sha256=7nrc6newZc-UnO7hU56B8pg0Xvskze2Ad1f-eFUuHME,1163
|
|
50
|
+
geney-1.2.19.dist-info/WHEEL,sha256=AHX6tWk3qWuce7vKLrj7lnulVHEdWoltgauo8bgCXgU,109
|
|
51
|
+
geney-1.2.19.dist-info/top_level.txt,sha256=O-FuNUMb5fn9dhZ-dYCgF0aZtfi1EslMstnzhc5IIVo,6
|
|
52
|
+
geney-1.2.19.dist-info/RECORD,,
|
|
File without changes
|