geney 1.2.29__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 CHANGED
@@ -33,6 +33,7 @@ class DEL(Allele):
33
33
  pass
34
34
 
35
35
  def get_mutation(mut_id, rev=False):
36
+
36
37
  _, _, i, r, a = mut_id.split(':')
37
38
  i = int(i)
38
39
 
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
- mutation = get_mutation(mut_id, rev=gene.rev)
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, mutation, engine=engine), threshold=splicing_threshold)
386
- transcript.pre_mrna += mutation
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/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, mutation, context=5000, window=2500, threshold=0.5, engine='spliceai'):
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
- var = ref + mutation
155
+ # for mutation in mutations:
156
+ # var = ref + mutation
154
157
 
155
- # print(len(ref.indices))
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]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: geney
3
- Version: 1.2.29
3
+ Version: 1.2.30
4
4
  Summary: A Python package for gene expression modeling.
5
5
  Home-page: https://github.com/nicolaslynn/geney
6
6
  Author: Nicolas Lynn
@@ -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=C-K8F8wyN5joI3ZuP-d7IMYTI43YPDXUc3IgAJ07o8Q,1546
9
- geney/oncosplice.py,sha256=3jJc1-CWubH2ElHEjyQtsr9JYVmfPQEpq7EX-IfY-t8,20806
8
+ geney/mutation_utils.py,sha256=C_kv2MB_L8LlhX3W2ooXjJ3uDoJ8zX1WeDtZKoBZJkI,1547
9
+ geney/oncosplice.py,sha256=zOOLdY_9tHpwwMQxTS358MCUlhQ6x-XmwlwlIrqwIwc,20902
10
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=pS3jZEpmnDkbT1jjaJh-O6I--Xm22e5dj-GQu7IAZSQ,15943
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.29.dist-info/METADATA,sha256=LbNQ1MNyxeKg22-sNA5sA7yyY42CGNKzBAsTFq4BE24,948
23
- geney-1.2.29.dist-info/WHEEL,sha256=fS9sRbCBHs7VFcwJLnLXN1MZRR0_TVTxvXKzOnaSFs8,110
24
- geney-1.2.29.dist-info/top_level.txt,sha256=O-FuNUMb5fn9dhZ-dYCgF0aZtfi1EslMstnzhc5IIVo,6
25
- geney-1.2.29.dist-info/RECORD,,
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