Created
May 3, 2012 17:06
-
-
Save indapa/2587299 to your computer and use it in GitHub Desktop.
Python generators and itertools.izip
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
"""http://docs.python.org/library/itertools.html#itertools.izip""" | |
#thanks Brent Pedersen | |
vcf_gen1=vcfobj1.yieldVcfRecordwithGenotypes(vcfh1) | |
vcf_gen2=vcfobj1.yieldVcfRecordwithGenotypes(vcfh2) | |
for vrec1, vrec2 in itertools.izip(vcf_gen1, vcf_gen2): | |
print vrec1.toStringwithGenotypes() | |
print vrec2.toStringwithGenotypes() |
brentp
commented
May 4, 2012
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment