Using Hail 0.1 import_vcf error

Note:
I was using Hail0.2 and the following script works:
import hail as hl
hl.import_vcf(’/tmp/resources/sample.vcf’).write(’/tmp/output/sample.vds’)

But I switch to 0.1 because we are using SEQR and using some pipelines.
When I run the same script:
I get:
hl.import_vcf(’/tmp/resources/sample.vcf’).write(’/tmp/output/sample.vds’)
AttributeError: ‘module’ object has no attribute ‘import_vcf’

is that function in 0.1?
Do you have additional examples for 0.1?
Thanks,

Indeed, 0.1 and 0.2 have very different interfaces so be sure to see the corresponding documentation. In 0.1, import is done using the HailContext:
https://hail.is/docs/stable/hail.HailContext.html#hail.HailContext.import_vcf

In 0.2, there is no explicit HailContext. You can get a sense of the differences from the overviews and tutorials, which contain many examples. As stated on the homepage, we recommend users move to 0.2 even though it’s still in beta.

1 Like

Thanks a lot. I am using 0.1 for compatibility reasons. Now everything is working