seqmat 1.0.0__tar.gz → 1.1.0__tar.gz
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.
- {seqmat-1.0.0/seqmat.egg-info → seqmat-1.1.0}/PKG-INFO +1 -1
- {seqmat-1.0.0 → seqmat-1.1.0}/seqmat/__init__.py +1 -1
- {seqmat-1.0.0 → seqmat-1.1.0}/seqmat/seqmat.py +15 -0
- {seqmat-1.0.0 → seqmat-1.1.0/seqmat.egg-info}/PKG-INFO +1 -1
- {seqmat-1.0.0 → seqmat-1.1.0}/setup.py +1 -1
- {seqmat-1.0.0 → seqmat-1.1.0}/LICENSE +0 -0
- {seqmat-1.0.0 → seqmat-1.1.0}/MANIFEST.in +0 -0
- {seqmat-1.0.0 → seqmat-1.1.0}/README.md +0 -0
- {seqmat-1.0.0 → seqmat-1.1.0}/examples/basic_usage.py +0 -0
- {seqmat-1.0.0 → seqmat-1.1.0}/examples/data_inspection.py +0 -0
- {seqmat-1.0.0 → seqmat-1.1.0}/requirements.txt +0 -0
- {seqmat-1.0.0 → seqmat-1.1.0}/seqmat/cli.py +0 -0
- {seqmat-1.0.0 → seqmat-1.1.0}/seqmat/config.py +0 -0
- {seqmat-1.0.0 → seqmat-1.1.0}/seqmat/gene.py +0 -0
- {seqmat-1.0.0 → seqmat-1.1.0}/seqmat/lmdb_store.py +0 -0
- {seqmat-1.0.0 → seqmat-1.1.0}/seqmat/sqlite_store.py +0 -0
- {seqmat-1.0.0 → seqmat-1.1.0}/seqmat/transcript.py +0 -0
- {seqmat-1.0.0 → seqmat-1.1.0}/seqmat/utils.py +0 -0
- {seqmat-1.0.0 → seqmat-1.1.0}/seqmat.egg-info/SOURCES.txt +0 -0
- {seqmat-1.0.0 → seqmat-1.1.0}/seqmat.egg-info/dependency_links.txt +0 -0
- {seqmat-1.0.0 → seqmat-1.1.0}/seqmat.egg-info/entry_points.txt +0 -0
- {seqmat-1.0.0 → seqmat-1.1.0}/seqmat.egg-info/requires.txt +0 -0
- {seqmat-1.0.0 → seqmat-1.1.0}/seqmat.egg-info/top_level.txt +0 -0
- {seqmat-1.0.0 → seqmat-1.1.0}/setup.cfg +0 -0
- {seqmat-1.0.0 → seqmat-1.1.0}/tests/__init__.py +0 -0
- {seqmat-1.0.0 → seqmat-1.1.0}/tests/test_gene.py +0 -0
- {seqmat-1.0.0 → seqmat-1.1.0}/tests/test_seqmat.py +0 -0
|
@@ -190,6 +190,21 @@ class SeqMat:
|
|
|
190
190
|
"""Return the reference sequence as a string (only valid bases)."""
|
|
191
191
|
return self.seq_array['ref'][self.seq_array['valid']].tobytes().decode()
|
|
192
192
|
|
|
193
|
+
def alignment(self) -> Tuple[str, str]:
|
|
194
|
+
"""Return gapped reference and mutated sequences aligned to each other.
|
|
195
|
+
|
|
196
|
+
Deletions appear as '-' in the mutated string, insertions appear as '-'
|
|
197
|
+
in the reference string, and SNPs show the differing bases at the same
|
|
198
|
+
position.
|
|
199
|
+
|
|
200
|
+
Returns:
|
|
201
|
+
(reference, mutated) tuple of equal-length strings.
|
|
202
|
+
"""
|
|
203
|
+
arr = self.seq_array
|
|
204
|
+
ref = arr['ref'].tobytes().decode()
|
|
205
|
+
mut = np.where(arr['valid'], arr['nt'], b'-').tobytes().decode()
|
|
206
|
+
return ref, mut
|
|
207
|
+
|
|
193
208
|
@property
|
|
194
209
|
def index(self) -> np.ndarray:
|
|
195
210
|
"""Return the genomic indices of valid bases."""
|
|
@@ -8,7 +8,7 @@ long_description = (this_directory / "README.md").read_text()
|
|
|
8
8
|
|
|
9
9
|
setup(
|
|
10
10
|
name="seqmat",
|
|
11
|
-
version="1.
|
|
11
|
+
version="1.1.0",
|
|
12
12
|
author="Nicolas Lynn Vila",
|
|
13
13
|
author_email="nicolasalynn@gmail.com",
|
|
14
14
|
description="Lightning-fast gene manipulation and analysis library.",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|