File tree 2 files changed +8
-0
lines changed
2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change 10
10
import os
11
11
import sys
12
12
import shutil
13
+ import brisera
13
14
import tempfile
14
15
15
16
from brisera .convert import FastaChunker
48
49
shutil .rmtree (tempdir )
49
50
50
51
assert not os .path .exists (tempdir )
52
+
53
+ print "Processed %i sequences into %i chunks" % (chunker .sequences , chunker .chunks )
54
+ print "Minimum sequence length: %i" % chunker .min_sequence_len
55
+ print "Maximum sequence length: %i" % chunker .max_sequence_len
56
+ print "Saved as Brisera version %s sequence format" % brisera .__version__
Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ def __init__(self, path):
14
14
self .min_sequence_len = None
15
15
self .max_sequence_len = None
16
16
self .sequences = 0
17
+ self .chunks = 0
17
18
18
19
def chunk (self , sequence ):
19
20
"""
@@ -45,6 +46,7 @@ def chunk(self, sequence):
45
46
end = min (offset + settings .max_chunk , length )
46
47
47
48
chunk = sequence [offset :end ]
49
+ self .chunks += 1
48
50
yield (chunk , offset , end == length )
49
51
50
52
if end == length :
You can’t perform that action at this time.
0 commit comments