geney 1.4.14__py2.py3-none-any.whl → 1.4.15__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/utils/SeqMats.py
CHANGED
|
@@ -192,24 +192,27 @@ class SeqMat:
|
|
|
192
192
|
if len(ref) != len(alt):
|
|
193
193
|
raise ValueError("Substitution mutations must have alleles of equal length.")
|
|
194
194
|
|
|
195
|
-
#
|
|
196
|
-
pos_idx =
|
|
197
|
-
|
|
195
|
+
# pos_idx = np.searchsorted(self.seq_array["index"], pos)
|
|
196
|
+
pos_idx = self._pos_to_idx.get(pos)
|
|
197
|
+
|
|
198
198
|
if pos_idx is None:
|
|
199
199
|
raise ValueError(f"Position {pos} not found in index")
|
|
200
200
|
|
|
201
201
|
end_idx = pos_idx + len(ref)
|
|
202
202
|
if end_idx > len(self.seq_array):
|
|
203
203
|
raise ValueError(f"Substitution range exceeds sequence length at position {pos}.")
|
|
204
|
+
|
|
204
205
|
segment = self.seq_array["ref"][pos_idx:end_idx].tobytes().decode()
|
|
205
206
|
if segment != ref:
|
|
206
207
|
raise ValueError(f"Reference mismatch at position {pos}: expected '{ref}', found '{segment}'")
|
|
208
|
+
|
|
207
209
|
# ref_segment = self.seq_array["ref"][pos_idx:end_idx]
|
|
208
210
|
# expected_segment = np.frombuffer(ref.encode(), dtype='S1')
|
|
209
211
|
# if not np.all(ref_segment == np.frombuffer(ref.encode(), dtype='S1')):
|
|
210
212
|
# actual_str = ref_segment.tobytes().decode()
|
|
211
213
|
# raise ValueError(f"Reference mismatch at position {pos}: expected '{ref}', found '{actual_str}'")
|
|
212
214
|
# self.seq_array["nt"][pos_idx:end_idx] = np.frombuffer(alt.encode(), dtype='S1')
|
|
215
|
+
|
|
213
216
|
for i, nt in enumerate(alt):
|
|
214
217
|
self.seq_array["nt"][pos_idx + i] = nt.encode()
|
|
215
218
|
|
|
@@ -37,7 +37,7 @@ geney/translation_initiation/tis_utils.py,sha256=AF3siFjuQH-Rs44EV-80zHdbxRMvN4w
|
|
|
37
37
|
geney/translation_initiation/resources/kozak_pssm.json,sha256=pcd0Olziutq-6H3mFWDCD9cujQ_AlZO-iiOvBl82hqE,1165
|
|
38
38
|
geney/translation_initiation/resources/tis_regressor_model.joblib,sha256=IXb4DUDhJ5rBDKcqMk9zE3ECTZZcdj7Jixz3KpoZ7OA,2592025
|
|
39
39
|
geney/utils/Fasta_segment.py,sha256=weB5NJ65P0XiyAJCiCHx4T9sHC1pWLpuQeOy0B85gyg,11364
|
|
40
|
-
geney/utils/SeqMats.py,sha256=
|
|
40
|
+
geney/utils/SeqMats.py,sha256=1EgYord9ieaAd1pfAbleBxBnhnubgsNEY9Y40-kVNVo,18502
|
|
41
41
|
geney/utils/TranscriptLibrary.py,sha256=ma_ZVPgglxXDDneEvdqxxeqxG8eSFL-zgLUXyC6BqY8,2070
|
|
42
42
|
geney/utils/__init__.py,sha256=-nJ-DMx1JzP-ZCe_QuQCeM0ZYIT_16jxoXDhUaO_4Oc,714
|
|
43
43
|
geney/utils/mutation_utils.py,sha256=r-pHr56gEa5kh_DPX8MjFY3ZfYaOtyo4CUfJ5ZHlXPw,3243
|
|
@@ -45,7 +45,7 @@ geney/utils/pangolin_utils.py,sha256=JQSPbWxdzqGFYfWQktkfLMaMSGR28eGQhNzO7MLMe5M
|
|
|
45
45
|
geney/utils/spliceai_utils.py,sha256=VtrIbjyQxk_3lw86eWjftRYyal9OzxArJ0GV5u_ymTg,2721
|
|
46
46
|
geney/utils/splicing_utils.py,sha256=vPCGnCPR1ooEZEHR79yFHLmRQXEJHXEQjjxpBR-YWOs,20635
|
|
47
47
|
geney/utils/utils.py,sha256=m51Vd0cEbrcIHo6_8BAuI9YSPcKRs22e5LfVd2Qj6Is,2181
|
|
48
|
-
geney-1.4.
|
|
49
|
-
geney-1.4.
|
|
50
|
-
geney-1.4.
|
|
51
|
-
geney-1.4.
|
|
48
|
+
geney-1.4.15.dist-info/METADATA,sha256=6gwA20Ma1aqa3dWNObVhc9fZWQlvsCMzqbKswUl6fTQ,990
|
|
49
|
+
geney-1.4.15.dist-info/WHEEL,sha256=AHX6tWk3qWuce7vKLrj7lnulVHEdWoltgauo8bgCXgU,109
|
|
50
|
+
geney-1.4.15.dist-info/top_level.txt,sha256=O-FuNUMb5fn9dhZ-dYCgF0aZtfi1EslMstnzhc5IIVo,6
|
|
51
|
+
geney-1.4.15.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|