Created
August 17, 2015 22:54
-
-
Save mdshw5/de9db76467ad88c4ae49 to your computer and use it in GitHub Desktop.
Biostars 154785
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 random | |
import sys | |
from pyfaidx import Fasta | |
n = 10 | |
faa = Fasta("file.faa") | |
for sample in random.sample(faa, n): | |
print(sample.name) | |
for line in sample: | |
print(line) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment