[ensembl-dev] Retreiving SNPs using Perl API

Will McLaren wm2 at ebi.ac.uk
Sat Oct 23 16:04:01 BST 2010

Hi Andrea,

There is no method to do this explicitly; you would instead have to
filter the results afterwards using the var_class method:

foreach my $var(@variations) {
  next unless $var->var_class =~ /snp/i;

The var_class method can be called from either a Variation or
VariationFeature object.


Will McLaren
Ensembl Variation

On 23 October 2010 13:20, Andrea Edwards <edwardsa at cs.man.ac.uk> wrote:
> Hi
>  using the Perl variation API how do I retrieve just SNPs (and not, for
> example, indels) in a variation feature query? I looked in the methods in
> the variation feature adaptor and didn't find anything obvious.
> Many Thanks in advance
> _______________________________________________
> Dev mailing list
> Dev at ensembl.org
> http://lists.ensembl.org/mailman/listinfo/dev

More information about the Dev mailing list