pybiolib 1.2.980__py3-none-any.whl → 1.2.983__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.
- biolib/_internal/utils/multinode.py +6 -9
- {pybiolib-1.2.980.dist-info → pybiolib-1.2.983.dist-info}/METADATA +1 -1
- {pybiolib-1.2.980.dist-info → pybiolib-1.2.983.dist-info}/RECORD +6 -6
- {pybiolib-1.2.980.dist-info → pybiolib-1.2.983.dist-info}/LICENSE +0 -0
- {pybiolib-1.2.980.dist-info → pybiolib-1.2.983.dist-info}/WHEEL +0 -0
- {pybiolib-1.2.980.dist-info → pybiolib-1.2.983.dist-info}/entry_points.txt +0 -0
@@ -86,25 +86,22 @@ def fasta_batch_records(records, work_per_batch_min, work_per_residue=1, verbose
|
|
86
86
|
|
87
87
|
batches = []
|
88
88
|
batch = []
|
89
|
-
|
90
|
-
total_work_units = 0
|
89
|
+
current_longest_seq_len = 0
|
91
90
|
for record in records:
|
92
91
|
# Add to batch
|
93
92
|
batch.append(record)
|
94
93
|
|
95
|
-
|
96
|
-
|
97
|
-
sequence_work_units = len(seq) * work_per_residue
|
94
|
+
seq_len = len(record.sequence)
|
95
|
+
current_longest_seq_len = max(current_longest_seq_len, seq_len)
|
98
96
|
|
99
|
-
#
|
100
|
-
current_work_units
|
101
|
-
total_work_units += sequence_work_units
|
97
|
+
# Calculate work units based on longest sequence * number of sequences
|
98
|
+
current_work_units = current_longest_seq_len * work_per_residue * len(batch)
|
102
99
|
|
103
100
|
# If above limit, start a new batch
|
104
101
|
if current_work_units >= work_per_batch_min:
|
105
102
|
batches.append(batch)
|
106
103
|
batch = []
|
107
|
-
|
104
|
+
current_longest_seq_len = 0
|
108
105
|
|
109
106
|
# Append last batch if present
|
110
107
|
if batch:
|
@@ -51,7 +51,7 @@ biolib/_internal/types/result.py,sha256=MesSTBXCkaw8HydXgHf1OKGVLzsxhZ1KV5z4w-VI
|
|
51
51
|
biolib/_internal/types/typing.py,sha256=qrsk8hHcGEbDpU1QQFzHAKnhQxkMe7uJ6pxHeAnfv1Y,414
|
52
52
|
biolib/_internal/types/user.py,sha256=5_hYG0jrdGxynCCWXGaHZCAlVcRKBqMIEA2EBGrnpiE,439
|
53
53
|
biolib/_internal/utils/__init__.py,sha256=p5vsIFyu-zYqBgdSMfwW9NC_jk7rXvvCbV4Bzd3As7c,630
|
54
|
-
biolib/_internal/utils/multinode.py,sha256
|
54
|
+
biolib/_internal/utils/multinode.py,sha256=bFj7ucQB0MgGrgtnCbFFcanwdtdBGupJIZB9sFi2Ts8,8244
|
55
55
|
biolib/_runtime/runtime.py,sha256=Z9YVF8e2A1VMdndEf7CIGqvVKHS7FPY0VGmRgLBB7ck,5699
|
56
56
|
biolib/_session/session.py,sha256=US1Y1jfFIAm86-Lq3C7nCXpZXUJXXBVBkND9djMNYxI,1649
|
57
57
|
biolib/api/__init__.py,sha256=mQ4u8FijqyLzjYMezMUUbbBGNB3iFmkNdjXnWPZ7Jlw,138
|
@@ -146,8 +146,8 @@ biolib/utils/cache_state.py,sha256=u256F37QSRIVwqKlbnCyzAX4EMI-kl6Dwu6qwj-Qmag,3
|
|
146
146
|
biolib/utils/multipart_uploader.py,sha256=XvGP1I8tQuKhAH-QugPRoEsCi9qvbRk-DVBs5PNwwJo,8452
|
147
147
|
biolib/utils/seq_util.py,sha256=Ozk0blGtPur_D9MwShD02r_mphyQmgZkx-lOHOwnlIM,6730
|
148
148
|
biolib/utils/zip/remote_zip.py,sha256=0wErYlxir5921agfFeV1xVjf29l9VNgGQvNlWOlj2Yc,23232
|
149
|
-
pybiolib-1.2.
|
150
|
-
pybiolib-1.2.
|
151
|
-
pybiolib-1.2.
|
152
|
-
pybiolib-1.2.
|
153
|
-
pybiolib-1.2.
|
149
|
+
pybiolib-1.2.983.dist-info/LICENSE,sha256=F2h7gf8i0agDIeWoBPXDMYScvQOz02pAWkKhTGOHaaw,1067
|
150
|
+
pybiolib-1.2.983.dist-info/METADATA,sha256=dHtGcD9XEEKaOlFU18U9VLeynB9gYqsBuSle-Q7jKcg,1570
|
151
|
+
pybiolib-1.2.983.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
152
|
+
pybiolib-1.2.983.dist-info/entry_points.txt,sha256=p6DyaP_2kctxegTX23WBznnrDi4mz6gx04O5uKtRDXg,42
|
153
|
+
pybiolib-1.2.983.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|