geney 1.2.28__py2.py3-none-any.whl → 1.2.30__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/mutation_utils.py +1 -0
- geney/oncosplice.py +5 -4
- geney/pangolin_utils.py +1 -1
- geney/splicing_utils.py +7 -5
- {geney-1.2.28.dist-info → geney-1.2.30.dist-info}/METADATA +1 -1
- {geney-1.2.28.dist-info → geney-1.2.30.dist-info}/RECORD +8 -8
- {geney-1.2.28.dist-info → geney-1.2.30.dist-info}/WHEEL +0 -0
- {geney-1.2.28.dist-info → geney-1.2.30.dist-info}/top_level.txt +0 -0
geney/mutation_utils.py
CHANGED
geney/oncosplice.py
CHANGED
|
@@ -363,14 +363,14 @@ def OncospliceAnnotator(reference_transcript, variant_transcript, mut):
|
|
|
363
363
|
|
|
364
364
|
def oncosplice(mut_id, splicing_threshold=0.5, protein_coding=True, primary_transcript=False, window_length=13, organism='hg38', engine='spliceai', domains=None):
|
|
365
365
|
gene = Gene(mut_id.split(':')[0], organism=organism)
|
|
366
|
-
|
|
366
|
+
mutations = [get_mutation(m, rev=gene.rev) for m in mut_id.split('|')]
|
|
367
367
|
|
|
368
368
|
results = []
|
|
369
369
|
for tid, transcript in gene.run_transcripts(protein_coding=protein_coding, primary_transcript=primary_transcript):
|
|
370
370
|
if not transcript.cons_available:
|
|
371
371
|
continue
|
|
372
372
|
|
|
373
|
-
if mutation not in transcript:
|
|
373
|
+
if all(mutation not in transcript for mutation in mutations):
|
|
374
374
|
results.append({'transcript_id': transcript.transcript_id})
|
|
375
375
|
continue
|
|
376
376
|
|
|
@@ -382,8 +382,9 @@ def oncosplice(mut_id, splicing_threshold=0.5, protein_coding=True, primary_tran
|
|
|
382
382
|
|
|
383
383
|
assert len(ref_protein) == len(cons_vector), f"Protein ({len(ref_protein)}) and conservation vector ({len(cons_vector)}) must be same length. {ref_protein}, \n>{cons_vector}\n>{transcript.cons_seq}"
|
|
384
384
|
|
|
385
|
-
missplicing = Missplicing(find_transcript_missplicing(transcript,
|
|
386
|
-
|
|
385
|
+
missplicing = Missplicing(find_transcript_missplicing(transcript, mutations, engine=engine), threshold=splicing_threshold)
|
|
386
|
+
for mutation in mutations:
|
|
387
|
+
transcript.pre_mrna += mutation
|
|
387
388
|
|
|
388
389
|
for i, new_boundaries in enumerate(develop_aberrant_splicing(transcript, missplicing.aberrant_splicing)):
|
|
389
390
|
transcript.acceptors = new_boundaries['acceptors']
|
geney/pangolin_utils.py
CHANGED
|
@@ -61,7 +61,7 @@ def pangolin_predict_probs(true_seq, models):
|
|
|
61
61
|
seq = torch.from_numpy(np.expand_dims(seq, axis=0)).float()
|
|
62
62
|
|
|
63
63
|
# if torch.cuda.is_available():
|
|
64
|
-
seq = seq.to(torch.device(
|
|
64
|
+
seq = seq.to(torch.device(device))
|
|
65
65
|
|
|
66
66
|
scores = []
|
|
67
67
|
for j, model_num in enumerate(model_nums):
|
geney/splicing_utils.py
CHANGED
|
@@ -148,15 +148,17 @@ def find_ss_changes(ref_dct, mut_dct, known_splice_sites, threshold=0.5):
|
|
|
148
148
|
return discovered_pos, deleted_pos
|
|
149
149
|
|
|
150
150
|
|
|
151
|
-
def find_transcript_missplicing(transcript,
|
|
151
|
+
def find_transcript_missplicing(transcript, mutations, context=5000, window=2500, threshold=0.5, engine='spliceai'):
|
|
152
|
+
from functools import reduce
|
|
153
|
+
|
|
152
154
|
ref = transcript.pre_mrna
|
|
153
|
-
|
|
155
|
+
# for mutation in mutations:
|
|
156
|
+
# var = ref + mutation
|
|
154
157
|
|
|
155
|
-
|
|
156
|
-
# print(len(var.indices))
|
|
158
|
+
var = reduce(lambda acc, mutation: acc + mutation, mutations, ref)
|
|
157
159
|
|
|
160
|
+
center = int(np.mean([mutation.position for mutation in mutations]) // 1)
|
|
158
161
|
|
|
159
|
-
center = mutation.position
|
|
160
162
|
total_context = context + window
|
|
161
163
|
|
|
162
164
|
length = ref.seqmat.shape[-1]
|
|
@@ -5,13 +5,13 @@ geney/data_setup.py,sha256=2RHmuvcGUQbEglXQEZr0C2QPDTQYRZOEm0EcmyfQJgU,12229
|
|
|
5
5
|
geney/graphic_utils.py,sha256=tjm6IDQ1BdfSeuPYzjlqAUHFQoDYH9jXTzJjKFS4Hh4,11078
|
|
6
6
|
geney/gtex_utils.py,sha256=asL2lHyU5KsbWpV096vkf1Ka7hSo_RRfZqw7p5nERmE,1919
|
|
7
7
|
geney/immune_utils.py,sha256=ZRni5ttrhpYBnmNr0d0ZatIbNPYs4nmQuoUO00SpsS4,5271
|
|
8
|
-
geney/mutation_utils.py,sha256=
|
|
9
|
-
geney/oncosplice.py,sha256=
|
|
10
|
-
geney/pangolin_utils.py,sha256=
|
|
8
|
+
geney/mutation_utils.py,sha256=C_kv2MB_L8LlhX3W2ooXjJ3uDoJ8zX1WeDtZKoBZJkI,1547
|
|
9
|
+
geney/oncosplice.py,sha256=zOOLdY_9tHpwwMQxTS358MCUlhQ6x-XmwlwlIrqwIwc,20902
|
|
10
|
+
geney/pangolin_utils.py,sha256=MP4wGgiw36NAPfwpaXJ5mD4Q-DTbkL3xHcSlYtuZODw,2939
|
|
11
11
|
geney/power_utils.py,sha256=MehZFUdkJ2EFUot709yPEDxSkXmH5XevMebX2HD768A,7330
|
|
12
12
|
geney/seqmat_utils.py,sha256=fawiPa4PPhmbx6wPynt8SG6eowZKUZ2yN32r6B8Ba-g,16802
|
|
13
13
|
geney/spliceai_utils.py,sha256=gIGPC8u3J15A7EQrk2Elho5PbF9MmUUNopGGH-eEV8s,1873
|
|
14
|
-
geney/splicing_utils.py,sha256=
|
|
14
|
+
geney/splicing_utils.py,sha256=q47EdcsHrp4aLIPVWvkGBJSzS3l3DKiD9DNDsPpZdHk,16075
|
|
15
15
|
geney/survival_utils.py,sha256=2CAkC2LsspicHIdrqsiPnjgvpr5KHDUfLFFqnRbPJqs,5762
|
|
16
16
|
geney/tcga_utils.py,sha256=vXSMf1OxoF_AdE_rMguy_BoYaart_E1t4FFMx2DS1Ak,15585
|
|
17
17
|
geney/utils.py,sha256=WbV1DBllQyvzoDiYkidRiTX5MBpQGr99M4hTUQ0BKo8,2185
|
|
@@ -19,7 +19,7 @@ geney/translation_initiation/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NM
|
|
|
19
19
|
geney/translation_initiation/tis_utils.py,sha256=iXrWVijyPe-f8I9rEVGdxNnXBrOGPoKFjmvaOEnQYNE,4446
|
|
20
20
|
geney/translation_initiation/resources/kozak_pssm.json,sha256=pcd0Olziutq-6H3mFWDCD9cujQ_AlZO-iiOvBl82hqE,1165
|
|
21
21
|
geney/translation_initiation/resources/tis_regressor_model.joblib,sha256=IXb4DUDhJ5rBDKcqMk9zE3ECTZZcdj7Jixz3KpoZ7OA,2592025
|
|
22
|
-
geney-1.2.
|
|
23
|
-
geney-1.2.
|
|
24
|
-
geney-1.2.
|
|
25
|
-
geney-1.2.
|
|
22
|
+
geney-1.2.30.dist-info/METADATA,sha256=T8wma9mdUQjDbYAvMviVcdGPFJId-piDzxGpIVdcXMo,948
|
|
23
|
+
geney-1.2.30.dist-info/WHEEL,sha256=fS9sRbCBHs7VFcwJLnLXN1MZRR0_TVTxvXKzOnaSFs8,110
|
|
24
|
+
geney-1.2.30.dist-info/top_level.txt,sha256=O-FuNUMb5fn9dhZ-dYCgF0aZtfi1EslMstnzhc5IIVo,6
|
|
25
|
+
geney-1.2.30.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|