This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Ensembl's POST "vep/:species/region": multiple alternate alleles for a single variant in R

I am working with this POST request from Ensembl. Let us suppose, as a starting example, that we have the following variant (in the form of a R code snippet):

{ "variants" : ["21 26960070 26960070 G A . . ."]}.

Please note that this is the required structure of the payload that is assigned to the body (i.e. a parameter of POST) of the aforementioned POST request in R. For clarity, the information within the square brackets mean the chromosome number, starting coordinate variant, ending coordinate variant, reference allele and alternate allele(s), respectively.

Now suppose that I have another variant, but this variant has two alternate alleles, for example: TA and TAAA. How do I adjust the aforementioned structure to accommodate a POST request for a variant that has multiple alternate alleles?

r ensembl post vep

Have you tried doing this (inspired by the link that you shared) - { "variants" : ["21 26960070 26960070 G A . . .", "21 26960070 G C . . ." ] }. POST endpoints are meant for submitting more than one request (from my very limited knowledge).

You can add multiple alternate alleles separated by a ",". Does that work for you?

I marked your account as spammer because your username looks a lot like spammy usernames we see on the forum. I've restored your account but please consider using a more professional or even mainstream username.

1 answer

this is a VCF format, so use comma for multiple ALT alleles:

{ "variants" : ["21 26960070 26960070 G A,T,C . . ."]}.

Thanks for your reply. It works! I have tried your option before, but somehow it did not work. Probably a typo or something.

Log in to answer this question.