geney 1.3.75__py2.py3-none-any.whl → 1.3.77__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.py CHANGED
@@ -284,15 +284,21 @@ def summarize_missplicing_event(pes, pir, es, ne, ir):
284
284
  return '-'
285
285
 
286
286
  def missense_effect(r, v):
287
- if len(r.protein) != len(v.protein):
288
- return '', ''
289
-
290
- for i, (x, y) in enumerate(zip(r.protein, v.protein)):
291
- if x != y:
292
- aa_change = f'{x}>{y}'
293
- codon_change = f'{r.orf[i*3:i*3+3]}>{v.orf[i*3:i*3+3]}'
294
- return aa_change, codon_change
295
- return '', ''
287
+ nt_changes, aa_changes = '', ''
288
+ if len(r.protein) != len(v.protein) or len(r.orf) != len(v.orf):
289
+ return '', '', -1
290
+
291
+ if r.protein != v.protein:
292
+ for i, (x, y) in enumerate(zip(r.protein, v.protein)):
293
+ if x != y:
294
+ aa_changes += f'{x}{i}{y},'
295
+
296
+ if r.orf.seq != v.orf.seq:
297
+ for i in range(len(r.protein)):
298
+ p = i*3
299
+ if r.orf.seq[p:p+3] != v.orf.seq[p:p+3]:
300
+ nt_changes += f'{r.orf.seq[p:p+3]}{p}{v.orf.seq[p:p+3]},'
301
+ return aa_changes, nt_changes
296
302
 
297
303
  # Annotating
298
304
  def OncospliceAnnotator(reference_transcript, variant_transcript, mut, ref_attributes=[], var_attributes=[]):
@@ -312,9 +318,10 @@ def OncospliceAnnotator(reference_transcript, variant_transcript, mut, ref_attri
312
318
  report['affected_intron'] = affected_intron
313
319
  report['mutation_distance_from_5'] = distance_from_5
314
320
  report['mutation_distance_from_3'] = distance_from_3
315
- aa_c, c_c = missense_effect(reference_transcript, variant_transcript)
321
+ aa_c, c_c, pos = missense_effect(reference_transcript, variant_transcript)
316
322
  report['missense_effect'] = aa_c
317
323
  report['codon_change'] = c_c
324
+ report['missense_position'] = pos
318
325
  return report
319
326
 
320
327
 
@@ -435,8 +442,8 @@ def oncosplice(mut_id, splicing_threshold=0.5, protein_coding=True, primary_tran
435
442
  return pd.DataFrame(results)[
436
443
  ['mut_id', 'transcript_id', 'isoform_id', 'primary_transcript', 'missplicing', 'full_missplicing',
437
444
  'exon_changes', 'splicing_codes', 'affected_exon', 'affected_intron', 'mutation_distance_from_5',
438
- 'mutation_distance_from_3', 'missense_effect', 'codon_change', 'reference_resemblance', 'oncosplice_score', 'percentile',
439
- 'isoform_prevalence', 'reference_protein', 'variant_protein', 'splicing_engine']]
445
+ 'mutation_distance_from_3', 'missense_effect', 'codon_change', 'missense_position', 'reference_resemblance',
446
+ 'oncosplice_score', 'percentile', 'isoform_prevalence', 'reference_protein', 'variant_protein', 'splicing_engine']]
440
447
 
441
448
 
442
449
  def process_splicing_path(new_boundaries, reference_transcript, mutated_transcript,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: geney
3
- Version: 1.3.75
3
+ Version: 1.3.77
4
4
  Summary: A Python package for gene expression modeling.
5
5
  Home-page: https://github.com/nicolaslynn/geney
6
6
  Author: Nicolas Lynn
@@ -11,7 +11,7 @@ geney/graphic_utils.py,sha256=oMsBpB9YeEn96gGpKh4MmtagJffWZbk-xPrIwHvkFhA,11016
11
11
  geney/gtex_utils.py,sha256=asL2lHyU5KsbWpV096vkf1Ka7hSo_RRfZqw7p5nERmE,1919
12
12
  geney/immune_utils.py,sha256=ZRni5ttrhpYBnmNr0d0ZatIbNPYs4nmQuoUO00SpsS4,5271
13
13
  geney/mutation_utils.py,sha256=C_kv2MB_L8LlhX3W2ooXjJ3uDoJ8zX1WeDtZKoBZJkI,1547
14
- geney/oncosplice.py,sha256=OptwyMhTaL5ptmdPxyuC2Iwm4feQf0n1ZjN0o9hwZ1w,32051
14
+ geney/oncosplice.py,sha256=hADoNLoIt_f6O2lnFL0YpIOam3mOBy0BLJUNzV4npoc,32355
15
15
  geney/pangolin_utils.py,sha256=9jdBXlOcRaUdfi-UpUxHA0AkTMZkUF-Lt7HVZ1nEm3s,2973
16
16
  geney/power_utils.py,sha256=MehZFUdkJ2EFUot709yPEDxSkXmH5XevMebX2HD768A,7330
17
17
  geney/seqmat_utils.py,sha256=wzb3PX5it5bpIFQvcxyzlxfhoJTbHHbsjg0rzh05iVs,19753
@@ -25,7 +25,7 @@ geney/translation_initiation/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NM
25
25
  geney/translation_initiation/tis_utils.py,sha256=AF3siFjuQH-Rs44EV-80zHdbxRMvN4woLFSHroWIETc,4448
26
26
  geney/translation_initiation/resources/kozak_pssm.json,sha256=pcd0Olziutq-6H3mFWDCD9cujQ_AlZO-iiOvBl82hqE,1165
27
27
  geney/translation_initiation/resources/tis_regressor_model.joblib,sha256=IXb4DUDhJ5rBDKcqMk9zE3ECTZZcdj7Jixz3KpoZ7OA,2592025
28
- geney-1.3.75.dist-info/METADATA,sha256=RJ7URjz5xQLQy1P8fISap3pWB7qdvknUp-c2Zjgtk9I,990
29
- geney-1.3.75.dist-info/WHEEL,sha256=AHX6tWk3qWuce7vKLrj7lnulVHEdWoltgauo8bgCXgU,109
30
- geney-1.3.75.dist-info/top_level.txt,sha256=O-FuNUMb5fn9dhZ-dYCgF0aZtfi1EslMstnzhc5IIVo,6
31
- geney-1.3.75.dist-info/RECORD,,
28
+ geney-1.3.77.dist-info/METADATA,sha256=7eMKlyiIIgYM794hncNt_lj1fyK6KzWc5zbTb8O4bw0,990
29
+ geney-1.3.77.dist-info/WHEEL,sha256=AHX6tWk3qWuce7vKLrj7lnulVHEdWoltgauo8bgCXgU,109
30
+ geney-1.3.77.dist-info/top_level.txt,sha256=O-FuNUMb5fn9dhZ-dYCgF0aZtfi1EslMstnzhc5IIVo,6
31
+ geney-1.3.77.dist-info/RECORD,,
File without changes