Add multiple annotations from file

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

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