# Issues with format from import\_vcf for vcf.gz file

**URL:** https://discuss.hail.is/t/issues-with-format-from-import-vcf-for-vcf-gz-file/2297
**Category:** Hail Query & hailctl
**Created:** [October 15, 2021, 7:53pm UTC](https://discuss.hail.is/t/issues-with-format-from-import-vcf-for-vcf-gz-file/2297 "2021-10-15T19:53:52Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![simonlee184](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.hail.is/simonlee184/32/663_2.png) [@simonlee184](https://discuss.hail.is/u/simonlee184)
#### Post date: [October 15, 2021, 7:53pm UTC](https://discuss.hail.is/t/issues-with-format-from-import-vcf-for-vcf-gz-file/2297/1 "2021-10-15T19:53:52Z")

</div>

Hi Hail developers,  
I am a new hail user and was struggling to process my multi-sample vcf file with hail. I first tried to read in my file with the code below and create annotate another column:

**import hail as hl**  
**rt=hl.import\_vcf(‘chr1\_biallelic.vcf.gz’,force\_bgz=True,reference\_genome=“GRCh38”,drop\_samples=True).rows()**  
**rt = rt.annotate(variant=rt.CHROM + ‘:’ + rt.POSITION + “:” + rt.REF + “:” + rt.ALT)**

However, running the third line gives me the following error:  
**AttributeError: Table instance has no field, method, or property 'CHROM’**

Even though the CHROM header is present in my vcf.gz file, it’s not being noticed. Is it because of the metadata headers? Sorry if this is a basic question, I don’t have any other resources to rely on and couldn’t find any solutions online.

---

<div class="post-metadata">

### Author: ![tpoterba](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.hail.is/tpoterba/32/61_2.png) [@tpoterba](https://discuss.hail.is/u/tpoterba)
#### Post date: [October 15, 2021, 7:57pm UTC](https://discuss.hail.is/t/issues-with-format-from-import-vcf-for-vcf-gz-file/2297/2 "2021-10-15T19:57:36Z")

</div>

Take a look at the [import\_vcf docs](https://hail.is/docs/0.2/methods/impex.html#hail.methods.import_vcf) starting with “Row fields” – Hail imports VCF files by converting the CHROM/POSITION fields to a single `locus` object `mt.locus`. You can access the chromosome and position with `mt.locus.contig` and `mt.locus.position` respectively.
