From jreumers at vub.ac.be Tue Nov 7 03:18:39 2006 From: jreumers at vub.ac.be (Joke Reumers) Date: Tue, 7 Nov 2006 09:18:39 +0100 Subject: [DAS] Error when testing diplo Message-ID: <20061107081840.9CA1F2D6@dorado.vub.ac.be> 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 From ak at ebi.ac.uk Tue Nov 14 05:14:18 2006 From: ak at ebi.ac.uk (Andreas Kahari) Date: Tue, 14 Nov 2006 10:14:18 +0000 Subject: [DAS] Error when testing diplo In-Reply-To: <20061107081840.9CA1F2D6@dorado.vub.ac.be> References: <20061107081840.9CA1F2D6@dorado.vub.ac.be> Message-ID: <20061114101418.GD5335@ebi.ac.uk> On Tue, Nov 07, 2006 at 09:18:39AM +0100, Joke Reumers wrote: > 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 Dear Joke, (It looks as if you either have your system clock one week in the past, or your message was blocked for a week somewhere before it was delivered) I've been developing on a OpenBSD system, and I haven't properly tested the code on Linux (which I assume you're running), so it seems that you've found an incompatibility. This is easily fixed though. Locate the Diplo.pm Perl module in the Diplo distribution and simply change all occurrences of the word "ReusePort" to "ReuseAddr" (there's two of them). This should make it work. I will make this change in future releases. FYI: I'm currently thinking about how to replace the Net::Daemon back-end of Diplo (which has some nasty habits of hiding error messages) with Net::Server. This will change quite a lot of the internals of the server but should hopefully not impact on existing plugins (too much). But since it's December soon and I have a number of deadlines looming, I will have to postpone any development until next year. Regards, Andreas -- Andreas K?h?ri :: Ensembl Software Developer European Bioinformatics Institute (EMBL-EBI) -------------------------------------------- contentsofsignaturemightsettleduringtransfer