[ensembl-dev] what are all possible feature_types and variant_feature_types for VEP plugins?

Graham Ritchie grsr at ebi.ac.uk
Thu Apr 19 09:39:58 BST 2012

Hi Michael,

The plugin feature type checking code respects the API class hierarchy, so if you want your plugin to get called for any possible feature and variant feature type you should return the superclass of all features, 'Bio::EnsEMBL::Feature' (or just 'Feature') from your feature_types method, and the superclass of all variant features, 'Bio::EnsEMBL::Variation::BaseVariationFeature' (or just 'BaseVariationFeature') from your variant_feature_types method. Intergenic variants are a special case (as they don't have an associated feature) so you also have to return 'Intergenic' from your feature_types method to include these as well. 

In summary, if you want your plugin to run in all possible circumstances your feature_types and variant_feature_types methods should look like:

sub feature_types {
    return ['Feature', 'Intergenic'];

sub variant_feature_types {
    return ['BaseVariationFeature'];

Your run method should then be careful to check the class of objects passed to it before calling any feature type specific methods.



On 18 Apr 2012, at 23:19, Michael Yourshaw wrote:

> I’m having a bit of trouble capturing all possible features and feature types in plugins where I want to add an annotation to every line of output, for example allele frequencies from an external database.
> My current list is
> feature_types: ['Transcript', 'RegulatoryFeature', 'MotifFeature', 'Intergenic', 'Gene', 'Exon’] (gene and Exon are produced by some structural variations)
> variant_feature_types: ['VariationFeature', 'StructuralVariationFeature’]
> If I want to be sure of getting everything, what should I use?
> It might be a good enhancement to allow ‘*’ or ‘All’ for these functions so a plugin need not be concerned with knowing all the possibilities when it doesn’t care what they are.
> Michael Yourshaw
> UCLA Geffen School of Medicine
> Department of Human Genetics, Nelson Lab
> 695 Charles E Young Drive S
> Gonda 5554
> Los Angeles CA 90095-8348 USA
> myourshaw at ucla.edu
> 970.691.8299
> This message is intended only for the use of the addressee and may contain information that is PRIVILEGED and CONFIDENTIAL, and/or may contain ATTORNEY WORK PRODUCT. If you are not the intended recipient, you are hereby notified that any dissemination of this communication is strictly prohibited. If you have received this communication in error, please erase all copies of the message and its attachments and notify us immediately. Thank you.
> _______________________________________________
> Dev mailing list    Dev at ensembl.org
> List admin (including subscribe/unsubscribe): http://lists.ensembl.org/mailman/listinfo/dev
> Ensembl Blog: http://www.ensembl.info/

More information about the Dev mailing list