biofiles 0.0.10__tar.gz → 0.0.11__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 (25) hide show
  1. {biofiles-0.0.10 → biofiles-0.0.11}/PKG-INFO +1 -1
  2. biofiles-0.0.11/biofiles/fai.py +23 -0
  3. {biofiles-0.0.10 → biofiles-0.0.11}/biofiles/types/sequence.py +7 -0
  4. {biofiles-0.0.10 → biofiles-0.0.11}/biofiles.egg-info/PKG-INFO +1 -1
  5. {biofiles-0.0.10 → biofiles-0.0.11}/biofiles.egg-info/SOURCES.txt +1 -0
  6. {biofiles-0.0.10 → biofiles-0.0.11}/pyproject.toml +1 -1
  7. {biofiles-0.0.10 → biofiles-0.0.11}/LICENSE +0 -0
  8. {biofiles-0.0.10 → biofiles-0.0.11}/README.md +0 -0
  9. {biofiles-0.0.10 → biofiles-0.0.11}/biofiles/__init__.py +0 -0
  10. {biofiles-0.0.10 → biofiles-0.0.11}/biofiles/bam.py +0 -0
  11. {biofiles-0.0.10 → biofiles-0.0.11}/biofiles/common.py +0 -0
  12. {biofiles-0.0.10 → biofiles-0.0.11}/biofiles/fasta.py +0 -0
  13. {biofiles-0.0.10 → biofiles-0.0.11}/biofiles/gff.py +0 -0
  14. {biofiles-0.0.10 → biofiles-0.0.11}/biofiles/gtf.py +0 -0
  15. {biofiles-0.0.10 → biofiles-0.0.11}/biofiles/repeatmasker.py +0 -0
  16. {biofiles-0.0.10 → biofiles-0.0.11}/biofiles/types/__init__.py +0 -0
  17. {biofiles-0.0.10 → biofiles-0.0.11}/biofiles/types/alignment.py +0 -0
  18. {biofiles-0.0.10 → biofiles-0.0.11}/biofiles/types/feature.py +0 -0
  19. {biofiles-0.0.10 → biofiles-0.0.11}/biofiles/types/repeat.py +0 -0
  20. {biofiles-0.0.10 → biofiles-0.0.11}/biofiles/utility/__init__.py +0 -0
  21. {biofiles-0.0.10 → biofiles-0.0.11}/biofiles/utility/cli.py +0 -0
  22. {biofiles-0.0.10 → biofiles-0.0.11}/biofiles/utility/feature.py +0 -0
  23. {biofiles-0.0.10 → biofiles-0.0.11}/biofiles.egg-info/dependency_links.txt +0 -0
  24. {biofiles-0.0.10 → biofiles-0.0.11}/biofiles.egg-info/top_level.txt +0 -0
  25. {biofiles-0.0.10 → biofiles-0.0.11}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: biofiles
3
- Version: 0.0.10
3
+ Version: 0.0.11
4
4
  Summary: Pure-Python, zero-dependency collection of bioinformatics-related file readers and writers
5
5
  Author-email: Tigran Saluev <tigran@saluev.com>
6
6
  Maintainer-email: Tigran Saluev <tigran@saluev.com>
@@ -0,0 +1,23 @@
1
+ import sys
2
+ from typing import Iterator
3
+
4
+ from biofiles.common import Reader
5
+ from biofiles.types.sequence import SequenceDescription
6
+
7
+
8
+ class FAIReader(Reader):
9
+ def __iter__(self) -> Iterator[SequenceDescription]:
10
+ for line in self._input:
11
+ sequence_id, length_str, byte_offset_str, _, _ = line.rstrip("\n").split(
12
+ "\t"
13
+ )
14
+ yield SequenceDescription(
15
+ id=sequence_id, length=int(length_str), byte_offset=int(byte_offset_str)
16
+ )
17
+
18
+
19
+ if __name__ == "__main__":
20
+ for path in sys.argv[1:]:
21
+ with FAIReader(path) as reader:
22
+ for seq_desc in reader:
23
+ print(seq_desc)
@@ -9,3 +9,10 @@ class Sequence:
9
9
  id: str
10
10
  description: str
11
11
  sequence: str
12
+
13
+
14
+ @dataclass(frozen=True)
15
+ class SequenceDescription:
16
+ id: str
17
+ length: int
18
+ byte_offset: int
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: biofiles
3
- Version: 0.0.10
3
+ Version: 0.0.11
4
4
  Summary: Pure-Python, zero-dependency collection of bioinformatics-related file readers and writers
5
5
  Author-email: Tigran Saluev <tigran@saluev.com>
6
6
  Maintainer-email: Tigran Saluev <tigran@saluev.com>
@@ -4,6 +4,7 @@ pyproject.toml
4
4
  biofiles/__init__.py
5
5
  biofiles/bam.py
6
6
  biofiles/common.py
7
+ biofiles/fai.py
7
8
  biofiles/fasta.py
8
9
  biofiles/gff.py
9
10
  biofiles/gtf.py
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "biofiles"
7
- version = "0.0.10"
7
+ version = "0.0.11"
8
8
  authors = [
9
9
  { name="Tigran Saluev", email="tigran@saluev.com" },
10
10
  ]
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes