geney 1.3.57__py2.py3-none-any.whl → 1.3.59__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/SeqMats.py CHANGED
@@ -300,6 +300,10 @@ class SeqMat:
300
300
  def raw_indices(self):
301
301
  return self.seqmat[self.ROW_INDS, :] + (self.seqmat[self.ROW_SUPERINDS, :] / 10)
302
302
 
303
+ @property
304
+ def filter(self):
305
+ return self.seqmat[:, self.seqmat[self.ROW_SEQ, :] != 5]
306
+
303
307
 
304
308
  def mutate(self, mut, inplace=False):
305
309
  """
@@ -357,15 +361,19 @@ class SeqMat:
357
361
  if tis_index not in self.indices:
358
362
  return SeqMat.from_seq({'seq': ''})
359
363
 
360
- temp = self.seqmat[:, self._rel_index(tis_index):]
361
- temp = temp[:, temp[0, :] != 5]
362
- temp = SeqMat(temp) # .drop_indices()
363
- raw_seq = temp.seq # Extract the raw sequence
364
- pattern = re.compile(r"(?:[NACGT]{3})*?(TAA|TAG|TGA)")
364
+ raw_seq = SeqMat(self.seqmat[:, self._rel_index(tis_index):])
365
+ raw_seq = SeqMat(raw_seq.filter)
366
+
367
+ # temp = temp[:, temp[0, :] != 5]
368
+ # temp = SeqMat(temp) # .drop_indices()
369
+ # raw_seq = temp.seq # Extract the raw sequence
370
+ # pattern = re.compile(r"(?:[NACGT]{3})*?(TAA|TAG|TGA)")
365
371
  # match = pattern.match(raw_seq)
366
- match = [(m.group(), m.start()+1) for m in re.finditer(r"(?:[NACGT]{3})*?(TAA|TAG|TGA)", raw_seq) if
367
- (m.start()+1) % 3 == 0]
372
+ print(raw_seq.rawseq)
373
+ match = [(m.group(), m.start()+1) for m in re.finditer(r"(?:[NACGT]{3})*?(TAA|TAG|TGA)", raw_seq.seq)]# if
374
+ # (m.start()+1) % 3 == 0]
368
375
 
376
+ print(match)
369
377
  if len(match) > 0:
370
378
  stop_index = match[0][-1] #.end()
371
379
  else:
@@ -373,7 +381,7 @@ class SeqMat:
373
381
 
374
382
  end_index = stop_index
375
383
  # assert (end_index+1) % 3 == 0, f"{end_index} is not a multiple of 3"
376
- return SeqMat(temp.seqmat[:, :end_index])
384
+ return SeqMat(raw_seq.seqmat[:, :end_index])
377
385
 
378
386
  def translate(self, tis_index):
379
387
  """
geney/oncosplice.py CHANGED
@@ -338,9 +338,9 @@ def oncosplice(mut_id, splicing_threshold=0.5, protein_coding=True, cons_require
338
338
  mutated_transcript.mutate(mutation, inplace=True)
339
339
 
340
340
  reference_transcript.generate_mature_mrna().generate_protein()
341
- if ('*' in reference_transcript.protein[:-1]):
342
- print(f"> Errors in reference transcript {reference_transcript.transcript_id}")
343
- continue
341
+ # if ('*' in reference_transcript.protein[:-1]):
342
+ # print(f"> Errors in reference transcript {reference_transcript.transcript_id}")
343
+ # continue
344
344
 
345
345
  if len(reference_transcript.protein) < window_length:
346
346
  print(f"> Window length issue {reference_transcript.transcript_id}")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: geney
3
- Version: 1.3.57
3
+ Version: 1.3.59
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,6 +1,6 @@
1
1
  geney/Fasta_segment.py,sha256=99HxNGNh_MfdVW6hhtlb1vOn7eSmT7oFoEfHDFMxG8w,11275
2
2
  geney/Gene.py,sha256=nMWJjoQaiVFm2iRjoiq7ghZqnXtW0tJDcq2S0AyOIvY,6883
3
- geney/SeqMats.py,sha256=AKR1EhyDhOaEhavrkXSrVjYsohB6Qvsq11Udy7SGwvs,19238
3
+ geney/SeqMats.py,sha256=xiX6c4o0Imb00dzTmSgX4spvn7m0lB6IBMr0Sn2WUHE,19463
4
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
@@ -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=G9OB6OPy6HV9RRBUUWnJqOLLsREpHCLOoNDn6m6ay0M,24698
14
+ geney/oncosplice.py,sha256=9_Eo5fL68CosTj6yTfh3UjCXHprhzqHFRL21WRicMRs,24704
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.57.dist-info/METADATA,sha256=oZcH7DyAdYHd-U5r06RTp7jPnUDdFH-G3-3CCJtUNOg,990
29
- geney-1.3.57.dist-info/WHEEL,sha256=AHX6tWk3qWuce7vKLrj7lnulVHEdWoltgauo8bgCXgU,109
30
- geney-1.3.57.dist-info/top_level.txt,sha256=O-FuNUMb5fn9dhZ-dYCgF0aZtfi1EslMstnzhc5IIVo,6
31
- geney-1.3.57.dist-info/RECORD,,
28
+ geney-1.3.59.dist-info/METADATA,sha256=h5ITzoYHQSPAse3aAS7Xpx97O0aEkQVCZoB-iE_NXIY,990
29
+ geney-1.3.59.dist-info/WHEEL,sha256=AHX6tWk3qWuce7vKLrj7lnulVHEdWoltgauo8bgCXgU,109
30
+ geney-1.3.59.dist-info/top_level.txt,sha256=O-FuNUMb5fn9dhZ-dYCgF0aZtfi1EslMstnzhc5IIVo,6
31
+ geney-1.3.59.dist-info/RECORD,,
File without changes