seqmat 1.3.0__tar.gz → 1.3.1__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.3.0/seqmat.egg-info → seqmat-1.3.1}/PKG-INFO +1 -1
- {seqmat-1.3.0 → seqmat-1.3.1}/seqmat/__init__.py +1 -1
- {seqmat-1.3.0 → seqmat-1.3.1}/seqmat/gene.py +0 -9
- {seqmat-1.3.0 → seqmat-1.3.1}/seqmat/seqmat.py +2 -4
- {seqmat-1.3.0 → seqmat-1.3.1/seqmat.egg-info}/PKG-INFO +1 -1
- {seqmat-1.3.0 → seqmat-1.3.1}/setup.py +1 -1
- {seqmat-1.3.0 → seqmat-1.3.1}/LICENSE +0 -0
- {seqmat-1.3.0 → seqmat-1.3.1}/MANIFEST.in +0 -0
- {seqmat-1.3.0 → seqmat-1.3.1}/README.md +0 -0
- {seqmat-1.3.0 → seqmat-1.3.1}/examples/basic_usage.py +0 -0
- {seqmat-1.3.0 → seqmat-1.3.1}/examples/data_inspection.py +0 -0
- {seqmat-1.3.0 → seqmat-1.3.1}/requirements.txt +0 -0
- {seqmat-1.3.0 → seqmat-1.3.1}/seqmat/cli.py +0 -0
- {seqmat-1.3.0 → seqmat-1.3.1}/seqmat/config.py +0 -0
- {seqmat-1.3.0 → seqmat-1.3.1}/seqmat/lmdb_store.py +0 -0
- {seqmat-1.3.0 → seqmat-1.3.1}/seqmat/sqlite_store.py +0 -0
- {seqmat-1.3.0 → seqmat-1.3.1}/seqmat/transcript.py +0 -0
- {seqmat-1.3.0 → seqmat-1.3.1}/seqmat/utils.py +0 -0
- {seqmat-1.3.0 → seqmat-1.3.1}/seqmat.egg-info/SOURCES.txt +0 -0
- {seqmat-1.3.0 → seqmat-1.3.1}/seqmat.egg-info/dependency_links.txt +0 -0
- {seqmat-1.3.0 → seqmat-1.3.1}/seqmat.egg-info/entry_points.txt +0 -0
- {seqmat-1.3.0 → seqmat-1.3.1}/seqmat.egg-info/requires.txt +0 -0
- {seqmat-1.3.0 → seqmat-1.3.1}/seqmat.egg-info/top_level.txt +0 -0
- {seqmat-1.3.0 → seqmat-1.3.1}/setup.cfg +0 -0
- {seqmat-1.3.0 → seqmat-1.3.1}/tests/__init__.py +0 -0
- {seqmat-1.3.0 → seqmat-1.3.1}/tests/bench_gene_creation.py +0 -0
- {seqmat-1.3.0 → seqmat-1.3.1}/tests/test_gene.py +0 -0
- {seqmat-1.3.0 → seqmat-1.3.1}/tests/test_seqmat.py +0 -0
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
"""Gene class for representing genomic genes with associated transcripts"""
|
|
2
|
-
import copy
|
|
3
2
|
from typing import Any, Dict, List, Tuple, Optional, Iterator, Union
|
|
4
3
|
from collections import Counter
|
|
5
4
|
from pathlib import Path
|
|
@@ -54,14 +53,6 @@ class Gene:
|
|
|
54
53
|
"""Returns the number of transcripts associated with this gene."""
|
|
55
54
|
return len(self.transcripts)
|
|
56
55
|
|
|
57
|
-
def __copy__(self):
|
|
58
|
-
"""Returns a shallow copy of the Gene object."""
|
|
59
|
-
return copy.copy(self)
|
|
60
|
-
|
|
61
|
-
def __deepcopy__(self, memo):
|
|
62
|
-
"""Returns a deep copy of the Gene object."""
|
|
63
|
-
return copy.deepcopy(self, memo)
|
|
64
|
-
|
|
65
56
|
def __iter__(self) -> Iterator[Transcript]:
|
|
66
57
|
"""Allow iteration over the gene's transcripts, yielding Transcript objects."""
|
|
67
58
|
for tid, annotations in self.transcripts.items():
|
|
@@ -29,14 +29,12 @@ _COMPLEMENT_LUT[ord('G')] = ord('C')
|
|
|
29
29
|
@lru_cache(maxsize=8)
|
|
30
30
|
def _fetch_fasta_region(fasta_path: str, chrom: str, start: int, end: int) -> str:
|
|
31
31
|
"""Cached FASTA region fetch. start is 1-based, end is inclusive."""
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
with pysam.FastaFile(fasta_path) as fasta:
|
|
33
|
+
return fasta.fetch(chrom, start - 1, end).upper()
|
|
34
34
|
|
|
35
35
|
|
|
36
36
|
def contains(array: Union[np.ndarray, List], value: Any) -> bool:
|
|
37
37
|
"""Return whether value is in array or list."""
|
|
38
|
-
if isinstance(array, np.ndarray):
|
|
39
|
-
return value in array
|
|
40
38
|
return value in array
|
|
41
39
|
|
|
42
40
|
|
|
@@ -8,7 +8,7 @@ long_description = (this_directory / "README.md").read_text()
|
|
|
8
8
|
|
|
9
9
|
setup(
|
|
10
10
|
name="seqmat",
|
|
11
|
-
version="1.3.
|
|
11
|
+
version="1.3.1",
|
|
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
|