Commit cacffd1b authored by Christian Meesters's avatar Christian Meesters

fix: now zero instead of white space padding

parent c2b944d4
#!/usr/bin/env python
# dummy line to introduce a line break
import pip
# will take little time, if dependency is already satisfied
pip.main(['install', 'biopython'])
from Bio import SeqIO
import sys
import os
......@@ -22,7 +17,7 @@ batch = list()
for pos, entry in enumerate(record_iter):
if pos == 0:
group += 1
filename = 'group_%5d.fasta' % group
filename = 'group_%05d.fasta' % group
handle = open(os.path.join('scratch', filename), 'w')
if (pos % nlines == 0 and pos != 0):
count = SeqIO.write(batch, handle, 'fasta')
......@@ -30,7 +25,7 @@ for pos, entry in enumerate(record_iter):
handle.close()
batch = list()
group += 1
filename = 'group_%s.fasta' % group
filename = 'group_%05d.fasta' % group
handle = open(os.path.join('scratch', filename), 'w')
batch.append(entry)
# take care of the rest
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment