[DAS] Error when testing diplo

Joke Reumers jreumers at vub.ac.be
Tue Nov 7 08:18:39 UTC 2006


Hi, 

I'm testing a DAS Diplo server (ini and adjusted Plugin files are pasted at
the bottom of the mail), and when I try to run the server, I get the
following error:
Your vendor has not defined Socket macro SO_REUSEPORT, used at
/usr/lib/perl5/5.8.7/IO/Socket/INET.pm line 161

Anyone ever encountered this error?

Thanks,
Joke

>>>>>>>>>>>>>>>>>>>>>tango.ini>>>>>>>>>>>>>>>>>>>>>

[daemon]
childs      = 5
debug       = 1
localport   = 9000
logfile     = STDERR
pidfile     = diplo.pid
loop-timeout= 300

[source tango]
active      = Yes
description = Tango Aggregation tendencies
description_link    = http://tango.embl.de
mapmaster   = http://das.ensembl.org/das/ensembl_Homo_sapiens_core_38_36
plugin      = tango
version     = 2.0
compress    = No

>>>>>>>>>>>>>>>>>>>>>tango.pm>>>>>>>>>>>>>>>>>>>>>

package Bio::Das::Diplo::Plugin::tango;

use strict;
use warnings;

use base qw( Bio::Das::Diplo::Plugin );

#connect to localDB
my $database = 'das';
my $server = 'localhost';
my $user = 'das';
my $pwd ='DaS-UsEr!';
my $DBconnection = DBI->connect('dbi:mysql:'.$database.':'.$server, $user,
$pwd) or die "unable to establish connection to DAS database";

sub init
{
    my ($self) = @_;

    $self->{'capabilities'} = {
        'features'        => '1.0',   # We implement get_features()
        'unknown-segment' => '1.0',   # We implement segment_status() as
                                      # an annotation server
         'sequence' => '1.0',    # We implement get_sequence()
    };
}

sub segment_status
{
    my ( $self, $segment ) = @_;

    # if the translation_stable_id (ENSPXXXXX) exists, valid otherwise
unknown
    my ($sql, $query, @result);

    $query = "select translation_stable_id from proteintango where
translation_stable_id='".$segment->{'id'}."';";
    $sql = $DBconnection->prepare($query);
    $sql->execute();
    @result = $sql->fetchrow_array();
    $sql->finish();

    if ( scalar (@result) == 0) {
        return 'unknown';
    }

    return 'valid';
}

sub get_features
{
    my ( $self, %args ) = @_;

    my $segment = $args{'segment'};
    my ($sql, $query, @result);

    $query = "select translation_stable_id, total_tango_score from
proteintango where translation_stable_id='".$segment->{'id'}."';";
    $sql = $DBconnection->prepare($query);
    $sql->execute();
    @result = $sql->fetchrow_array();
    $sql->finish();


    my $feature = {
        'id'    => $segment->{'id'}
        'label' => "Total Tango aggregation score for protein".$result[0],
        'start' => 0,
        'end' =>   0,
        'version'  => "v0.1",
        'type'     => "Tango aggregation score",
        'category' => "?",
        'method'   => "Tango",
        'note' => $result[1],
        'link' => {
                'href' =>
'http://snpeffect.vib.be/protein_main.php?id='.$segment->{'id'},
                'text' => 'SNPeffect entry for protein '.$segment->{'id'}
            },
    };

    #$self->save_state( 'featurecount' => $count + 1 );

    return $feature;
}

sub get_sequence
{
    my ( $self, %args ) = @_;

    my $segment = $args{'segment'};
    my ($sql, $query, @result);

    $query = "select sequence from proteintango where
translation_stable_id='".$segment->{'id'}."';";
    $sql = $DBconnection->prepare($query);
    $sql->execute();
    @result = $sql->fetchrow_array();
    $sql->finish();

    my $sequence = {
        'id'       => $segment->{'id'},
        'start'    => $segment->{'start'},
        'stop'     => $segment->{'stop'},
        'moltype'  => 'protein',
        'version'  => $segment->{'version'} || '0.1',
        'sequence' => $result[0]
    };

    return $sequence;
}

sub segment_length
{
    my ( $self, $segment ) = @_;
    
    #resultvariables
    my ($sql, $query, @result);
    
    $query = "select sequence from proteintango where
translation_stable_id='".$segment->{'id'}."';";
    $sql = $DBconnection->prepare($query);
    $sql->execute();
    @result = $sql->fetchrow_array();
    $sql->finish();

    return length($result[0]);
}

1;
___________________________________________

Joke Reumers
Switch Laboratory
Flanders Interuniversity Institute for Biotechnology
Vrije Universiteit Brussel
http://switch.vub.ac.be - http://snpeffect.vib.be  
 




More information about the DAS mailing list