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.
Files changed (27) hide show
  1. {seqmat-1.0.0/seqmat.egg-info → seqmat-1.1.0}/PKG-INFO +1 -1
  2. {seqmat-1.0.0 → seqmat-1.1.0}/seqmat/__init__.py +1 -1
  3. {seqmat-1.0.0 → seqmat-1.1.0}/seqmat/seqmat.py +15 -0
  4. {seqmat-1.0.0 → seqmat-1.1.0/seqmat.egg-info}/PKG-INFO +1 -1
  5. {seqmat-1.0.0 → seqmat-1.1.0}/setup.py +1 -1
  6. {seqmat-1.0.0 → seqmat-1.1.0}/LICENSE +0 -0
  7. {seqmat-1.0.0 → seqmat-1.1.0}/MANIFEST.in +0 -0
  8. {seqmat-1.0.0 → seqmat-1.1.0}/README.md +0 -0
  9. {seqmat-1.0.0 → seqmat-1.1.0}/examples/basic_usage.py +0 -0
  10. {seqmat-1.0.0 → seqmat-1.1.0}/examples/data_inspection.py +0 -0
  11. {seqmat-1.0.0 → seqmat-1.1.0}/requirements.txt +0 -0
  12. {seqmat-1.0.0 → seqmat-1.1.0}/seqmat/cli.py +0 -0
  13. {seqmat-1.0.0 → seqmat-1.1.0}/seqmat/config.py +0 -0
  14. {seqmat-1.0.0 → seqmat-1.1.0}/seqmat/gene.py +0 -0
  15. {seqmat-1.0.0 → seqmat-1.1.0}/seqmat/lmdb_store.py +0 -0
  16. {seqmat-1.0.0 → seqmat-1.1.0}/seqmat/sqlite_store.py +0 -0
  17. {seqmat-1.0.0 → seqmat-1.1.0}/seqmat/transcript.py +0 -0
  18. {seqmat-1.0.0 → seqmat-1.1.0}/seqmat/utils.py +0 -0
  19. {seqmat-1.0.0 → seqmat-1.1.0}/seqmat.egg-info/SOURCES.txt +0 -0
  20. {seqmat-1.0.0 → seqmat-1.1.0}/seqmat.egg-info/dependency_links.txt +0 -0
  21. {seqmat-1.0.0 → seqmat-1.1.0}/seqmat.egg-info/entry_points.txt +0 -0
  22. {seqmat-1.0.0 → seqmat-1.1.0}/seqmat.egg-info/requires.txt +0 -0
  23. {seqmat-1.0.0 → seqmat-1.1.0}/seqmat.egg-info/top_level.txt +0 -0
  24. {seqmat-1.0.0 → seqmat-1.1.0}/setup.cfg +0 -0
  25. {seqmat-1.0.0 → seqmat-1.1.0}/tests/__init__.py +0 -0
  26. {seqmat-1.0.0 → seqmat-1.1.0}/tests/test_gene.py +0 -0
  27. {seqmat-1.0.0 → seqmat-1.1.0}/tests/test_seqmat.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: seqmat
3
- Version: 1.0.0
3
+ Version: 1.1.0
4
4
  Summary: Lightning-fast gene manipulation and analysis library.
5
5
  Home-page: https://github.com/nicolasalynn/seqmat
6
6
  Author: Nicolas Lynn Vila
@@ -5,7 +5,7 @@ A comprehensive Python library for genomic sequence analysis with full mutation
5
5
  splicing analysis, and sequence manipulation.
6
6
  """
7
7
 
8
- __version__ = "1.0.0"
8
+ __version__ = "1.1.0"
9
9
  __author__ = "Nicolas Lynn Vila"
10
10
  __email__ = "nicolasalynn@gmail.com"
11
11
 
@@ -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."""
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: seqmat
3
- Version: 1.0.0
3
+ Version: 1.1.0
4
4
  Summary: Lightning-fast gene manipulation and analysis library.
5
5
  Home-page: https://github.com/nicolasalynn/seqmat
6
6
  Author: Nicolas Lynn Vila
@@ -8,7 +8,7 @@ long_description = (this_directory / "README.md").read_text()
8
8
 
9
9
  setup(
10
10
  name="seqmat",
11
- version="1.0.0",
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