<div dir="ltr">Hi Sabrina,<div><br></div><div>There is indeed a way, though it requires a little knowledge of the internals of the VEP to get it working.</div><div><br></div><div>To retrieve the data off disk is simple enough, but some method calls you can normally make on a transcript object (e.g. translateable_seq() to get the CDS sequence) won't work. Best thing to do is to step in with the perl debugger and explore the contents of the $tr object.</div><div><br></div><div>Here's a script to retrieve the transcripts in a given 1MB region and dump out the CDS sequences as FASTA. You'll need to modify the $config hash to point to your particular directory, and the region specifics will need changing according to which you want to dump.</div><div><br></div><div>Regards</div><div><br></div><div>Will McLaren</div><div>Ensembl Variation</div><div><br></div><div><div><font face="monospace, monospace">###</font></div><div><font face="monospace, monospace">### BEGIN SCRIPT</font></div><div><span style="font-family:monospace,monospace">###</span></div><div><span style="font-family:monospace,monospace">use Bio::EnsEMBL::Variation::Utils::VEP qw(load_dumped_transcript_cache);</span></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace"># config hash defines a few things needed for method to work</font></div><div><font face="monospace, monospace">my $config = {</font></div><div><font face="monospace, monospace">  'compress' => 'gzip -dc', # required; try 'zcat' instead if this doesn't work</font></div><div><font face="monospace, monospace">  'dir'      => '/Users/will/.vep/homo_sapiens/80_GRCh38', # full path to VEP cache including species, version, assembly</font></div><div><font face="monospace, monospace">  'quiet'    => 1, # not required but stops splurge</font></div><div><font face="monospace, monospace">};</font></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace"># define region</font></div><div><font face="monospace, monospace"># regions in the cache are of fixed size (1MB) with one cache file per MB</font></div><div><font face="monospace, monospace"># files are named after these region names under chromosome sub-directories</font></div><div><font face="monospace, monospace"># in the VEP cache directory, so it's easy to loop over them if you read</font></div><div><font face="monospace, monospace"># the contents of the directory</font></div><div><font face="monospace, monospace">my $chr = 1;</font></div><div><font face="monospace, monospace">my $region_start = 1000001; # region start must be (r * 10^6) + 1</font></div><div><font face="monospace, monospace">my $region_end   = 2000000; # region end must be (r + 1) * 10^6</font></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace"># this returns a hashref with one member keyed on chromosome name</font></div><div><font face="monospace, monospace">my $trs = load_dumped_transcript_cache($config, $chr, $region_start.'-'.$region_end);</font></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace">foreach my $tr(@{$trs->{$chr}}) {</font></div><div><font face="monospace, monospace">  printf(</font></div><div><font face="monospace, monospace">    ">%s\n%s\n",</font></div><div><font face="monospace, monospace">    $tr->stable_id, # some methods can be called verbatim</font></div><div><font face="monospace, monospace">    $tr->{_variation_effect_feature_cache}->{translateable_seq} # others use internal cache</font></div><div><font face="monospace, monospace">  );</font></div><div><font face="monospace, monospace">}</font></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On 31 August 2015 at 08:44, Sabrina Legoueix Rodriguez <span dir="ltr"><<a href="mailto:sabrina.rodriguez@toulouse.inra.fr" target="_blank">sabrina.rodriguez@toulouse.inra.fr</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">
    Dear all,<br>
    <div> <br>
      I am working on a specie whose reference genome is not publicly
      available. I have a .gtf file for CDS annotations and a fasta file
      for the genome sequence.<br>
      <br>
      I am using <a href="http://gtf2vep.pl" target="_blank">gtf2vep.pl</a> to generate my .vep file from my .vcf file.<br>
      <br>
      I would like to obtain the transcript nucleotide sequences of my
      CDSs ( coding sequences of my genes without UTRs...).<br>
      Is there a way to connect to the cache file generated with
      <a href="http://gtf2vep.pl" target="_blank">gtf2vep.pl</a> (instead of the database registry) and use Ensembl API
      objects to get the coding sequences of my genes?<br>
      <br>
      Thanks in advance for your answer.<br>
      <br>
      Best regards,<br>
      <br>
      <div>-- <br>
        
        
        <br>
        Sabrina <br>
        <br>
        <font color="#F70808"><b>Attention changement de coordonnées à
            partir du 15 Juin 2015:</b></font> <br>
        <br>
        <table style="max-width:800px">
          <tbody>
            <tr>
              <td>
                <table>
                  <tbody>
                    <tr>
                      <td><img src="cid:part1.05060503.06090101@toulouse.inra.fr"></td>
                      <td style="padding-left:15px">
                        <p style="font-family:Helvetica,arial,sans-serif;color:#9373b1;font-size:13px;border-bottom:1px solid #9373b1;padding-bottom:5px;margin-bottom:0px"><strong><b>Sabrina

                              LEGOUEIX RODRIGUEZ</b></strong><br>
                          Responsable Plateau Bioinformatique<br>
                        </p>
                        <p style="font-family:Helvetica,arial,sans-serif;color:#595959;font-size:12px;margin-top:7px">Tél. : <a href="tel:%2B33%20%280%29%205%2061%2028%2057%2092" value="+33561285792" target="_blank">+33 (0) 5 61 28 57 92</a><br>
                          <a href="mailto:[MAIL]" style="color:#9373b1;text-decoration:none" target="_blank">sabrina.legoueix@toulouse.inra.fr</a><br>
                          <a href="http://www.toulouse-white-biotechnology.com" target="_blank">www.toulouse-white-biotechnology.com</a><br>
                        </p>
                        <p style="margin-top:3px"> <a href="https://www.linkedin.com/company/2757525h" style="padding-right:5px;font-family:Helvetica,arial,sans-serif;color:#9373b1;font-size:12px;text-decoration:none" target="_blank"><img src="cid:part4.00030607.03040502@toulouse.inra.fr">
                            LinkedIn</a>    <a href="https://twitter.com/TWB_Biotech" style="font-family:Helvetica,arial,sans-serif;color:#9373b1;font-size:12px;text-decoration:none" target="_blank"><img src="cid:part6.00080608.09090405@toulouse.inra.fr">
                            Twitter</a></p>
                      </td>
                    </tr>
                  </tbody>
                </table>
                <table style="border-top:1px solid #9373b1;border-bottom:1px solid #9373b1" width="100%">
                  <tbody>
                    <tr>
                      <td align="left"><font size="2" color="#9373b1" face="Trebuchet MS, Arial, Helvetica,
                          sans-serif">TWB - Parc technologique du canal
                          • Bâtiment NAPA CENTER B • 3, rue Ariane •
                          31520 Ramonville Saint-Agne </font></td>
                    </tr>
                  </tbody>
                </table>
                <br>
                <table width="100%">
                  <tbody>
                    <tr>
                      <td style="font-family:arial;font-size:9px;color:#999999">Ce message et ses pièces jointes
                        sont strictement personnels. Ils peuvent
                        contenir des informations confidentielles. Si
                        vous avez reçu ce message par erreur, merci d'en
                        avertir l'expéditeur et de détruire le message
                        et les documents joints. Toute utilisation des
                        informations reçues par erreur est interdite.
                        This message and the attachments are strictly
                        personal. They may contain confidential
                        information. If you have received this message
                        in error, please notify the sender and delete
                        the message and the attachments. Any use of this
                        communication received in error is prohibited. </td>
                    </tr>
                  </tbody>
                </table>
              </td>
            </tr>
          </tbody>
        </table>
        <br>
      </div>
      <br>
    </div>
    <br>
  </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" rel="noreferrer" target="_blank">http://lists.ensembl.org/mailman/listinfo/dev</a><br>
Ensembl Blog: <a href="http://www.ensembl.info/" rel="noreferrer" target="_blank">http://www.ensembl.info/</a><br>
<br></blockquote></div><br></div>