<div dir="ltr">Hi Will and Christian,<div><br></div><div>Thank you both for your help.</div><div><br></div>I have an additional question. Once I annotated my vcf file using your cache, I notice non-coding variants are marked "intergenic variant" instead of something like "non coding exon variant". For example, NW_005081553.1: 4008346G->T is a variant located in an exon of non-coding transcripts of gene KHDRBS2 (XR_270793.1, XR_270792.1, XR_270795.1, XR_270797.1, XR_270794.1). You have any ideas about how to improve the annotation of SNPs in exons of non-coding genes for this species? You can find these non-coding transcripts in the GFF3 file you downloaded from NCBI.<div><br></div><div>Thanks! </div><div><br></div><div>Best,</div><div>Dan</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jul 28, 2015 at 5:52 AM, 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>Sorry, I couldn't leave this alone. I don't think I've done enough coding lately ;)</div>
<div><br>
</div>
<div>You can shorten it a fair bit further with the magic -a (auto-split) and -p (auto-print) switches:</div>
<div>gzip -dc 44394_ref_Zonotrichia_albicollis-1.0.1_chrUn.fa.gz | perl -F'/\|/' -lape 's/^>.*/>$F[3]/' > 44394_ref_Zonotrichia_albicollis-1.0.1_chrUn.fa</div>
<div>
<div></div>
</div>
</div>
</div>
<div><br>
</div>
<div>-a splits each line by the pattern given by -F (whitespace by default) and puts it into @F</div>
<div>-p puts while{<>} { print } around your code</div>
<div><br>
</div>
<div>Using substitution rather than an if() simplifies the defline fix. Although, it's a lot less legible.</div>
<div><br>
</div>
<div>OK. I feel better now...</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 class="">
<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><span style="font-weight:bold">Date: </span>Tuesday, 28 July 2015 10:16<div><div class="h5"><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><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">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>
<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" 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><div><div class="h5"><br>
<span style="font-size:10pt">The University of Dundee is a registered Scottish Charity, No: SC015096</span>
</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" 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><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr">Dan Sun <br>Graduate student of Bioinformatics<br>School of Biology<br>Georgia Institute of Technology<br></div></div>
</div>