From 40300d6fe677aecc2b3a648c4f48795feefb9ac2 Mon Sep 17 00:00:00 2001 From: elserj Date: Wed, 22 Sep 2010 20:38:56 +0000 Subject: [PATCH] Fix whitespace and remove old comments svn path=/; revision=45 --- .../inparanoid_output_parse.pl | 45 +++++++++---------- 1 file changed, 22 insertions(+), 23 deletions(-) diff --git a/interactome_scripts/inparanoid_output_parse.pl b/interactome_scripts/inparanoid_output_parse.pl index 111c57e..bd58591 100755 --- a/interactome_scripts/inparanoid_output_parse.pl +++ b/interactome_scripts/inparanoid_output_parse.pl @@ -99,31 +99,31 @@ foreach my $input_file (@files) { - my $safe_species_table = $dbh->quote_identifier($species_table); - $dbh->do("drop table if exists $safe_species_table"); - $dbh->do("CREATE TABLE $safe_species_table ( - `id` INT( 11 ) NOT NULL , - `bit_score` INT( 11 ) NOT NULL , - `species` VARCHAR( 255 ) NOT NULL , - `score` FLOAT( 11 ) NOT NULL , - `gene` VARCHAR( 255 ) NOT NULL , - INDEX ( `id` ) - ) TYPE = MYISAM"); - my $sth = $dbh->prepare("insert into $safe_species_table (id, bit_score, species, score, gene) values (?,?,?,?,?)"); - + my $safe_species_table = $dbh->quote_identifier($species_table); + $dbh->do("drop table if exists $safe_species_table"); + $dbh->do("CREATE TABLE $safe_species_table ( + `id` INT( 11 ) NOT NULL , + `bit_score` INT( 11 ) NOT NULL , + `species` VARCHAR( 255 ) NOT NULL , + `score` FLOAT( 11 ) NOT NULL , + `gene` VARCHAR( 255 ) NOT NULL , + INDEX ( `id` ) + ) TYPE = MYISAM"); + my $sth = $dbh->prepare("insert into $safe_species_table (id, bit_score, species, score, gene) values (?,?,?,?,?)"); + - my $sth_id_dump = $dbh->prepare("select * from clusters"); - my $sth_id_add = $dbh->prepare("insert into $safe_clust_table (id, clust_id) values (?,?)"); - my $sth_get_id = $dbh->prepare("select last_insert_id(id) from clusters order by id desc limit 1"); - - # put the clusters table data into a hash - $sth_id_dump->execute(); - while(my @ids = $sth_id_dump->fetchrow_array) { - if(!defined($id_hash{$ids[1]})) { - $id_hash{$ids[1]} = $ids[0]; - } + my $sth_id_dump = $dbh->prepare("select * from clusters"); + my $sth_id_add = $dbh->prepare("insert into $safe_clust_table (id, clust_id) values (?,?)"); + my $sth_get_id = $dbh->prepare("select last_insert_id(id) from clusters order by id desc limit 1"); + + # put the clusters table data into a hash + $sth_id_dump->execute(); + while(my @ids = $sth_id_dump->fetchrow_array) { + if(!defined($id_hash{$ids[1]})) { + $id_hash{$ids[1]} = $ids[0]; } + } my $clust_id_prev = ""; @@ -152,7 +152,6 @@ foreach my $input_file (@files) { next if ($gene =~ /\.7[0-9]$/); next if ($gene =~ /\.8[0-9]$/); next if ($gene =~ /\.9[0-9]$/); - # assume there are never more than 29 isomers if(!defined($id_hash{$clust_id})) { if ($clust_id ne $clust_id_prev) { -- 2.34.1