I'm trying to create sliding windows of a vcf file using Egglib Egglib's slider method for VcfParser class. My code and the error looks like this:
import egglib
vcf = egglib.io.VcfParser("20000.vcf")
for ret in vcf:
print ret #Check if the file was loaded. Everything is OK up to here.
#Make windows of ten bp
for window in vcf.slider(10,10):
for ret in window:
print ret
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: slider() takes at least 4 arguments (3 given)
#I tried the same providing all the parameters as described in link above to no avail
for window in vcf.slider(10,10,stop=None, size_as_sites=False, step_as_sites=False, max_missing=0, fill=False, first_sample=0, last_sample=None, flat=False):
for ret in window:
print ret
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: slider() got an unexpected keyword argument 'size_as_sites'
It looks like I'm accidentally calling the homonym method for Align, but I'm not an expert with this library. Am I missing something here? Is this a bug?
Thanks for your suggestion. I've contacted the people maintaining the program and they told me there's likely a bug involved. I'll update the question when a solution is ready.