Hello!

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

Note that updates take place every 10 minutes, commits may not be seen immediately.
Switch to using dbconnect method from DbiFloret module
authorelserj <elserj@localhost>
Wed, 6 Jul 2011 23:53:02 +0000 (23:53 +0000)
committerelserj <elserj@localhost>
Wed, 6 Jul 2011 23:53:02 +0000 (23:53 +0000)
svn path=/; revision=113

interactome_scripts/supercluster.pl

index 4425ee5303ddc675a6b36a73ae534eacd0742375..d30dbef525c34c37fc90ee88d2763da4ae38bbea 100755 (executable)
@@ -23,7 +23,11 @@ use warnings;
 use strict;
 
 use DBI;
-use Term::Screen::ReadLine;
+use Term::ReadKey;
+
+use lib "$ENV{HOME}/scripts/jaiswallab/interactome_scripts";
+
+use DbiFloret;
 
 if(-e "$ENV{HOME}/scripts/jaiswallab/interactome_scripts/find_species.pl") {
        require "$ENV{HOME}/scripts/jaiswallab/interactome_scripts/find_species.pl";
@@ -31,33 +35,15 @@ if(-e "$ENV{HOME}/scripts/jaiswallab/interactome_scripts/find_species.pl") {
        require "$ENV{HOME}/bin/find_species.pl";
 }
 
-# define the database handle to be used 
-
-my $screen = Term::Screen::ReadLine->new();
-       # clear the screen
-       $screen->clrscr;
-       # ask for username
-       $screen->at(0,0)->puts("Username: ");
-       my $username = $screen->readline(ROW => 0, COL=>11);
-
-       # ask for password, replace character presses with stars
-       $screen->at(1,0)->puts("Password: ");
-       my $password = $screen->readline(ROW => 1, COL => 11, PASSWORD => 1);
+my $dbh = DbiFloret::dbconnect;
        
-       # Ask for the minimum score for the paralogy cutoff
-       $screen->at(2,0)->puts("Minimum paralogy score: ");
-       my $min_score = $screen->readline(ROW => 2, COL => 24);
-
-       $screen->at(3,0);
-       undef $screen;
+print "Minimum paralogy score: ";
+chomp(my $min_score = <STDIN>);
        
 if($min_score eq "") {
        $min_score = 0;
 }
-       
-my $dbh = DBI->connect('DBI:mysql:inparanoid_data;host=floret.cgrb.oregonstate.edu', $username, $password,
-       { RaiseError=> 1, AutoCommit=>1 }
-       ) or die "Failed to connect to database: $DBI::errstr";
+
        
        
 #### Note to self ####
@@ -83,8 +69,8 @@ my $super_id = 0; #initialize the super cluster id
 my %super_hash;
 my %big_count_hash;
        
-#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 @species  = ("Arabidopsis_lyrata", "Arabidopsis_thaliana", "Carica_papaya", "Citrus_clementina", "Citrus_sinensis", "Eucalyptus_grandis", "Fragaria_vesca", "Malus_domestica", "Oryza_sativa", "Populus_trichocarpa", "Prunus_persica", "Vitis_vinifera");
+#my @species = all_species_array();
 my $num_species = @species;
 
 for (my $i=0; $i<$num_species-1; $i++) {