geney 1.2.16__py2.py3-none-any.whl → 1.2.18__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.
- geney/oncosplice/__init__.py +0 -0
- geney/oncosplice.py +10 -9
- geney/power_utils.py +4 -2
- {geney-1.2.16.dist-info → geney-1.2.18.dist-info}/METADATA +1 -2
- {geney-1.2.16.dist-info → geney-1.2.18.dist-info}/RECORD +7 -6
- {geney-1.2.16.dist-info → geney-1.2.18.dist-info}/WHEEL +0 -0
- {geney-1.2.16.dist-info → geney-1.2.18.dist-info}/top_level.txt +0 -0
|
File without changes
|
geney/oncosplice.py
CHANGED
|
@@ -219,6 +219,7 @@ class Gene:
|
|
|
219
219
|
self.gene_end = 0
|
|
220
220
|
self.transcripts = {}
|
|
221
221
|
self.load_from_file(find_files_by_gene_name(gene_name, organism=organism))
|
|
222
|
+
# print(f"In Gene: {variation}")
|
|
222
223
|
self.variations = variation
|
|
223
224
|
self.primary_tid = None
|
|
224
225
|
self.organism = organism
|
|
@@ -271,7 +272,7 @@ class Gene:
|
|
|
271
272
|
|
|
272
273
|
if tid not in self.transcripts:
|
|
273
274
|
raise AttributeError(f"Transcript '{tid}' not found in gene '{self.gene_name}'.")
|
|
274
|
-
return Transcript(self.transcripts[tid], organism=self.organism)
|
|
275
|
+
return Transcript(self.transcripts[tid], organism=self.organism, variations=self.variations)
|
|
275
276
|
|
|
276
277
|
def run_transcripts(self, primary_transcript=False, protein_coding=False):
|
|
277
278
|
for tid, annotations in self.transcripts.items():
|
|
@@ -306,7 +307,7 @@ class Transcript:
|
|
|
306
307
|
self.cons_vector = ''
|
|
307
308
|
self.variations = None
|
|
308
309
|
self.organism = organism
|
|
309
|
-
print(f"Variations: {variations}")
|
|
310
|
+
# print(f"Variations: {variations}")
|
|
310
311
|
if variations:
|
|
311
312
|
self.variations = Variations(variations)
|
|
312
313
|
|
|
@@ -520,7 +521,7 @@ class Transcript:
|
|
|
520
521
|
seq, indices = self.pull_pre_mrna_pos()
|
|
521
522
|
if self.variations:
|
|
522
523
|
for mutation in self.variations.variants:
|
|
523
|
-
print(f"Implementing {mutation}")
|
|
524
|
+
# print(f"Implementing {mutation}")
|
|
524
525
|
seq, indices = generate_mut_variant(seq, indices, mut=mutation)
|
|
525
526
|
return seq, indices
|
|
526
527
|
|
|
@@ -793,7 +794,7 @@ def find_transcript_missplicing(mutations, ref_transcript, var_transcript, conte
|
|
|
793
794
|
start_pad, end_pad = max(0, context - (center_index - start_cutoff)), max(0, context - (end_cutoff - center_index))
|
|
794
795
|
mut_seq = 'N' * start_pad + mut_seq[start_cutoff:end_cutoff] + 'N' * end_pad
|
|
795
796
|
mut_indices = [-1] * start_pad + mut_indices[start_cutoff:end_cutoff] + [-1] * end_pad
|
|
796
|
-
print(f"Mut and Ref are equal: {mut_seq == ref_seq}")
|
|
797
|
+
# print(f"Mut and Ref are equal: {mut_seq == ref_seq}")
|
|
797
798
|
|
|
798
799
|
copy_mut_indices = mut_indices.copy()
|
|
799
800
|
|
|
@@ -823,7 +824,7 @@ def find_transcript_missplicing(mutations, ref_transcript, var_transcript, conte
|
|
|
823
824
|
visible_acceptors = np.intersect1d(ref_transcript.acceptors, ref_indices)
|
|
824
825
|
# 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])])
|
|
825
826
|
|
|
826
|
-
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))
|
|
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))
|
|
827
828
|
# print(ref_seq_donor_probs)
|
|
828
829
|
|
|
829
830
|
assert len(ref_indices) == len(ref_seq_acceptor_probs), 'Reference pos not the same'
|
|
@@ -855,7 +856,7 @@ def find_transcript_missplicing(mutations, ref_transcript, var_transcript, conte
|
|
|
855
856
|
missplicing = {'missed_acceptors': dap, 'missed_donors': ddp, 'discovered_acceptors': iap, 'discovered_donors': idp}
|
|
856
857
|
missplicing = {outk: {float(k): v for k, v in outv.items()} for outk, outv in missplicing.items()}
|
|
857
858
|
temp = {outk: {int(k) if k.is_integer() else k: v for k, v in outv.items()} for outk, outv in missplicing.items()}
|
|
858
|
-
print(temp)
|
|
859
|
+
# print(temp)
|
|
859
860
|
return temp
|
|
860
861
|
|
|
861
862
|
|
|
@@ -1017,7 +1018,7 @@ def find_transcript_missplicing(mutations, ref_transcript, var_transcript, conte
|
|
|
1017
1018
|
# missplicing = {outk: {float(k): v for k, v in outv.items()} for outk, outv in missplicing.items()}
|
|
1018
1019
|
#
|
|
1019
1020
|
# return {outk: {int(k) if k.is_integer() else k: v for k, v in outv.items()} for outk, outv in missplicing.items()}
|
|
1020
|
-
|
|
1021
|
+
|
|
1021
1022
|
|
|
1022
1023
|
class PredictSpliceAI:
|
|
1023
1024
|
def __init__(self, mutation, gene_data,
|
|
@@ -1041,9 +1042,9 @@ class PredictSpliceAI:
|
|
|
1041
1042
|
# elif isinstance(gene_data, Transcript):
|
|
1042
1043
|
|
|
1043
1044
|
# 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)
|
|
1044
|
-
print(f"RUNNING: {mutation.mut_id}")
|
|
1045
|
+
# print(f"RUNNING: {mutation.mut_id}")
|
|
1045
1046
|
ref_transcript, var_transcript = Gene(mutation.mut_id.split(':')[0], organism='mm39').transcript(gene_data.transcript_id), Gene(mutation.mut_id.split(':')[0], mutation.mut_id, organism='mm39').transcript(gene_data.transcript_id)
|
|
1046
|
-
print(f"Second check : {ref_transcript.pre_mrna == var_transcript.pre_mrna}")
|
|
1047
|
+
# print(f"Second check : {ref_transcript.pre_mrna == var_transcript.pre_mrna}")
|
|
1047
1048
|
self.missplicing = find_transcript_missplicing(self.modification, ref_transcript, var_transcript, context=sai_mrg_context+min_coverage, threshold=threshold,
|
|
1048
1049
|
engine=engine)
|
|
1049
1050
|
if save_results:
|
geney/power_utils.py
CHANGED
|
@@ -63,7 +63,7 @@ def launch_dask_cluster(memory_size="3GB", num_workers=10, queue="tamirQ",
|
|
|
63
63
|
walltime='7200',
|
|
64
64
|
scheduler_options={"dashboard_address": dashboard_address},
|
|
65
65
|
log_directory=log_directory,
|
|
66
|
-
job_script_prologue=[f"cd {config_setup[organism]['BASE']}"]
|
|
66
|
+
# job_script_prologue=[f"cd {config_setup[organism]['BASE']}"]
|
|
67
67
|
)
|
|
68
68
|
|
|
69
69
|
else:
|
|
@@ -75,7 +75,7 @@ def launch_dask_cluster(memory_size="3GB", num_workers=10, queue="tamirQ",
|
|
|
75
75
|
walltime=walltime,
|
|
76
76
|
scheduler_options={"dashboard_address": dashboard_address},
|
|
77
77
|
log_directory=log_directory,
|
|
78
|
-
job_script_prologue=[f"cd {config_setup[organism]['BASE']}"]
|
|
78
|
+
# job_script_prologue=[f"cd {config_setup[organism]['BASE']}"]
|
|
79
79
|
)
|
|
80
80
|
|
|
81
81
|
dask_cluster.scale(num_workers)
|
|
@@ -87,6 +87,8 @@ def launch_dask_cluster(memory_size="3GB", num_workers=10, queue="tamirQ",
|
|
|
87
87
|
return None, None
|
|
88
88
|
|
|
89
89
|
|
|
90
|
+
|
|
91
|
+
|
|
90
92
|
def process_and_save_tasks(tasks, dask_client, funct, save_loc=None, num_workers=10, save_increment=20, file_index=0):
|
|
91
93
|
"""
|
|
92
94
|
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.18
|
|
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=MA8z8D2kZCrIeXJwu0D6rM_VvryldvkNkzETkE29cts,78057
|
|
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=_B5DIKfwQGb1Gy9xbIUrOCiTf5y_Nq10OMtaFjEo3i8,7309
|
|
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.18.dist-info/METADATA,sha256=TR4c2Ytss-agQ850EcaSjgKkHqbC0VsMsRxNnnUxEHU,1163
|
|
50
|
+
geney-1.2.18.dist-info/WHEEL,sha256=iYlv5fX357PQyRT2o6tw1bN-YcKFFHKqB_LwHO5wP-g,110
|
|
51
|
+
geney-1.2.18.dist-info/top_level.txt,sha256=O-FuNUMb5fn9dhZ-dYCgF0aZtfi1EslMstnzhc5IIVo,6
|
|
52
|
+
geney-1.2.18.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|