[ensembl-dev] VEP Flanking sequence plugin

Will McLaren wm2 at ebi.ac.uk
Tue Jun 4 09:05:12 BST 2013


Hi Guillermo,

Are you using --offline, --cache or --database?

You may need to manually add a slice to the $vf object in some cases; you
should be able to do that with something like:

if(!defined($vf->{slice})) {
  my $sa = $self->{config}->{sa} ||
Bio::EnsEMBL::Registry->get_adaptor($self->{config}->{species}, 'core',
'slice');
  $vf->{slice} = $sa->fetch_by_region('chromosome', $vf->{chr});
}

before the lines where you are asking for the flanking sequence.

Will

On 3 June 2013 11:27, Guillermo Marco Puche <
guillermo.marco at sistemasgenomicos.com> wrote:

>  Hello,
>
> My plugin start giving errors.
>
> ERROR: Forked process failed
> Plugin 'flanking_sequence' went wrong: *Can't call method "expand" on an
> undefined value at
> /share/apps/scripts/genomics/global/annotation/ensembl_71_genetonic/vep_config/Plugins/
> flanking_sequence.pm line 72.*
>
> I've tried to fix the code adding if(defined ...) but seems to have no
> effect. I didn't see this bug until today.
>
> How can I check if the value of any of the two expand feature_slice really
> exists?
> I thought this would exist for all features. So I suppose I'm wrong and
> what is causing the plugin to fail obtaining the flanking sequence is the
> expand method call but I've no idea on how to fix it.
>
> Here's plugin code updated:
> https://github.com/guillermomarco/vep_plugins_71/blob/master/flanking_sequence.pm
>
> Regards,
> Guillermo.
>
>
>
> On 04/24/2013 12:11 PM, Guillermo Marco Puche wrote:
>
> Hello,
>
> Thank you for information.
> I was already running VEP with --check_existing flag but i had no idea on
> how to retrieve the rsID (I was looking the Variation API so i thought that
>
> $tva->variation_feature->variation_name;
>
>
> would be enough.
>
> As you said I just wanted reference sequence on either side of the variant
> so not even rsID needed.. but it's good to know how I can obtain it for a
> near future :)
>
> Just to prevent from asking these kind of question, how can i print all
> the content from the $va object for example?
>
> I mean how can I know this *"you will then find a simplified hash
> representing each overlapping variant in the array @{$vf->{existing}}
> (where $vf = $tva->variation_feature)."* I can't see a "existing" method
> in the API, I suppose that is comming from the own VEP script.*
>
> *
> I also changed the (I don't know if I should undo this change)
>
> sub feature_types {
>     return ['Transcript', 'Feature'];
> }
>
> I was playing around this but the information on VEP script web doesn't
> clarify this too much. It has to do with handlers and overwriting but I
> don't understand very well.
>
> Updated script in repo if anyone wants to use it.
>
> Thank you very much Will.
>
> Best regards,
> Guillermo.*
>
> *I don't want to spam list for questions like that, but I can't find that
> On 04/24/13 10:50, Will McLaren wrote:
>
> Hello,
>
> A variation feature object is created by the VEP to represent each
> line of your input. If you don't give it a name in your input, then
> the VEP constructs a name from the coordinates, which is what you are
> seeing. Names can be added for variants in the third column (VCF) or
> sixth column (tab-delimited input).
>
> If you want the rsID of any existing variants that overlap yours, you
> must run the VEP with the --check_existing flag; you will then find a
> simplified hash representing each overlapping variant in the array
> @{$vf->{existing}} (where $vf = $tva->variation_feature).
>
> If you are looking for the original flanking sequence submitted with
> the existing variant to dbSNP, then we don't store this in the
> database. However, if you just want to retrieve the reference sequence
> either side of your variant, that is easily done by getting and
> expanding the feature slice attached to the variant (here I'm getting
> 100bp either side):
>
> my $five_prime_seq = $vf->feature_Slice->expand(100, -1)->seq;
> my $three_prime_seq = $vf->feature_Slice->expand(-1, 100)->seq;
>
> Regards
>
> Will
>
>
>
>
> On 24 April 2013 09:13, Guillermo Marco Puche<guillermo.marco at sistemasgenomicos.com> <guillermo.marco at sistemasgenomicos.com> wrote:
>
>  Hello,
>
> I updated the code in my git repo, and I still can't make it
> work:https://github.com/guillermomarco/vcf_input/blob/master/flanking_sequence.pm
>
> I still don't get why this is returning a string of type 1_41304886_C/T and
> not the rsID.
>
> $tva->variation_feature->variation_name;
>
>
> Thank you.
>
> Best regards,
> Guillermo.
>
>
> On 04/23/13 16:45, Guillermo Marco Puche wrote:
>
> Hello,
>
> I'm developing a plugin for VEP that calculates 5' & 3' flanking sequence
> for each rs.
>
> I've the plugin 95% completed. I'm just missing how are rs IDs called on
> VEP.
> Looking into Enseml Variation API I've found this:http://www.ensembl.org/info/docs/Doxygen/variation-api/classBio_1_1EnsEMBL_1_1Variation_1_1VariationFeature.html
>
> It seems that I need VariationFeature adaptor set so I can call
> "variation_name" method get the rs and then call "five_prime_flanking_seq" &
> "three_prime_flanking_seq" methods to get the flanking sequence.
>
> I don't know why even after changing adaptor I'm still getting
> "2_26739423_T/C" if I'm not using TranscriptVariation adaptor but
> VariantFeature I should be getting rsxxxxxx ID.
>
> Plugin code can be found in Github:https://github.com/guillermomarco/vcf_input/blob/master/flanking_sequence.pm
>
>
>
>
> Thank you !
>
> Best regards,
> Guillermo.
>
>
> _______________________________________________
> Dev mailing list    Dev at ensembl.org
> Posting guidelines and subscribe/unsubscribe info:http://lists.ensembl.org/mailman/listinfo/dev
> Ensembl Blog: http://www.ensembl.info/
>
>
> _______________________________________________
> Dev mailing list    Dev at ensembl.org
> Posting guidelines and subscribe/unsubscribe info:http://lists.ensembl.org/mailman/listinfo/dev
> Ensembl Blog: http://www.ensembl.info/
>
>
>
> _______________________________________________
> Dev mailing list    Dev at ensembl.org
> Posting guidelines and subscribe/unsubscribe info: http://lists.ensembl.org/mailman/listinfo/dev
> Ensembl Blog: http://www.ensembl.info/
>
>
> _______________________________________________
> Dev mailing list    Dev at ensembl.org
> Posting guidelines and subscribe/unsubscribe info:
> http://lists.ensembl.org/mailman/listinfo/dev
> Ensembl Blog: http://www.ensembl.info/
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.ensembl.org/pipermail/dev_ensembl.org/attachments/20130604/8228b3d7/attachment.html>


More information about the Dev mailing list