geney 1.2.31__py2.py3-none-any.whl → 1.2.32__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/seqmat_utils.py CHANGED
@@ -152,6 +152,16 @@ class SeqMat:
152
152
  padded_subseq = (padding * left_padding) + valid_subseq + (padding * right_padding)
153
153
  return padded_subseq
154
154
 
155
+ def asymmetric_indices(self, center, left_context, right_context):
156
+ center_idx = np.where(self.seqmat[self.ROW_INDS] == center)[0][0]
157
+ start_idx = center_idx - left_context
158
+ end_idx = center_idx + right_context + 1 # +1 because end index in slicing is exclusive
159
+ left_padding = max(0, -start_idx)
160
+ right_padding = max(0, end_idx - len(self.seqmat[self.ROW_INDS]))
161
+ valid_start_idx = max(0, start_idx)
162
+ valid_end_idx = min(len(self.seqmat[self.ROW_INDS]), end_idx)
163
+ valid_subseq = self.indices[valid_start_idx:valid_end_idx]
164
+ return valid_subseq
155
165
 
156
166
  def subseq_suffix(self, start):
157
167
  start_pos = np.where(self.seqmat[self.ROW_INDS] == start)[0][0]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: geney
3
- Version: 1.2.31
3
+ Version: 1.2.32
4
4
  Summary: A Python package for gene expression modeling.
5
5
  Home-page: https://github.com/nicolaslynn/geney
6
6
  Author: Nicolas Lynn
@@ -9,7 +9,7 @@ geney/mutation_utils.py,sha256=C_kv2MB_L8LlhX3W2ooXjJ3uDoJ8zX1WeDtZKoBZJkI,1547
9
9
  geney/oncosplice.py,sha256=7wf0_-Gkc_G9HhUXjORHk3buZ66JzVzSFVQ4EZOtUAE,21787
10
10
  geney/pangolin_utils.py,sha256=ETTGpuaQgdZ1v8H0NP8sbTEfGWu0VXUFUS7wsURsTc4,2991
11
11
  geney/power_utils.py,sha256=MehZFUdkJ2EFUot709yPEDxSkXmH5XevMebX2HD768A,7330
12
- geney/seqmat_utils.py,sha256=jTW2LZEAh5ftgWp0sblq_6AfI21uC4_bPu6zxvLhPWA,17755
12
+ geney/seqmat_utils.py,sha256=TDWhE5oVTGJceaO6YmE7I_BEWRxWLT74_3rkmY1M0Fs,18368
13
13
  geney/spliceai_utils.py,sha256=gIGPC8u3J15A7EQrk2Elho5PbF9MmUUNopGGH-eEV8s,1873
14
14
  geney/splicing_utils.py,sha256=q47EdcsHrp4aLIPVWvkGBJSzS3l3DKiD9DNDsPpZdHk,16075
15
15
  geney/survival_utils.py,sha256=2CAkC2LsspicHIdrqsiPnjgvpr5KHDUfLFFqnRbPJqs,5762
@@ -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.31.dist-info/METADATA,sha256=vRYAE-ITb5427-B42evqLtx6LOrfhZ7wlGONrlje9vo,948
23
- geney-1.2.31.dist-info/WHEEL,sha256=fS9sRbCBHs7VFcwJLnLXN1MZRR0_TVTxvXKzOnaSFs8,110
24
- geney-1.2.31.dist-info/top_level.txt,sha256=O-FuNUMb5fn9dhZ-dYCgF0aZtfi1EslMstnzhc5IIVo,6
25
- geney-1.2.31.dist-info/RECORD,,
22
+ geney-1.2.32.dist-info/METADATA,sha256=aHeSBHWq3b1li4G_CI2ClUEHJc5SfWHowqKrkZbQPGk,948
23
+ geney-1.2.32.dist-info/WHEEL,sha256=fS9sRbCBHs7VFcwJLnLXN1MZRR0_TVTxvXKzOnaSFs8,110
24
+ geney-1.2.32.dist-info/top_level.txt,sha256=O-FuNUMb5fn9dhZ-dYCgF0aZtfi1EslMstnzhc5IIVo,6
25
+ geney-1.2.32.dist-info/RECORD,,
File without changes