restricting searches

15 views
Skip to first unread message

jonathan

unread,
Dec 11, 2012, 8:07:25 AM12/11/12
to psic...@googlegroups.com
Is there any documentation of the Lucene's syntax required to restrict interactions
from a particular protein to specific types?

The program

*******
#!/usr/bin/perl
use strict;
use LWP::Simple;

# ------------------ MITAB FUNCTIONS ------------------

sub getXrefByDbName {
    my ( $xrefs, $dbName ) = @_;
    for my $xref (split (/\|/, $xrefs)){
        my ($db, $id, $txt) = split /[:\(\)]/, $xref;
         if( $db eq $dbName ) {
            return $id;
         }
    }

    return $xrefs;
}

# -----------------------------------------------------
# Note that we are only going to get 10 interactions at most
my $queryUrl = "http://www.ebi.ac.uk/Tools/webservices/psicquic/intact/webservices/current/search/query/YJL172W;

my $content = get $queryUrl;
die "Couldn't get $queryUrl" unless defined $content;

#print $content;

# Now list all interactions
my @lines = split(/\n/, $content);
for my $line (@lines) {
  my @flds = split(/\t/, $line); # split tab delimited lines

  # split fields of a PSIMITAB 2.5 line
  my ($idA, $idB, $altIdA, $altIdB, $aliasA, $aliasB, $detMethod, $author, $pub, $orgA,
      $orgB, $intType, $sourceDb, $intId, $conf) = @flds;

  print getXrefByDbName($idA, "uniprotkb") . " interacts with " . getXrefByDbName($idB, "uniprotkb") . "\n";
  print  $intType, "\n";
}

**********

produces a list of all the interactions involving YJL172W and their interaction types


jonathan@ubuntu:~$ perl a5.pl
P27614 interacts with P02829
psi-mi:"MI:0915"(physical association)
P40152 interacts with P27614
psi-mi:"MI:0914"(association)
P27614 interacts with P15108
psi-mi:"MI:0914"(association)
P11484 interacts with P27614
psi-mi:"MI:0914"(association)
P27614 interacts with P32527
psi-mi:"MI:0915"(physical association)

I would like to restrict these to only interactions with interaction type "physical association", so
I tried replacing the line setting the value of $request with

my $queryUrl = "http://www.ebi.ac.uk/Tools/webservices/psicquic/intact/webservices/current/search/query/YJL172W?type='physical association'";

but this does not stop the program from typing out the same five interactions including the three  which are association.

similarly I would like to restrict searches  to find only experimental interactions, and interactions not derived
from spoke expanded co-complexes.  Can the queryUrl string be altered to achieve this?

Thanks

Jonathan

I would

marine Dumousseau

unread,
Dec 11, 2012, 12:02:14 PM12/11/12
to psic...@googlegroups.com
Hello,

To retrieve physical associations for the accession YJL172W, your lucene query should look like (YJL172W AND type:"physical association").

So the REST URL would be (after encoding spaces and quotes)

http://www.ebi.ac.uk/Tools/webservices/psicquic/intact/webservices/current/search/query/YJL172W%20AND%20type%3A%22physical%20association%22

In IntAct we enrich ontologies so if you look for physcal associations, you should find any children of physical associations (Ex: drect interaction, covalent binding are children of physical association and will be returned with the previous query). However, it is not the case for all the psicquic webservices where when you ask for type:"physical association", only interactions with the exact type pysical association will be returned and you loose all the children.)

If you want more information about MIQL queries, we have some documentation/examples here : http://code.google.com/p/psicquic/wiki/MiqlDefinition.

To filter spoke expanded interactions, you can do it with PSICQUIC webservices that are compliant with MIQL 2.7 and use complex:"-" or NOT complex:"spoke expansion" in the case of spoke expanded complexes.

In IntAct, you can use this REST url (after encoding spaces and quotes)

http://www.ebi.ac.uk/Tools/webservices/psicquic/intact/webservices/current/search/query/YJL172W%20AND%20type%3A%22physical%20association%22%20AND%20NOT%20complex%3A%22spoke%20expansion%22

The LUCENE query is YJL172W AND type:"physical association" AND NOT complex:"spoke expansion"

Regards,

Marine

jonathan myles

unread,
Dec 13, 2012, 4:38:56 AM12/13/12
to psic...@googlegroups.com
Thank you very much, that was really helpful

Is there any documentation of the ontologies anywhere, so that I can
find all the children of a given term?


Thanks so much for your kind help

Jonathan
> --
> You received this message because you are subscribed to the Google
> Groups PSICQUIC group.
> To post to this group, send email to psic...@googlegroups.com
> To unsubscribe from this group, send email to
> psicquic+u...@googlegroups.com
>
> http://psicquic.googlecode.com

Sandra Orchard

unread,
Dec 13, 2012, 8:26:08 AM12/13/12
to psic...@googlegroups.com
http://www.ebi.ac.uk/ontology-lookup/browse.do?ontName=MI

You can then browse the MI ontology by expanding out the required boxes.

Sandra

jonathan myles

unread,
Dec 19, 2012, 5:49:07 AM12/19/12
to psic...@googlegroups.com
Thank you very much
Jonathan
Reply all
Reply to author
Forward
0 new messages