Hey Patrice,

look at this piece of code, hope this helps:

foreach my $option(@{$filter->getAllOptions}){
        next if (!$option->filter);
        my $options = $option->filter->getAllOptions;
        my @vals;
        foreach (@$options){
                push @vals,$_->value;
        }
        my @filters = ($option->filter);
        foreach my $filt (@filters) {
                print $filt->name."\t".$filt->displayName;
        }
}




On 30/11/2010 14:26, Patrice Dehais wrote:
Hello

I've a filter which defines a chromosomal region, thus in the marteditor
it has no field, tableConstraint, nor key but a filterList with
appropriate filter list (chr,start,end).
It works fine when I use Web interface of BioMart.
However, I need to retrieve the value of this filter in a homemade
Formatter.
I can retrieve values of all other filters (except this one) using this
script in the getDisplayNames subroutine of the formatter :

      foreach my $f (@{$query->getAllFilters}) {
          foreach my $row (@{$f->getTable->getRows}){
              printf STDERR "filter name: %s value= %s\n",$f->name,$row->[0];
          }
      }

Why doesn't it work for this special kind of filter ?

thanks

Patrice

Reply via email to