Created
November 20, 2012 15:16
-
-
Save nickloman/4118522 to your computer and use it in GitHub Desktop.
Extract the first X bytes from a FASTA file
This file contains hidden or 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
| from Bio import SeqIO | |
| import sys | |
| rec = SeqIO.parse(open(sys.argv[1]), "fasta").next() | |
| SeqIO.write(rec[0:int(sys.argv[2])], sys.stdout, "fasta") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment