<div dir="ltr">Thanks Chris - always good to shorten one-liners.<div><br></div><div>And you're correct, the space is not intentional; the command should be:</div><br>gzip -dc 44394_ref_Zonotrichia_albicollis-1.0.1_chrUn.fa.gz | perl -lne 'if(/^\>/) { $id = (split /\|/, $_)[3]; print ">$id";} else {print}' > 44394_ref_Zonotrichia_albicollis-1.0.1_chrUn.fa<div><br></div><div>Regards<br><br>Will</div></div><div class="gmail_extra"><br><div class="gmail_quote">On 28 July 2015 at 10:09, Christian Cole (Staff) <span dir="ltr"><<a href="mailto:C.Cole@dundee.ac.uk" target="_blank">C.Cole@dundee.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 style="word-wrap:break-word;color:rgb(0,0,0);font-size:16px;font-family:Cochin,sans-serif">
<div>
<div>
<div>Hi Will,</div>
<div><br>
</div>
<div>Just a quick tip. Using the perl -n switch avoids 'while(<>) { }' and -l switch avoids having to terminate print statements with '\n'. So your code can be tidied up a touch with:</div>
<div>gzip -dc 44394_ref_Zonotrichia_albicollis-1.0.1_chrUn.fa.gz | perl -lne 'if(/^\>/) { $id = (split /\|/, $_)[3]; print "> $id";} else {print}' > 44394_ref_Zonotrichia_albicollis-1.0.1_chrUn.fa</div>
<div><br>
</div>
<div>
<div></div>
</div>
</div>
</div>
<div>Also, is the space in '> $id' intentional? That's not typical behaviour for fasta files.</div>
<div>Cheers,</div>
<div><br>
</div>
<div>Chris</div>
<div><br>
</div>
<span>
<div style="font-family:Calibri;font-size:12pt;text-align:left;color:black;BORDER-BOTTOM:medium none;BORDER-LEFT:medium none;PADDING-BOTTOM:0in;PADDING-LEFT:0in;PADDING-RIGHT:0in;BORDER-TOP:#b5c4df 1pt solid;BORDER-RIGHT:medium none;PADDING-TOP:3pt">
<span style="font-weight:bold">From: </span><<a href="mailto:dev-bounces@ensembl.org" target="_blank">dev-bounces@ensembl.org</a>> on behalf of Will McLaren<br>
<span style="font-weight:bold">Reply-To: </span>Ensembl developers list<br>
<span style="font-weight:bold">Date: </span>Monday, 27 July 2015 17:27<br>
<span style="font-weight:bold">To: </span>Ensembl developers list<br>
<span style="font-weight:bold">Subject: </span>Re: [ensembl-dev] Request to add one species to VEP pre-built cache<br>
</div><div><div class="h5">
<div><br>
</div>
<blockquote style="BORDER-LEFT:#b5c4df 5 solid;PADDING:0 0 0 5;MARGIN:0 0 0 5">
<div>
<div>
<div dir="ltr">Hi Dan,
<div><br>
</div>
<div>We have in fact just updated our GTF converter script to support GFF too (get the new release, 81, for this capability).</div>
<div><br>
</div>
<div>However, giving it a go just now with that file I noticed the FASTA file supplied doesn't play nicely with our indexer, so I tweaked the FASTA to get it to run. Long story short, here's the cache:</div>
<div><br>
</div>
<div><a href="https://dl.dropboxusercontent.com/u/12936195/zonotrichia_albicollis.tar.gz" target="_blank">https://dl.dropboxusercontent.com/u/12936195/zonotrichia_albicollis.tar.gz</a><br>
</div>
<div><br>
</div>
<div>And here's the long story, i.e. what I did to generate it if you want to do the same:</div>
<div><br>
</div>
<div>wget <a href="ftp://ftp.ncbi.nlm.nih.gov/genomes/Zonotrichia_albicollis/GFF/ref_Zonotrichia_albicollis-1.0.1_scaffolds.gff3.gz" target="_blank">
ftp://ftp.ncbi.nlm.nih.gov/genomes/Zonotrichia_albicollis/GFF/ref_Zonotrichia_albicollis-1.0.1_scaffolds.gff3.gz</a><br>
</div>
<div>wget <a href="ftp://ftp.ncbi.nlm.nih.gov/genomes/Zonotrichia_albicollis/CHR_Un/44394_ref_Zonotrichia_albicollis-1.0.1_chrUn.fa.gz" target="_blank">
ftp://ftp.ncbi.nlm.nih.gov/genomes/Zonotrichia_albicollis/CHR_Un/44394_ref_Zonotrichia_albicollis-1.0.1_chrUn.fa.gz</a><br>
</div>
<div>gzip -dc 44394_ref_Zonotrichia_albicollis-1.0.1_chrUn.fa.gz | perl -e 'while(<>) { if(/^\>/) { $id = (split /\|/, $_)[3]; print "> $id\n";} else {print}}' > 44394_ref_Zonotrichia_albicollis-1.0.1_chrUn.fa</div>
<div>perl <a href="http://gtf2vep.pl" target="_blank">gtf2vep.pl</a> -i ref_Zonotrichia_albicollis-1.0.1_scaffolds.gff3.gz -fasta 44394_ref_Zonotrichia_albicollis-1.0.1_chrUn.fa -species zonotrichia_albicollis</div>
<div><br>
</div>
<div>Then run the VEP as follows:</div>
<div><br>
</div>
<div>perl <a href="http://variant_effect_predictor.pl" target="_blank">variant_effect_predictor.pl</a> -offline -species zonotrichia_albicollis -i variants.vcf</div>
<div><br>
</div>
<div>Regards</div>
<div><br>
</div>
<div>Will McLaren</div>
<div>Ensembl Variation</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On 27 July 2015 at 16:49, Dan Sun <span dir="ltr"><<a href="mailto:meredithfy@gmail.com" target="_blank">meredithfy@gmail.com</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">Hi,
<div><br>
</div>
<div>I was trying to build a cache from GTF for white-throated sparrow by myself following the tutorial, but was not successful. If possible, could you please add this species to the download list? I would really appreciate that! </div>
<div><br>
</div>
<div>You may download the GFF3 annotation for this species from NCBI ftp (<a href="ftp://ftp.ncbi.nlm.nih.gov/genomes/Zonotrichia_albicollis/GFF/ref_Zonotrichia_albicollis-1.0.1_scaffolds.gff3.gz" target="_blank">ftp://ftp.ncbi.nlm.nih.gov/genomes/Zonotrichia_albicollis/GFF/ref_Zonotrichia_albicollis-1.0.1_scaffolds.gff3.gz</a>)
 and convert it to GTF.</div>
<div><br>
</div>
<div>Thank you very much!<span><font color="#888888"><br clear="all">
<div><br>
</div>
-- <br>
<div>
<div dir="ltr">Dan <br>
</div>
</div>
</font></span></div>
</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" 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>
</div>
</div>
</blockquote>
</div></div></span><br>
<span style="font-size:10pt">The University of Dundee is a registered Scottish Charity, No: SC015096</span>
</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>