Hello!

To see the file structure, click on "tree".

Note that updates take place every 10 minutes, commits may not be seen immediately.
Use subroutine to get species array and cleaned up unused code
authorelserj <elserj@localhost>
Tue, 21 Sep 2010 20:38:59 +0000 (20:38 +0000)
committerelserj <elserj@localhost>
Tue, 21 Sep 2010 20:38:59 +0000 (20:38 +0000)
svn path=/; revision=40

interactome_scripts/supercluster.pl

index bef30d95615e042897c3af6c6a8b6913fa8b00f0..66439a986d296cdc9c2c1195382d47bf8956622b 100755 (executable)
@@ -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";
+       #       }