<p>There is an R code example on <a href="https://rest.ensembl.org/documentation/info/vep_region_post" rel="nofollow noreferrer">Ensembl's website</a> on how to execute a POST &quot;vep/:species/region&quot; request for variants that only have one alternate allele. The part that holds the variant data in the POST request is structured as follows:</p>
<pre><code>..., body = '{ &quot;variants&quot; : [&quot;21  26960070  rs116645811 G A . . .&quot;, &quot;21  26965148  rs1135638 G A . . .&quot; ] }'...
</code></pre>
<p>Where, for the first variant, 21 is the chromosome number, 26960070 is the start point coordinate on the chromosome, rs116645811 is the variant identifier, &quot;G&quot; is the reference allele and &quot;A&quot; is the alternate allele.</p>
<p>Alternatively, you can substitute the variant identifiers - rs116645811 and rs1135638, in the example above - for the endpoint coordinate of the variant. I use this option myself and can personally confirm that it works.</p>
<p>As mentioned before, the example above shows a POST request of variants that have only single alternate alleles.
<em>Does anybody, on the other hand, know how (one should adjust the structure in the example above) to execute a POST request that accommodates multiple alternate alleles for a single variant?</em></p>
<p>If you explain your answer with an example like the one above, please use an example with the endpoint coordinate (and not the variant ID).</p>
<p>Thanks!</p>

CC BY-SA 4.0
2023-10-28T21:11:52.173Z
Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking.
Community
CC BY-SA 4.0
2023-11-02T00:04:17.643Z
Thanks for your question. The question has received a "closed" request. The site convention is for the OP to present an example for others - to  help them answer - here you as OP are  requesting the person answering to present the answer. This is can lead to misunderstandings about what is required. There are some very skilled R coders on the site who could probably answer this.
M__
<r><ensembl><variants><vep>
How to make a POST "vep/:species/region" request that is able to accomodate multiple alternate alleles for a single variant?
# How to make a POST "vep/:species/region" request that is able to accomodate multiple alternate alleles for a single variant?

(Asked by: username_0 on 2023-10-28)

There is an R code example on Ensembl's website on how to execute a POST "vep/:species/region" request for variants that only have one alternate allele. The part that holds the variant data in the POST request is structured as follows:
..., body = '{ "variants" : ["21  26960070  rs116645811 G A . . .", "21  26965148  rs1135638 G A . . ." ] }'...

Where, for the first variant, 21 is the chromosome number, 26960070 is the start point coordinate on the chromosome, rs116645811 is the variant identifier, "G" is the reference allele and "A" is the alternate allele.
Alternatively, you can substitute the variant identifiers - rs116645811 and rs1135638, in the example above - for the endpoint coordinate of the variant. I use this option myself and can personally confirm that it works.
As mentioned before, the example above shows a POST request of variants that have only single alternate alleles.
Does anybody, on the other hand, know how (one should adjust the structure in the example above) to execute a POST request that accommodates multiple alternate alleles for a single variant?
If you explain your answer with an example like the one above, please use an example with the endpoint coordinate (and not the variant ID).
Thanks!

**Tags:** r, ensembl, variants, vep
> **Comments:**
> **username_1**: Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking.  
> **username_2**: Thanks for your question. The question has received a "closed" request. The site convention is for the OP to present an example for others - to  help them answer - here you as OP are  requesting the person answering to present the answer. This is can lead to misunderstandings about what is required. There are some very skilled R coders on the site who could probably answer this.  

---

## 0 answers

