geney 1.2.41__py2.py3-none-any.whl → 1.2.43__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
@@ -443,6 +443,10 @@ async def oncosplice_prototype(mut_id, splicing_threshold=0.5, protein_coding=Tr
443
443
 
444
444
  def inspect_domain(row, modified_vector, conservation_vector):
445
445
  v1, v2 = modified_vector[row.start:row.end], conservation_vector[row.start:row.end]
446
+ if sum(v2) == 0:
447
+ return pd.Series([f'{row.type}|{row.start}|{row.end}|{row.description}', 0],
448
+ index=['domain_identifier', 'score'])
449
+
446
450
  return pd.Series([f'{row.type}|{row.start}|{row.end}|{row.description}', sum(v1 * v2) / sum(v2)],
447
451
  index=['domain_identifier', 'score'])
448
452
 
@@ -466,6 +470,9 @@ async def oncosplice_prototype(mut_id, splicing_threshold=0.5, protein_coding=Tr
466
470
  transcript.cons_vector = transform_conservation_vector(transcript.cons_vector, window=window_length)
467
471
  transcript.generate_mature_mrna().generate_protein(inplace=True)
468
472
  ref_protein, cons_vector = transcript.protein, transcript.cons_vector
473
+ if sum(cons_vector) == 0:
474
+ cons_vector = np.ones(len(ref_protein))/len(ref_protein)
475
+
469
476
  reference_transcript = copy.deepcopy(transcript)
470
477
 
471
478
  assert len(ref_protein) == len(
@@ -494,17 +501,21 @@ async def oncosplice_prototype(mut_id, splicing_threshold=0.5, protein_coding=Tr
494
501
  cons_vector))
495
502
 
496
503
  out = domains_df.apply(lambda row: inspect_domain(row, modified_positions, cons_vector), axis=1)
497
- domains_affected = '+'.join([f'{a}:{b}' for a, b in list(zip(out.domain_identifier, out.score))])
504
+ domains_affected = '+'.join([f'{a}:{round(b, 3)}' for a, b in list(zip(out.domain_identifier, out.score))])
498
505
 
499
506
  report = OncospliceAnnotator(reference_transcript, transcript, mutation)
500
507
  report['mut_id'] = mut_id
501
508
  report['oncosplice_score'] = affected_cons_scores
509
+ report['cons_available'] = transcript.cons_available
510
+ report['transcript_id'] = transcript.transcript_id
502
511
  report['percentile'] = percentile
503
512
  report['isoform_id'] = i
504
513
  report['isoform_prevalence'] = new_boundaries['path_weight']
505
514
  report['full_missplicing'] = missplicing.aberrant_splicing
506
515
  report['missplicing'] = max(missplicing)
507
- report['domains_affected'] = domains_affected
516
+ report['domains'] = domains_affected
517
+ report['max_domain_score'] = out.score.max()
518
+
508
519
  report['reference_resemblance'] = reference_gene_proteins.get(transcript.protein, None)
509
520
  results.append(pd.Series(report))
510
521
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: geney
3
- Version: 1.2.41
3
+ Version: 1.2.43
4
4
  Summary: A Python package for gene expression modeling.
5
5
  Home-page: https://github.com/nicolaslynn/geney
6
6
  Author: Nicolas Lynn
@@ -6,7 +6,7 @@ geney/graphic_utils.py,sha256=oMsBpB9YeEn96gGpKh4MmtagJffWZbk-xPrIwHvkFhA,11016
6
6
  geney/gtex_utils.py,sha256=asL2lHyU5KsbWpV096vkf1Ka7hSo_RRfZqw7p5nERmE,1919
7
7
  geney/immune_utils.py,sha256=ZRni5ttrhpYBnmNr0d0ZatIbNPYs4nmQuoUO00SpsS4,5271
8
8
  geney/mutation_utils.py,sha256=C_kv2MB_L8LlhX3W2ooXjJ3uDoJ8zX1WeDtZKoBZJkI,1547
9
- geney/oncosplice.py,sha256=1K8p-sytnMUKTYwO_z_YJLelLosKj8TZpM0i5lHcMFI,22941
9
+ geney/oncosplice.py,sha256=bw9C9zutzvxE4q1bPmBG88ByGnrMgbBlxZuAlp_65xw,23414
10
10
  geney/pangolin_utils.py,sha256=lLmnjJdJjqwWS85-1jlPLIjD2z14sWjzU87hS-8xxpQ,2873
11
11
  geney/power_utils.py,sha256=MehZFUdkJ2EFUot709yPEDxSkXmH5XevMebX2HD768A,7330
12
12
  geney/seqmat_utils.py,sha256=YV5DFLbfjXLIswPGvqK1-eEfwn9TUby0b2kewdGAKws,18372
@@ -20,7 +20,7 @@ geney/translation_initiation/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NM
20
20
  geney/translation_initiation/tis_utils.py,sha256=AF3siFjuQH-Rs44EV-80zHdbxRMvN4woLFSHroWIETc,4448
21
21
  geney/translation_initiation/resources/kozak_pssm.json,sha256=pcd0Olziutq-6H3mFWDCD9cujQ_AlZO-iiOvBl82hqE,1165
22
22
  geney/translation_initiation/resources/tis_regressor_model.joblib,sha256=IXb4DUDhJ5rBDKcqMk9zE3ECTZZcdj7Jixz3KpoZ7OA,2592025
23
- geney-1.2.41.dist-info/METADATA,sha256=e7eHu8HlNdNuNXLWxK17ok3lAetzKTJ7ie-8MRct1T8,948
24
- geney-1.2.41.dist-info/WHEEL,sha256=fS9sRbCBHs7VFcwJLnLXN1MZRR0_TVTxvXKzOnaSFs8,110
25
- geney-1.2.41.dist-info/top_level.txt,sha256=O-FuNUMb5fn9dhZ-dYCgF0aZtfi1EslMstnzhc5IIVo,6
26
- geney-1.2.41.dist-info/RECORD,,
23
+ geney-1.2.43.dist-info/METADATA,sha256=zbXK3WDJrB4kLGtcZxDWyfTPFqZdCd2-HzldPGlMmoY,948
24
+ geney-1.2.43.dist-info/WHEEL,sha256=fS9sRbCBHs7VFcwJLnLXN1MZRR0_TVTxvXKzOnaSFs8,110
25
+ geney-1.2.43.dist-info/top_level.txt,sha256=O-FuNUMb5fn9dhZ-dYCgF0aZtfi1EslMstnzhc5IIVo,6
26
+ geney-1.2.43.dist-info/RECORD,,
File without changes