[[annotation]]
file="ExAC.r0.3.sites.vep.tidy.vcf.gz"
fields = ["AC_Adj", "AN_Adj", "AC_AFR", "AN_AFR", "AC_AMR", "AN_AMR", "AC_EAS", "AN_EAS", "AC_FIN", "AN_FIN", "AC_NFE", "AN_NFE", "AC_OTH", "AN_OTH", "AC_SAS", "AN_SAS", 
          "AC_Het", "AC_Hom"]
names = ["ac_exac_all", "an_exac_all", "ac_adj_exac_afr", "an_adj_exac_afr", "ac_adj_exac_amr", "an_adj_exac_amr", "ac_adj_exac_eas", "an_adj_exac_eas", "ac_adj_exac_fin", "an_adj_exac_fin", "ac_adj_exac_nfe", "an_adj_exac_nfe", "ac_adj_exac_oth", "an_adj_exac_oth", "ac_adj_exac_sas", "an_adj_exac_sas",
          "num_exac_Het", "num_exac_Hom"]
ops=["self", "self", "self", "self", "self", "self", "self", "self", "self", "self", "self", "self", "self", "self", "self", "self",
          "self", "self"]

[[annotation]]
file="clinvar_20150305.tidy.vcf.gz"
fields=["CLNSIG", "CLNDBN"]
names=["clinvar_pathogenic", "clinvar_disease_name"]
ops=["self", "self"]

# convert 5 to 'pathogenic', 255 to 'unknown', etc.
[[postannotation]]
fields=["clinvar_pathogenic"]
op="lua:clinvar_sig(clinvar_pathogenic)"
name="clinvar_sig"
type="String"

# calculate allele frequencies for all populations.
[[postannotation]]
fields=["ac_exac_all", "an_exac_all"]
name="af_exac_all"
op="div2"
type="Float"

[[postannotation]]
fields=["ac_adj_exac_afr", "an_adj_exac_afr"]
name="af_adj_exac_afr"
op="div2"
type="Float"

[[postannotation]]
fields=["ac_adj_exac_amr", "an_adj_exac_amr"]
name="af_adj_exac_amr"
op="div2"
type="Float"

[[postannotation]]
fields=["ac_adj_exac_eas", "an_adj_exac_eas"]
name="af_adj_exac_eas"
op="div2"
type="Float"

[[postannotation]]
fields=["ac_adj_exac_fin", "an_adj_exac_fin"]
name="af_adj_exac_fin"
op="div2"
type="Float"

[[postannotation]]
fields=["ac_adj_exac_nfe", "an_adj_exac_nfe"]
name="af_adj_exac_nfe"
op="div2"
type="Float"

[[postannotation]]
fields=["ac_adj_exac_oth", "an_adj_exac_oth"]
name="af_adj_exac_oth"
op="div2"
type="Float"

[[postannotation]]
fields=["ac_adj_exac_sas", "an_adj_exac_sas"]
name="af_adj_exac_sas"
op="div2"
type="Float"


[[postannotation]]
fields=['af_adj_exac_afr', 'af_adj_exac_amr', 'af_adj_exac_eas', 'af_adj_exac_fin', 'af_adj_exac_nfe', 'af_adj_exac_oth', 'af_adj_exac_sas']
op="max"
name="max_aaf_all"
type="Float"

