What you need is two filters on the sample column. However, MartEditor
doesn't allow two filters on the same column (this will be fixed in future
development but not in the short term), so the only way round is to
duplicate your sample column and place one filter on each copy.

Each filter has an operator defined on it - this is usually '='. You'd
leave this untouched on one of the filters (call it 'included samples')
but on the other, change it to '!=' or '<>' (whichever is appropriate for
your database platform) (call it 'excluded samples').

This will then work. The user would specify a sample to include in the
'included samples' filter, and a sample to exclude in the 'excluded
samples' filter. Both filters would also work independently.

However, this only supports single-value filters. For IN-clauses (where X
IN (A,B,C)) BioMart does not yet support NOT-IN-clauses (where X NOT IN
(A,B,C)), and so it would not yet be possible to upload multiple values to
the 'exclude samples' filter. This would preclude you from allowing the
user to specify multiple exclude-samples, although they still could
specify multiple include-samples.

The whole configuration system is currently being redesigned with queries
such as these in mind, but we have no timescale yet as to when this might
be released. For now, the workarounds above are the only way to resolve
the issues you are having.

Hope this helps!

cheers,
Richard


On Thu, December 20, 2007 8:04 pm, Vallejos, Andrew wrote:
> Hi,
>
>
>
> So I have a filtering question that I am unsure of how to implement in
> BioMart, or it even can be implemented.
>
>
>
> So I have two pieced of data which are a n:n relationship.  One piece of
> data is a Protein id and the other is Sample, so I have a sample
> contains multiple proteins and a protein that can belong to multiple
> samples.  I've selected the protein id as my key.
>
>
>
> So here is a quick sketch of my tables:
>
> MAIN
>
> protein_id_key <pk>
>
>
>
> DM
>
> protein_id_key
>
> sample_id
>
>
>
> What I want to be able to do is say give me all the proteins that are
> found in sample A but not in sample B.
>
>
>
> Is there a way of doing this and still allowing users to enter
> information?  Ideally I would like a text areas where users can enter in
> both the samples to include and the samples to exclude.
>
>
>
> Thanks,
>
>
>
> Andrew
>
>
>
> ======================
>
> Andrew Vallejos, M.S.
>
> Web Developer
>
> Medical College of Wisconsin
>
> 414-955-4104
>
> [EMAIL PROTECTED]
>
>
>
>


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

Reply via email to