<html><head><style>body{font-family:Helvetica,Arial;font-size:13px}</style></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;">Hi Joey,</div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;"><br></div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;">We’ve recently implemented a utility method get_matched_variant_alleles() [1] you can employ to do just this, and VEP in fact uses this same method to match alleles between pairs of variants potentially with different levels of minimisation etc. I would not recommend using split_variants() or similar as they are intended only for use within the VEP code.</div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;"><br></div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;">Note that this is not a complete solution to the issue; if the variants fall in repetitive sequence, the method will miss these as it does not have the context of the surrounding sequence.</div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;"><br></div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;">[2] and [3] shows how we implement it in a few places in the our code for reference.</div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;"><br></div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;">Hope that helps</div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;"><br></div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;">Will McLaren</div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;">Ensembl Variation</div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;"><br></div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;"><br></div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;">[1] : <a href="http://www.ensembl.org/info/docs/Doxygen/variation-api/classBio_1_1EnsEMBL_1_1Variation_1_1Utils_1_1Sequence.html#a82c641995b21a46e8d9af3af0b329753">http://www.ensembl.org/info/docs/Doxygen/variation-api/classBio_1_1EnsEMBL_1_1Variation_1_1Utils_1_1Sequence.html#a82c641995b21a46e8d9af3af0b329753</a></div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;">[2] : <a href="https://github.com/Ensembl/ensembl-vep/blob/release/90/modules/Bio/EnsEMBL/VEP/AnnotationType/Variation.pm#L125-L186">https://github.com/Ensembl/ensembl-vep/blob/release/90/modules/Bio/EnsEMBL/VEP/AnnotationType/Variation.pm#L125-L186</a></div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;">[3] : <a href="https://github.com/Ensembl/ensembl-vep/blob/release/90/modules/Bio/EnsEMBL/VEP/AnnotationSource/File/VCF.pm#L275-L336">https://github.com/Ensembl/ensembl-vep/blob/release/90/modules/Bio/EnsEMBL/VEP/AnnotationSource/File/VCF.pm#L275-L336</a></div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;"><br></div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;"><br></div><p class="airmail_on">On 18 October 2017 at 8:32:34 pm, Joseph A Prinz (<a href="mailto:joseph.prinz@duke.edu">joseph.prinz@duke.edu</a>) wrote:</p> <blockquote type="cite" class="clean_bq"><span><div><div></div><div>Hi ensembl devs!
<br>
<br>I am writing a plugin for VEP that will process a VCF file using the BaseVepTabixPlugin class.
<br>My goal is to be able to match alleles between the output of VEP and the overlapping portions of the VCF file being processed by the plugin.
<br>
<br>To this end, I have been using the ExAC plugin as a rough guide, and have am using Utils::VEP parse_line to parse the tabix results.
<br>I have noticed that parse_line will not try to minimize variants that are multiallelic (this case is excluded by minimize_variants called by parse_line).
<br>The private method split_variants looks like what I am looking for, but the only public method evoking it is get_all_consequences and this may be cumbersome for a large VCF file.
<br>
<br>What would be the most efficient way to leverage the API to transform alleles of a VCF to be comparable with those being produced by VEP?
<br>Also, would you consider adding split_variants as an optional parameter to parse_line?
<br>
<br>Thank you!
<br>Joey
<br>_______________________________________________
<br>Dev mailing list    Dev@ensembl.org
<br>Posting guidelines and subscribe/unsubscribe info: http://lists.ensembl.org/mailman/listinfo/dev
<br>Ensembl Blog: http://www.ensembl.info/
<br></div></div></span></blockquote></body></html>