geney 1.3.37__py2.py3-none-any.whl → 1.3.39__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/Gene.py CHANGED
@@ -78,6 +78,10 @@ class Gene:
78
78
  for tid, annotations in self.transcripts.items():
79
79
  yield Transcript(annotations, organism=self.organism)
80
80
 
81
+ def __getitem__(self, item):
82
+ print(f"{item} not an annotated transcript of this gene.")
83
+ return Transcript(self.transcripts[item], organism=self.organism) if item in self.transcripts else None
84
+
81
85
  @classmethod
82
86
  def from_file(cls, gene_name, organism='hg38'):
83
87
  # Load data from file here
geney/Transcript.py CHANGED
@@ -371,7 +371,7 @@ class Transcript:
371
371
  return self if inplace else ("", np.array([]))
372
372
 
373
373
  # Translate the ORF to protein
374
- protein = str(Seq(self.orf.seq).translate()).replace('*', '')
374
+ protein = str(Seq(self.orf.seq).translate()).strip('*') # .replace('*', '')
375
375
 
376
376
  # Use existing cons_vector or default to an array of ones
377
377
  self.cons_vector = self.cons_vector if hasattr(self, 'cons_vector') and len(self.cons_vector) == len(protein) else np.ones(len(protein))
geney/oncosplice.py CHANGED
@@ -329,6 +329,10 @@ def oncosplice(mut_id, splicing_threshold=0.5, protein_coding=True, cons_require
329
329
  mutated_transcript.mutate(mutation, inplace=True)
330
330
 
331
331
  reference_transcript.generate_mature_mrna().generate_protein()
332
+ if '*' in reference_transcript.protein:
333
+ print(f"> Errors in reference transcript {reference_transcript.transcript_id}")
334
+ continue
335
+
332
336
  reference_transcript.cons_vector = transform_conservation_vector(reference_transcript.cons_vector,
333
337
  window=window_length)
334
338
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: geney
3
- Version: 1.3.37
3
+ Version: 1.3.39
4
4
  Summary: A Python package for gene expression modeling.
5
5
  Home-page: https://github.com/nicolaslynn/geney
6
6
  Author: Nicolas Lynn
@@ -1,7 +1,7 @@
1
1
  geney/Fasta_segment.py,sha256=99HxNGNh_MfdVW6hhtlb1vOn7eSmT7oFoEfHDFMxG8w,11275
2
- geney/Gene.py,sha256=1pqKI3hGZndi7VY4j66ObhJjnz8YiNtBLGJTIHWVujA,6670
2
+ geney/Gene.py,sha256=nMWJjoQaiVFm2iRjoiq7ghZqnXtW0tJDcq2S0AyOIvY,6883
3
3
  geney/SeqMats.py,sha256=aLpqd7RJSEU07jdPXpbtZPeb2D9BxrZuW6BTkcXpNE4,18819
4
- geney/Transcript.py,sha256=s2QtC5IGAJNZ1Uf3S-eTCzTXy6lrDzXbxb9pcLMwbQg,14485
4
+ geney/Transcript.py,sha256=CpfxYkuCwFILozrtLuiWnlr1mRnMKn4o84HVJislgYs,14499
5
5
  geney/__init__.py,sha256=eBdDl42N6UhcYeZDjOnv199Z88fI5_8Y6xW8447OKXM,755
6
6
  geney/_mutation_utils.py,sha256=dHssUsnii_mf-wuRoMmF13UlD7k3ml_VwQMItTYnXpU,1132
7
7
  geney/allele_linkage.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -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=GNxbofZ84aEU9MxmV223S2AzT4ZxFe3azumX0sKImYs,23243
14
+ geney/oncosplice.py,sha256=if9C_7s7tjA-6QQXXxKM2VGExdUwJfnNtsxsFsUf36g,23405
15
15
  geney/pangolin_utils.py,sha256=i5j5vEMCWOTIa1mRP2377BAhlUFZjHBzTQBips4lA_4,2934
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.37.dist-info/METADATA,sha256=s_ozaSGvJtbWOKfF7vTyJSa0UjUm_ssmf5YOdGQQ_Yw,990
29
- geney-1.3.37.dist-info/WHEEL,sha256=AHX6tWk3qWuce7vKLrj7lnulVHEdWoltgauo8bgCXgU,109
30
- geney-1.3.37.dist-info/top_level.txt,sha256=O-FuNUMb5fn9dhZ-dYCgF0aZtfi1EslMstnzhc5IIVo,6
31
- geney-1.3.37.dist-info/RECORD,,
28
+ geney-1.3.39.dist-info/METADATA,sha256=UOJiSEnmTP4xI_JhYkGoswQivS9UuEhotKkASjo8l8c,990
29
+ geney-1.3.39.dist-info/WHEEL,sha256=AHX6tWk3qWuce7vKLrj7lnulVHEdWoltgauo8bgCXgU,109
30
+ geney-1.3.39.dist-info/top_level.txt,sha256=O-FuNUMb5fn9dhZ-dYCgF0aZtfi1EslMstnzhc5IIVo,6
31
+ geney-1.3.39.dist-info/RECORD,,
File without changes