Created
February 21, 2014 16:45
-
-
Save meren/9137920 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import Oligotyping.lib.fastalib as u | |
fasta = u.SequenceSource(sys.argv[1]) | |
output = u.FastaOutput(sys.argv[2]) | |
while fasta.next(): | |
if fasta.pos % 10000 == 0: | |
sys.stdout.write('\rreads processed so far: %d' % (fasta.pos)) | |
sys.stdout.flush() | |
output.write_id(fasta.id) | |
output.write_seq(fasta.seq.replace('-', ''), split = False) | |
fasta.close() | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment