Annotating data with the gnomAD variant ID

We were trying to add the gnomAD ID to our data annotated with gnomAD and were previously provided with an option to generate it via the API.
Since the gnomAD ID is essentially the chr no.-position-ref allele-variant allele( eg. 1-55051215-G-GA) and the information for these columns are present in the vcf file, will it be okay to generate it directly?

We saw that, in some cases the gnomAD ID is not getting generated from the API. Hence we were wondering if there is any specific reason behind using the API or if we can manually generate them.

Hi @anoksha ,

You should be able to generate the ID using your logic above. The code we use to create it is here which is essentially the same – we just strip the “chr” from loci and set the MT contig to M.

Are you able to provide a example variant where the API is not generating the ID? I can bring this to our browser team.


Thank you Mike, for your speedy response.
We have gone through the above code shared by you and had a query regarding the ‘max_length’ parameter. We wanted to understand what is the value set for ‘max_length’ using which long strings are truncated?

Regarding the API, there seems to be some error on our end due to which some of the gnomAD variant ID’s did not get generated. We will re-run the API and bring to your notice if any errors are discovered.