The coordinates for a deletion reflect the bases of the reference deleted:<br><font class="Apple-style-span" face="'courier new', monospace"><br>1 2 3 4 5<br>A A C T G</font><br><br>A deletion of bases 2, 3 and 4 would have start = 2, end = 4 and an allele_string of ACT/- (this is the same even for the negative strand).<br>
<br>Generally in Ensembl if a feature spans some region of DNA, start is always less than or equal to end (it is equal to end for features of length 1, such as SNPs).<br><br>Start is only greater than end for insertions, since they occur _between_ bases of the reference sequence.<div>
<br></div><div>Cheers<br><br>Will<br><br>On 14 December 2010 15:10, Sung Gong <sung@bio.cc> wrote:<br>> Start 1 smaller than end for a deletion?<br>><br>><br>> On 14 December 2010 15:03, Will McLaren <<a href="mailto:wm2@ebi.ac.uk">wm2@ebi.ac.uk</a>> wrote:<br>
>> Hi Sung,<br>>><br>>> The coordinates would be the same regardless of the strand.<br>>><br>>> Start is _always_ 1 greater than end for an insertion, regardless of<br>>> strand or the size of the insertion.<br>
>><br>>> Will<br>>><br>>> On 14 December 2010 14:58, Sung Gong <sung@bio.cc> wrote:<br>>>> Hi Will,<br>>>><br>>>> One more question about start/end positions in case of indels.<br>
>>><br>>>> In the API document<br>>>> (<a href="http://www.ensembl.org/info/docs/Pdoc/ensembl-variation/modules/Bio/EnsEMBL/Variation/VariationFeature.html">http://www.ensembl.org/info/docs/Pdoc/ensembl-variation/modules/Bio/EnsEMBL/Variation/VariationFeature.html</a>),<br>
>>> it says:<br>>>>    # Variation feature representing a 2bp insertion<br>>>>    $vf = Bio::EnsEMBL::Variation::VariationFeature->new<br>>>>       (-start   => 1522,<br>>>>        -end     => 1521, # end = start-1 for insert<br>
>>>        -strand  => -1,<br>>>>        -slice   => $slice,<br>>>>        -allele_string => '-/AA',<br>>>>        -variation_name => 'rs12111',<br>>>>        -map_weight  => 1,<br>
>>>        -variation => $v2);<br>>>><br>>>> The example above is only for -1 strand?<br>>>> How can I generalise to set -start and -end?<br>>>><br>>>> Cheers,<br>>>> Sung<br>
>>><br>>>> On 10 December 2010 11:41, Will McLaren <<a href="mailto:wm2@ebi.ac.uk">wm2@ebi.ac.uk</a>> wrote:<br>>>>> Hi Sung<br>>>>><br>>>>> The codons() method will work; it returns the codon something like:<br>
>>>><br>>>>> aGa/aCa<br>>>>><br>>>>> where the base changed is in capital letters.<br>>>>><br>>>>> Will<br>>>>><br>>>>> On 10 December 2010 11:26, Sung Gong <sung@bio.cc> wrote:<br>
>>>>> Hi Will,<br>>>>>><br>>>>>> Thanks for the paper. I appreciate your work.<br>>>>>><br>>>>>> Before aware of your script, I used to get the corresponding codon and<br>
>>>>> the position (0, 1 or 2) where a single DNA variant occur using the<br>>>>>> core API.<br>>>>>> Any work-around for this?<br>>>>>><br>>>>>> I found a 'codons' method from 'TranscriptVariation', but it is a<br>
>>>>> method of ConsequenceType?<br>>>>>><br>>>>>> Thought better to ask you before going further.<br>>>>>><br>>>>>> Cheers,<br>>>>>> Sung<br>
>>>>><br>>>>>> On 9 December 2010 14:02, Will McLaren <<a href="mailto:wm2@ebi.ac.uk">wm2@ebi.ac.uk</a>> wrote:<br>>>>>>> Hi Sung,<br>>>>>>><br>>>>>>> There is a publication referring to the system, but it does not go<br>
>>>>>> into great detail on the internal workings:<br>>>>>>><br>>>>>>> <a href="http://bioinformatics.oxfordjournals.org/content/26/16/2069.abstract">http://bioinformatics.oxfordjournals.org/content/26/16/2069.abstract</a><br>
>>>>>><br>>>>>>> Here's an approximate flow of what happens in the API. The vast<br>>>>>>> majority of the code used is in the Core module<br>>>>>>> Bio::EnsEMBL::Utils::TranscriptAlleles.pm, mainly the methods<br>
>>>>>> type_variation() and apply_aa_change():<br>>>>>>><br>>>>>>> - find overlapping transcripts (using $vf->feature_Slice and<br>>>>>>> $slice->get_all_Transcripts), then for each transcript:<br>
>>>>>><br>>>>>>> - get transcript mapper and map variation's coordinates to cDNA, CDS and peptide<br>>>>>>><br>>>>>>> - any variants that don't fall in the coding sequence are classified<br>
>>>>>> here (e.g. INTRONIC, UPSTREAM) and the flow ends<br>>>>>>><br>>>>>>> - if variation falls in exon (i.e. has defined CDS coordinates),<br>>>>>>> generate alternative codon(s) and resulting translation<br>
>>>>>><br>>>>>>> - compare translation to reference; classify as e.g.<br>>>>>>> SYNONYMOUS_CODING, NON_SYNONYMOUS_CODING<br>>>>>>><br>>>>>>> We are currently working on an overhaul to this system which should<br>
>>>>>> make it easier to comprehend by following the code.<br>>>>>>><br>>>>>>> I would recommend trying to follow through the code in Perl's<br>>>>>>> debugger, using the "perl -d" option.<br>
>>>>>><br>>>>>>> Hope this helps<br>>>>>>><br>>>>>>> Will McLaren<br>>>>>>> Ensembl Variation<br>>>>>>><br>>>>>>> On 9 December 2010 13:19, Sung Gong <sung@bio.cc> wrote:<br>
>>>>>>> Hi,<br>>>>>>>><br>>>>>>>> I was thrilled to find that Ensembl API provides a nice script<br>>>>>>>> (<a href="ftp://ftp.ensembl.org/pub/misc-scripts/">ftp://ftp.ensembl.org/pub/misc-scripts/</a>) which can predict the<br>
>>>>>>> consequence types of novel variations.<br>>>>>>>> Also, good to see a good demonstration how to use the API for that purpose:<br>>>>>>>> <a href="http://www.ensembl.org/info/docs/api/variation/variation_tutorial.html">http://www.ensembl.org/info/docs/api/variation/variation_tutorial.html</a><br>
>>>>>>><br>>>>>>>> Before realising the variation API can help predicting consequence<br>>>>>>>> type of novel variants, I used to use only core API to map the<br>
>>>>>>> position of my variants to see whether they are within coding region,<br>>>>>>>> intron, exon and so on.<br>>>>>>>> Now, I wondered how the variation API works for that purpose - looked<br>
>>>>>>> at the source code, but found it is somewhat overwhelming.<br>>>>>>>><br>>>>>>>> Can anybody explain how the novel prediction works internally under the hood?<br>
>>>>>>><br>>>>>>>> Cheers,<br>>>>>>>> Sung<br>>>>>>>><br>>>>>>>> _______________________________________________<br>
>>>>>>> Dev mailing list<br>>>>>>>> <a href="mailto:Dev@ensembl.org">Dev@ensembl.org</a><br>>>>>>>> <a href="http://lists.ensembl.org/mailman/listinfo/dev">http://lists.ensembl.org/mailman/listinfo/dev</a><br>
>>>>>>><br>>>>>>><br>>>>>><br>>>>><br>>>><br>>><br>><br><br></div>