From: elserj Date: Tue, 21 Sep 2010 20:38:59 +0000 (+0000) Subject: Use subroutine to get species array and cleaned up unused code X-Git-Url: http://gitweb.planteome.org/?a=commitdiff_plain;h=c9311ca43306df6c1470f63acbae92ae120c6435;p=old-jaiswallab-svn%2F.git Use subroutine to get species array and cleaned up unused code svn path=/; revision=40 --- diff --git a/interactome_scripts/supercluster.pl b/interactome_scripts/supercluster.pl index bef30d9..66439a9 100755 --- a/interactome_scripts/supercluster.pl +++ b/interactome_scripts/supercluster.pl @@ -25,6 +25,7 @@ use strict; use DBI; use Term::Screen::ReadLine; +require "$ENV{HOME}/scripts/jaiswallab/interactome_scripts/find_species.pl"; # define the database handle to be used @@ -72,22 +73,14 @@ $dbh->do("CREATE TABLE $safe_super_table ( ) TYPE = MYISAM"); -#$dbh->do("CREATE TABLE $safe_super_table ( -# `super_id` INT( 11 ) NOT NULL , -# `gene` VARCHAR( 255 ) NOT NULL , -# UNIQUE ( `gene` ) -# ) TYPE = MYISAM"); - my $insert_sth = $dbh->prepare("insert ignore into $safe_super_table (super_id, species, gene) values (?,?,?)"); -#my $insert_sth = $dbh->prepare("insert ignore into $safe_super_table (super_id, gene) values (?,?)"); my $super_id = 0; #initialize the super cluster id my %super_hash; my %big_count_hash; -#my @species = ("Ath", "Brachy", "Maize", "Oryza_sativa", "Sorghum"); -my @species = ("Ath", "Fragaria", "Oryza_sativa", "Vitis"); -#my @species = ("Ath", "Brachy", "C_elegans", "Chlamy", "Danio", "E_coli", "Fragaria", "Glycine", "Human", "Maize", "Mouse", "Neurospora", "Oryza_sativa", "Physcomitreall", "Poplar", "Sacc_cerevisiae", "Sacc_pombe", "Selaginella", "Sorghum", "Synechosystis", "Vitis"); +#my @species = ("Ath", "Brachy", "C_elegans", "Chlamy", "Danio", "E_coli", "Fragaria", "Glycine", "Human", "Maize", "Mouse", "Neurospora", "Oryza_sativa", "Physcomitreall", "Poplar", "P_persica", "Sacc_cerevisiae", "Sacc_pombe", "Selaginella", "Sorghum", "Synechosystis", "Vitis"); +my @species = all_species_array(); my $num_species = @species; for (my $i=0; $i<$num_species-1; $i++) { @@ -100,15 +93,15 @@ for (my $i=0; $i<$num_species-1; $i++) { # Confirmed with no output from print statement. my $species_1 = $species[$i]; my $species_2 = $species[$j]; - if ($species_1 lt $species_2) { - $species_1 = $species_1; - $species_2 = $species_2; - } else { - my $spec_temp = $species_1; - $species_1 = $species_2; - $species_2 = $spec_temp; - print "non optimal order\n"; - } + # if ($species_1 lt $species_2) { + # $species_1 = $species_1; + # $species_2 = $species_2; + # } else { + # my $spec_temp = $species_1; + # $species_1 = $species_2; + # $species_2 = $spec_temp; + # print "non optimal order\n"; + # }