This is a test version of Biostars. For the public version, visit https://www.biostars.org.
fuc.pyvcf Attribute Error

Hello, I try to extract GT information from FORMAT field in my .vcf file using fuc.pyvcf submodule. When I try to run my script:

from fuc import pyvcf

import pandas as pd

vf = pyvcf.VcfFrame.from_file('P1_test.vcf')
vf.df

vf.extract_format('GT')

I've got the error:

    Traceback (most recent call last): File "/home/tomasz/Pulpit/burak/vcf_open.py", line 8, in <module> vf.extract_format('GT') AttributeError: 'VcfFrame' object has no attribute 'extract_format'

Any ideas how to solve it? Thanks a lot!

fuc.pyvcf

2 answers

Dear Emilia,

Thank you for your interest in using the fuc package, and sorry for the inconvenience! It appears you are using an older version of fuc. What version of fuc are you using right now? The pyvcf.VcfFrame.extract() method has been renamed to pyvcf.VcfFrame.extract_format() in v0.21.0. fuc is a rapidly evolving tool and it's important for users to use the latest version in order to get the most out of it. Currently, v0.26.0 is the latest version. Please let me know if installing the latest version doesn't solve the problem :)

Yes, after installing the latest version everything is working well. Thank you :)

Log in to answer this question.