<div dir="ltr">Hi Konrad,<div><br></div><div>Correct, these attributes are not found on the transcripts in the VEP cache.</div><div><br></div><div>The transcript objects are stripped down to a "need to know" state, such that only the attributes required for calculating the consequences (and a few key properties such as biotype) remain.</div>
<div><br></div><div>Some things are cached on the transcript under the catchily named:</div><div><br></div><div>$tr->{_variation_effect_feature_cache}</div><div><br></div><div>There are further details here:</div><div>
<br></div><div><a href="http://www.ensembl.org/info/docs/tools/vep/script/vep_cache.html#technical">http://www.ensembl.org/info/docs/tools/vep/script/vep_cache.html#technical</a><br></div><div><br></div><div>I can look at adding in those particular attributes for the next VEP release.</div>
<div><br></div><div>I'm assuming you're writing a plugin or similar? In the meantime, you could trick the transcript into loading them from the database (assuming you're not using --offline) with something like the code below.</div>
<div><br></div><div>Hope that helps</div><div><br></div><div>Will McLaren</div><div>Ensembl Variation</div><div><br></div><div>my $tr = $tva->transcript();</div><div><br></div><div># delete existing cache</div><div>delete $tr->{attributes};</div>
<div><br></div><div># copy adaptor from config</div><div>$tr->{adaptor} = $self->{config}->{ta};<br></div><div><br></div><div># get attributes from DB</div><div>my @attributes = @{$tr->get_all_Attributes()};</div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On 12 May 2014 21:22, Konrad Karczewski <span dir="ltr"><<a href="mailto:konradk@broadinstitute.org" target="_blank">konradk@broadinstitute.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hello!<div><br></div><div>Thanks! This has helped quite a bit, though at an understandable cost of performance.</div>
<div><br></div><div>In particular, the attributes do not seem to be in the VEP cache - are there any plans to add these? It seems like they shouldn't take up too much space on the scheme of things.</div><span class="HOEnZb"><font color="#888888">
<div><br></div></font></span><div><span class="HOEnZb"><font color="#888888">-Konrad</font></span><div><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Apr 28, 2014 at 8:27 AM, mag <span dir="ltr"><<a href="mailto:mr6@ebi.ac.uk" target="_blank">mr6@ebi.ac.uk</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF" text="#000000">
    Hi Konrad,<br>
    <br>
    The transcript object supports a method called 'transleatable_seq'.<br>
    This will return the translateable part of a transcript.<br>
    You can then apply the length method on the returned string.<br>
    <br>
    The CDS incomplete status is only available for manually annotated
    genes (coming from Havana).<br>
    They know there is a protein-coding transcript, but the evidence
    available does not allow for full annotation of the sequence.<br>
    These transcripts are flagged with the attribute 'cds_start_NF' or
    'cds_end_NF'<br>
    You can retrieve this for each transcript using
    $transcript->get_all_Attributes('cds_start_NF')<br>
    or retrieve all the transcripts for a given attribute using
    $attribute_adaptor->fetch_all_by_Transcript(undef,
    'cds_start_NF')<br>
    <br>
    <br>
    Hope that helps,<br>
    Magali<div><div><br>
    <br>
    <div>On 24/04/2014 21:47, Konrad Karczewski
      wrote:<br>
    </div>
    </div></div><blockquote type="cite"><div><div>
      
      Hello!
      <div><br>
      </div>
      <div>I've been using the API to get the length of the coding
        portion of a transcript and I think I figured out the best way
        is:</div>
      <div><br>
      </div>
      <div>my $transcript_cds_length =
        $transcript_variation->transcript->cdna_coding_end -
        $transcript_variation->transcript->cdna_coding_start + 1;</div>
      <div><br>
      </div>
      <div>However, for some transcripts, this number is not a multiple
        of 3 (though it is approximately correct - within 2 bp of the
        number of AA's of the transcript * 3). It seems to happen when
        there is a "CDS Incomplete" status on the transcript (e.g. <a href="http://www.ensembl.org/Homo_sapiens/Transcript/Summary?g=ENSG00000162458;r=1:16084441-16091522;t=ENST00000510929" target="_blank">http://www.ensembl.org/Homo_sapiens/Transcript/Summary?g=ENSG00000162458;r=1:16084441-16091522;t=ENST00000510929</a>).
        I would have thought if the CDS were incomplete then
        "cdna_coding_end" or "cdna_coding_start" would be undefined - is
        there another way to get the CDS Incomplete status?</div>
      <div><br>
      </div>
      <div>And side note, is this the best way to get transcript length?
        I couldn't seem to find a direct reference to the length.<br>
        <div><br>
        </div>
        <div>
          <div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
            <div style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">

Thanks!<br>
              -Konrad</div>
          </div>
        </div>
        <br>
      </div>
      <br>
      <fieldset></fieldset>
      <br>
      </div></div><pre>_______________________________________________
Dev mailing list    <a href="mailto:Dev@ensembl.org" target="_blank">Dev@ensembl.org</a>
Posting guidelines and subscribe/unsubscribe info: <a href="http://lists.ensembl.org/mailman/listinfo/dev" target="_blank">http://lists.ensembl.org/mailman/listinfo/dev</a>
Ensembl Blog: <a href="http://www.ensembl.info/" target="_blank">http://www.ensembl.info/</a>
</pre>
    </blockquote>
    <br>
  </div>

<br>_______________________________________________<br>
Dev mailing list    <a href="mailto:Dev@ensembl.org" target="_blank">Dev@ensembl.org</a><br>
Posting guidelines and subscribe/unsubscribe info: <a href="http://lists.ensembl.org/mailman/listinfo/dev" target="_blank">http://lists.ensembl.org/mailman/listinfo/dev</a><br>
Ensembl Blog: <a href="http://www.ensembl.info/" target="_blank">http://www.ensembl.info/</a><br>
<br></blockquote></div><br></div></div></div></div></div>
<br>_______________________________________________<br>
Dev mailing list    <a href="mailto:Dev@ensembl.org">Dev@ensembl.org</a><br>
Posting guidelines and subscribe/unsubscribe info: <a href="http://lists.ensembl.org/mailman/listinfo/dev" target="_blank">http://lists.ensembl.org/mailman/listinfo/dev</a><br>
Ensembl Blog: <a href="http://www.ensembl.info/" target="_blank">http://www.ensembl.info/</a><br>
<br></blockquote></div><br></div>