Created
April 8, 2016 00:57
-
-
Save mdshw5/c562118a084c581c836078ea7ff92252 to your computer and use it in GitHub Desktop.
biostars 183260
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
from pyfaidx import FastaVariant | |
with FastaVariant('genome.fasta', 'tabix_indexed_variants.vcf.gz', het=True, hom=True) as consensus: | |
for chromosome in consensus: | |
for site in chromosome.variant_sites: | |
flanking = chromosome[site-2:site+1] | |
## do something with flanking sequence | |
print(flanking.seq) ## ATG |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment