# Add multiple annotations from file

**URL:** <https://discuss.hail.is/t/add-multiple-annotations-from-file/151>\
**Category:** Help \[0.1\]\
**Created:** [March 5, 2017, 5:34am UTC](https://discuss.hail.is/t/add-multiple-annotations-from-file/151 "2017-03-05T05:34:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![bkenna](https://avatars.discourse-cdn.com/v4/letter/b/82dd89/32.png) [@bkenna](https://discuss.hail.is/u/bkenna)\
**Post date:** [March 5, 2017, 5:34am UTC](https://discuss.hail.is/t/add-multiple-annotations-from-file/151/1 "2017-03-05T05:34:04Z")

</div>

Hi,

I’m new to hail. Checked on the forum and the documentation and couldn’t find anything about this.

Is there a way to add multiple annotations from a text file? Below is just an attempt from what I saw in the documentation. Tried the annotate\_variants\_bed as well and could not get it work.

# add geneName \<- Works Fine

vds = vds.annotate\_variants\_intervals(’/home/user/ensembl\_geneName\_geneID\_annotations.txt’, ‘va.gene’)

# add geneName and geneID \<- Does not work

vds = vds.annotate\_variants\_intervals(’/home/bren/ensembl\_geneName\_geneID\_annotations.txt’, ‘va.gene.geneName, va.gene.geneID’)  
vds = vds.annotate\_variants\_intervals(’/home/user/ensembl\_geneName\_geneID\_annotations.txt’, ‘va.gene.geneName’ ‘va.gene.geneID’)

"  
Attempt 1:  
hail.java.FatalError: `.' expected but`,’ found

Attempt2:  
hail.java.FatalError: /home/bren/ensembl\_geneName\_geneID\_annotations.txt:1: unsupported interval list format  
offending line: 1 11869 14412 + DDX11L1 ENSG00000223972

"

Thanks,  
Brendan

---

<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:** [March 5, 2017, 5:43am UTC](https://discuss.hail.is/t/add-multiple-annotations-from-file/151/2 "2017-03-05T05:43:25Z")

</div>

Hi Brendan,  
This is a known limitation of our `annotate_variants_intervals` method. We’re planning to rework this method in the next few weeks, to support exactly this use case. Stay tuned!

For now, you need to split the file into one new file per annotation column.  
`cut -f1-5 file > gene_name.txt`  
`cut -f1-4,6 file > gene_id.txt`
