geney 1.2.31__py2.py3-none-any.whl → 1.2.33__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.
Potentially problematic release.
This version of geney might be problematic. Click here for more details.
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]
|
|
@@ -193,7 +203,7 @@ class SeqMat:
|
|
|
193
203
|
return SeqMat('ATG')
|
|
194
204
|
|
|
195
205
|
def translate(self, tis_index):
|
|
196
|
-
from Bio import Seq
|
|
206
|
+
from Bio.Seq import Seq
|
|
197
207
|
return Seq(self.orf_seqmat(tis_index).seq).translate()
|
|
198
208
|
|
|
199
209
|
|
|
@@ -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=
|
|
12
|
+
geney/seqmat_utils.py,sha256=YV5DFLbfjXLIswPGvqK1-eEfwn9TUby0b2kewdGAKws,18372
|
|
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.
|
|
23
|
-
geney-1.2.
|
|
24
|
-
geney-1.2.
|
|
25
|
-
geney-1.2.
|
|
22
|
+
geney-1.2.33.dist-info/METADATA,sha256=MS8m3iEm-fxsKpsoJTNHF8Euari8FVEmwqZJBMn_PL8,948
|
|
23
|
+
geney-1.2.33.dist-info/WHEEL,sha256=fS9sRbCBHs7VFcwJLnLXN1MZRR0_TVTxvXKzOnaSFs8,110
|
|
24
|
+
geney-1.2.33.dist-info/top_level.txt,sha256=O-FuNUMb5fn9dhZ-dYCgF0aZtfi1EslMstnzhc5IIVo,6
|
|
25
|
+
geney-1.2.33.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|