I want to add gene names (stored in mt from an imported GTF file as locus interval) to an imported mt from VCF. I annotate by the conditional that the locus is contained in the locus interval:
mt_vcf= mt_vcf.annotate_rows(gencode= hl.cond(gencode_genes_mt.interval.contains(mt_vcf.locus), gencode_genes_mt.gene_name))
And get the following error. What is the best way to do so?
ExpressionException: Cannot combine expressions from different source objects. Found fields from 2 objects: <hail.matrixtable.MatrixTable object at 0x7fa1c03254a8>: ['interval'] <hail.matrixtable.MatrixTable object at 0x7fa1c00a3160>: ['locus']