biofiles 0.0.10__py3-none-any.whl → 0.0.11__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.
- biofiles/fai.py +23 -0
- biofiles/types/sequence.py +7 -0
- {biofiles-0.0.10.dist-info → biofiles-0.0.11.dist-info}/METADATA +1 -1
- {biofiles-0.0.10.dist-info → biofiles-0.0.11.dist-info}/RECORD +7 -6
- {biofiles-0.0.10.dist-info → biofiles-0.0.11.dist-info}/LICENSE +0 -0
- {biofiles-0.0.10.dist-info → biofiles-0.0.11.dist-info}/WHEEL +0 -0
- {biofiles-0.0.10.dist-info → biofiles-0.0.11.dist-info}/top_level.txt +0 -0
biofiles/fai.py
ADDED
@@ -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)
|
biofiles/types/sequence.py
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.2
|
2
2
|
Name: biofiles
|
3
|
-
Version: 0.0.
|
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>
|
@@ -1,6 +1,7 @@
|
|
1
1
|
biofiles/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
2
2
|
biofiles/bam.py,sha256=w32LLOAuKWdGF7joTSrB4HYXCdfvvijZW44jizG36R8,6771
|
3
3
|
biofiles/common.py,sha256=Yi0i85FpD2wR3vqL645LTUAE6TybGDxxZQsUmEGHqu4,1126
|
4
|
+
biofiles/fai.py,sha256=gG2oDmaU7PIIYYBc8LiudaeKdo-6WIdwsMDIM7qi098,678
|
4
5
|
biofiles/fasta.py,sha256=ctIt5I_fcZx-xQN921zpmlZS7e9_ICf-3_i6mTs5qbs,2135
|
5
6
|
biofiles/gff.py,sha256=b3apOmJNoiy_qQHtyUSnNh0s999B6gyAODyjI7fN15g,6246
|
6
7
|
biofiles/gtf.py,sha256=h_eFKnYWb8GQp-CX9EPZRodUba-bzQLGidGHOPUo4iM,2366
|
@@ -9,12 +10,12 @@ biofiles/types/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
9
10
|
biofiles/types/alignment.py,sha256=5UvwKJ2psIpkkU5efGRHe8gYhMIoW35-RZ_Zoe5YDrY,1612
|
10
11
|
biofiles/types/feature.py,sha256=3Ar45WRgiaDSh5iQt24Emtk6_57G01q5nHJ1GNIJ19Y,1190
|
11
12
|
biofiles/types/repeat.py,sha256=63SqzAwEGIDIGP9pxC85RUdwXbbSm0S5WNL3lSiWlmc,641
|
12
|
-
biofiles/types/sequence.py,sha256=
|
13
|
+
biofiles/types/sequence.py,sha256=XeJ3wgi8AwRaVYVKmf41y5mOmWQfdsS8ysaRLZWbNoQ,254
|
13
14
|
biofiles/utility/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
14
15
|
biofiles/utility/cli.py,sha256=bkUzmT5R4qdJ0YtA4LNU5JYpimD1HmZlHtoSaKzDsUc,4032
|
15
16
|
biofiles/utility/feature.py,sha256=tUTn16xV1e0qpgkZ1ZwQ4LJJGil5mgQJBJ9s1yFDgiI,8068
|
16
|
-
biofiles-0.0.
|
17
|
-
biofiles-0.0.
|
18
|
-
biofiles-0.0.
|
19
|
-
biofiles-0.0.
|
20
|
-
biofiles-0.0.
|
17
|
+
biofiles-0.0.11.dist-info/LICENSE,sha256=CbR8ssdFyViKj25JAlMjIt1_FbiZ1tAC5t-uwUbxqak,1070
|
18
|
+
biofiles-0.0.11.dist-info/METADATA,sha256=LLFvSGArV0Iuse_720ylHhMBLhMB6HKVfZXYjdkNrEg,3034
|
19
|
+
biofiles-0.0.11.dist-info/WHEEL,sha256=52BFRY2Up02UkjOa29eZOS2VxUrpPORXg1pkohGGUS8,91
|
20
|
+
biofiles-0.0.11.dist-info/top_level.txt,sha256=laFaFv8hpkI4U-Pgs0yBaAJXN2_CJKl7jb-m3-tGfSc,9
|
21
|
+
biofiles-0.0.11.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|