Hi Josh.

What you seem to be attempting is to always force your database name
filter to be turned on in MartView, and to give it a default unchangeable
value of UniProt. You then want to make this filter invisble so that the
user cannot see or change it, but it remains in force for all queries and
cannot be turned off. This in effect causes your other filter, the
accession filter, to only ever search for UniProt accessions and ignore
all others.

Whilst it is possible to specify default filters and assign default values
to them so that they are always turned on when a user starts a new query,
it is currently not possible to prevent the user from subsequently
deselecting them or from changing the filter value.

Push actions wouldn't be much help here. They are intended for controlling
multiple drop-downs where legal values in one drop down depend on what
value has been selected in another.

The always-on filter idea is already on our list of things to implement in
future.

What you could do instead for now is to divide up (partition) your
dimension table so that it becomes several separate dimension tables, each
one containing accessions from only one database type. You could then hide
all attributes and filters from the dimensions relating to database types
that you don't want the user to see, leaving only those from the UniProt
dimension visible. This would achieve the effect you are looking for by
effectively removing the need for a database type filter altogether.

If you haven't done so yet, have a look at the MartBuilder tool to see if
it can help you with your dataset design. It allows things like the
partitioning described above to be implemented really easily, and
automatically generates all the SQL you need to create the dataset tables.
It's part of the martj package, which you can download from the same web
pages and CVS servers as biomart-perl.

cheers,
Richard

On Tue, April 3, 2007 9:30 pm, Josh Goodman wrote:
>
> I am running into some problems while trying to implement push actions and
> I am
> not sure that they are the appropriate way to accomplish my end goal so
> let me
> describe what I'm trying to do first.
>
> I have a dimension table that holds database cross references for various
> databases.  Each row in this table has the accession number and the
> database
> name as columns.  The main table is in a 1:M relationship with the
> dbxref_dm table.
>
> What I would like to do is setup a simple text field filter that queries a
> subset of this data e.g. only GenBank accessions.  What I'm trying not to
> do is
> have a drop down list of database names and a text field for the
> accession.
>
> I started out by making two filters, one a drop down list of database
> names and
> the other a simple text input box that filters on the accession column of
> the
> dbxref table.  Then I tried to place a push action on the text input
> filter so
> that when it is enabled, the database filter is automatically set to
> whatever
> database name I want for the input box.  For example, if I have a text box
> for
> UniProt accessions it would set the database filter to UniProt when
> enabled.  I
> tried this both via the Mart Editor gui and straight XML (see below) and
> both
> failed.  Once this was working I was going to try to hide the database
> name
> filter so end users only saw the UniProt input box in the MartView.
>
> Any help is greatly appreciated.
>
> Thanks,
> Josh
>
>
> <FilterGroup displayName="dbxref" internalName="dbxref">
>             <FilterCollection displayName="Database" internalName="db">
>                 <FilterDescription displayName="Database"
> displayType="list"
> field="db"
>                     internalName="db_filter" key="id_key"
> legal_qualifiers="="
> qualifier="=" style="menu"
>                     tableConstraint="dbxref__dm" type="list">
>                     <Option displayName="GenBank" internalName="GB"
> isSelectable="true" value="GB" />
>                     <Option displayName="UniProt" internalName="uniprot"
> isSelectable="true" value="UniProt" />
>                 </FilterDescription>
>             </FilterCollection>
>             <FilterCollection displayName="UniProt"
> internalName="uniprot_acc">
>                 <FilterDescription displayName="UniProt"
> displayType="text"
> field="accession"
>                     internalName="accession_filter" key="id_key"
> legal_qualifiers="=,like" qualifier="like"
>                     tableConstraint="dbxref__dm" type="text">
>                     <PushAction internalName="dbxref_db_push"
> ref="db_filter">
>                         <Option displayName="UniProt"
> internalName="uniprot"
> isSelectable="true" value="uniprot" />
>                     </PushAction>
>                 </FilterDescription>
>             </FilterCollection>
>         </FilterGroup>
>


-- 
Richard Holland
BioMart (http://www.biomart.org/)
EMBL-EBI
Hinxton, Cambridgeshire CB10 1SD, UK

Reply via email to