<div dir="ltr">Thanks, that clears up my misunderstanding.<br><br>Matt Wood<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Oct 22, 2014 at 3:30 AM, Will McLaren <span dir="ltr"><<a href="mailto:wm2@ebi.ac.uk" target="_blank">wm2@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 dir="ltr">Hi Matt,<div><br></div><div>The strand in $line_hash->{Extra}->{STRAND} is the strand of the overlapping genomic feature (transcript, regulatory feature etc), not the variation feature itself.</div><div><br></div><div>It should match $tva->feature->strand in your example code.</div><div><br></div><div>If your input is VCF, you will find that the strand of the variation feature is _always_ 1, as all variants encoded in VCF are on the forward strand.</div><div><br></div><div>If the variation feature overlaps a transcript on the negative strand, then before any sequence annotation is done on the variant allele, it is reverse complemented; you can see the difference between the alleles in these situations by calling:</div><div><br></div><div># variant allele sequence relative to transcript</div><div>$tva->feature_seq()</div><div><br></div><div># "original" variant allele sequence from variation feature</div><div>$tva->variation_feature_seq()</div><div><br></div><div>HTH</div><div><br></div><div>Will McLaren</div><div>Ensembl Variation</div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On 21 October 2014 21:34, Matt Wood <span dir="ltr"><<a href="mailto:matt.wood@codifiedgenomics.com" target="_blank">matt.wood@codifiedgenomics.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr"><div><div><div><div><div><div><div>I'm writing a plugin and am running into an issue with strand. The strand I get from Bio::EnsEMBL::Feature::strand doesn't match the strand I'm seeing in the output or the strand that is in the line hash provided to my run method. Specifically I'm having an issue with the negative strand.<br><br></div>This is my test plugin:<br><br>package StrandTest;<br>use strict;<br>use warnings;<br>use Bio::EnsEMBL::Variation::Utils::BaseVepPlugin;<br>use base qw(Bio::EnsEMBL::Variation::Utils::BaseVepPlugin);<br><br>sub run {<br>    my ($self, $tva, $line_hash) = @_;<br><br>    my $strand = $tva->variation_feature->strand;<br>    my $extra_strand = $line_hash->{Extra}->{STRAND};<br><br>    print("Strand: $strand/$extra_strand\n");<br><br>    return {};<br>}<br><br>1;<br><br></div>My output shows this: "Strand: 1/-1"<br><br></div>The strand written to my output file is -1, and the strand in the line hash is -1, but the strand from the VariationFeature is 1.<br><br></div>My VCF:<br><br>##fileformat=VCFv4.0<br>#CHROM    POS    ID    REF    ALT    QUAL    FILTER    INFO    FORMAT    PAT<br>6    133078809    .    C    A    60    PASS    .    GT:VR:RR:DP:GQ    0/1:12:15:27:.<br><br></div>I'm running VEP with these options: --plugin StrandTest --offline --vcf --force_overwrite --pick -i test.vcf -o test.vep<br><br></div>Any idea what's going on? For the time being I'm going to use "$line_hash->{Extra}->{STRAND}" for my strand info. Is that safe to do? Are there going to be cases where that hash is undef?<br><br></div>Thanks,<br>Matt Wood<br><div><div><div><div><div><br><br></div></div></div></div></div></div>
<br></div></div>_______________________________________________<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>
<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>