Bio::Das::ProServer::SourceAdaptor::sif - Bio::Das::ProServer::SourceAdaptor::sif documentation


Bio-Das-ProServer documentation Contained in the Bio-Das-ProServer distribution.

Index


Code Index:

NAME

Top

Bio::Das::ProServer::SourceAdaptor::sif

VERSION

Top

$LastChangedRevision: 537 $

SYNOPSIS

Top

  Interactions involving 001:
  <host>/das/<source>/interaction?interactor=001

  Interactions between 001 and 002
  <host>/das/<source>/interaction?interactor=001;interactor=002

DESCRIPTION

Top

Serves up interaction DAS responses from 'Simple Interaction Format' (SIF) files. See http://www.cytoscape.org/cgi-bin/moin.cgi/Cytoscape_User_Manual/Network_Formats http://www.cytoscape.org/cgi-bin/moin.cgi/Cytoscape_User_Manual/Network_Formats for details of the file format.

CONFIGURATION AND ENVIRONMENT

Top

  [mysif]
  adaptor                  = sif
  state                    = on
  transport                = sif
  ; the main SIF file:
  filename                 = /data/interactions.sif
  ; zero or more attribute files:
  attributes               = /data/node-attribute.noa ; /data/edge-attributes.eda
  ; coordinates will be used as 'dbCoordSys':
  coordinates              = MyCoordSys -> 001
  ; static parameters:
  interaction.dbSource     = MyInteractionDB
  interaction.dbSourceCvId = MIDB
  interaction.dbVersion    = 12
  interactor.dbSource      = MyProteinDB
  interactor.dbSourceCvId  = MPDB
  interactor.dbVersion     = 23

DIAGNOSTICS

Top

Run ProServer with the -debug flag.

SUBROUTINES/METHODS

Top

build_interaction - Builds the DAS response

See documentation in superclass.

capabilities - Provides details of the adaptor's capabilities

This adaptor supports the 'interaction' command only.

SEE ALSO

Top

Bio::Das::ProServer::SourceAdaptor::Transport::sif
http://www.cytoscape.org/cgi-bin/moin.cgi/Cytoscape_User_Manual/Network_Formats Cytoscape - SIF
http://www.cytoscape.org/cgi-bin/moin.cgi/Cytoscape_User_Manual/Attributes Cytoscape - Attributes

DEPENDENCIES

Top

Carp
Bio::Das::ProServer::SourceAdaptor
Bio::Das::ProServer::SourceAdaptor::Transport::sif

BUGS AND LIMITATIONS

Top

The Simple Interaction Format is very simple, and therefore only supports a limited range of DAS annotation details. It also only handles binary interactions (i.e. those with exactly two interactors).

INCOMPATIBILITIES

Top

None reported.

AUTHOR

Top

Andy Jenkinson <andy.jenkinson@ebi.ac.uk>

LICENSE AND COPYRIGHT

Top


Bio-Das-ProServer documentation Contained in the Bio-Das-ProServer distribution.

#########
# Author:        Andy Jenkinson
# Created:       2008-02-01
# Last Modified: $Date: 2008-10-30 22:02:35 +0000 (Thu, 30 Oct 2008) $ $Author: andyjenkinson $
# Id:            $Id: sif.pm 537 2008-10-30 22:02:35Z andyjenkinson $
# Source:        $Source$
# $HeadURL: https://proserver.svn.sf.net/svnroot/proserver/trunk/lib/Bio/Das/ProServer/SourceAdaptor/sif.pm $
#
# SourceAdaptor implementation for Simple Interaction Format files.
#
package Bio::Das::ProServer::SourceAdaptor::sif;
use strict;
use warnings;
use Carp;
use base qw(Bio::Das::ProServer::SourceAdaptor);

our $VERSION = do { my ($v) = (q$LastChangedRevision: 537 $ =~ /\d+/mxg); $v; };

sub capabilities {
  return { 'interaction' => '1.0' };
}

sub build_interaction {
  my ($self, $args) = @_;
  my $struct = $self->transport->query($args);

  my $coord_sys = $self->coordinates_full()->[0]->{description};
  my @params = qw(dbSource dbSourceCvId dbVersion);

  my @interactions = @{ $struct->{'interactions'} };
  my @interactors  = @{ $struct->{'interactors'}  };
  
  $self->{debug} && carp sprintf q(Found %d interactions with %d interactors),
                    scalar @interactions,
                    scalar @interactors;

  for my $param (@params) {
    for my $interaction (@interactions) {
      $interaction->{$param} = $self->config()->{"interaction.$param"};
    }
    for my $participant (@interactors) {
      $participant->{$param} = $self->config()->{"interactor.$param"};
      $participant->{'dbCoordSys'} = $coord_sys;
    }
  }

  return $struct;
}

1;
__END__