Export data after annotation

Hello all @danking @kumarveerapen @tpoterba
I have successfully annotated my vcf with gnomad exome data and I would like to export the data to a csv file and perform downstream analysis. I tried exporting with the command below
gnomad=hl.read_table(annotfile)
mt=mt.annotate_rows(gnomad=gnomad[mt.locus,mt.alleles])
hl.export_gen(mt,’/home/user/hailanalysis/annot.txt’) but each time I get an error message. Please advice Thank you

.gen is a specific format, and has no place to put the gnomad annotations. Can you describe the file you want?

@tpoterba The data I have is a vcf. I load the vcf , and then annotate with gnomad exome data.
So now I want to export the annotated data to csv file.

Hey @jotes,

In general, it’s really useful to include the error message and the hail log file. Those help us better understand your issue.

It sounds like you want a CSV file. CSV files do not usually have genotypes. For genotypes, you’ll want a VCF (take a look at export_vcf). If you just want the row/variant annotations,tTake a look at the Table.export functionality. You’ll want something like:

mt.rows().export(...)