Index: src/hg/archaeStuff/scripts/make-browser-2.0
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/hg/archaeStuff/scripts/make-browser-2.0,v
retrieving revision 1.48
retrieving revision 1.49
diff -b -B -U 1000000 -r1.48 -r1.49
--- src/hg/archaeStuff/scripts/make-browser-2.0	22 Sep 2009 22:07:50 -0000	1.48
+++ src/hg/archaeStuff/scripts/make-browser-2.0	6 Oct 2009 17:35:09 -0000	1.49
@@ -1,563 +1,564 @@
 #! /usr/bin/perl -w
 
 # make-browser
 # written by Todd Lowe  http://lowelab.ucsc.edu/
 # automates creation of UCSC genome browsers and annotation tracks
 
 # CVS version tag
 # $Id$
 
 
 use strict;
 use CGI qw/:netscape :html3 :standard -noDebug/;
 use Getopt::Long;
 
 use archaeBrowser::Utils;
 use archaeBrowser::Constant;
 use archaeBrowser::Organism;
 use archaeBrowser::GenomeInfo;
 use archaeBrowser::ConservedDomains;
 use archaeBrowser::ProteinDb;
 use archaeBrowser::OrganismDb;
+use archaeBrowser::RemovePriv;
 use archaeBrowser::Track;
 use archaeBrowser::CDS;
 use archaeBrowser::Blat;
 use archaeBrowser::Blast;
 use archaeBrowser::ProteinStructure;
 use archaeBrowser::GenePrediction;
 use archaeBrowser::Operon;
 use archaeBrowser::ncRNA;
 use archaeBrowser::Regulation;
 use archaeBrowser::MultiAlignment;
 use archaeBrowser::PrecomputedTrack;
 use archaeBrowser::Repeats;
 use archaeBrowser::RNAStructure;
 use archaeBrowser::Annotation;
 use archaeBrowser::AlignmentCompare;
 
 
 # Global constants
 our $global_constants = archaeBrowser::Constant->new;
 
 # Utilities and error handling
 our $utils = archaeBrowser::Utils->new;
 $utils->error_log_file($global_constants->error_log_file());
 
 # Read private tracks
 #if ($global_constants->on_public() || $global_constants->on_archtest())
 #{
     $global_constants->ReadPrivateTracks($utils);
 #}
 
 # Organisms
 our $organism;
 our %organism_AR;
 our %org_abbr_AR;
 our %domain_ct_AR;
 our @org_list;
 
 # Module-sharing variable hash
 our %global_vars = (global_constants => $global_constants,
                     utils => $utils,
                     organism => \$organism,
                     organism_AR => \%organism_AR,
                     org_abbr_AR => \%org_abbr_AR,
                     domain_ct_AR => \%domain_ct_AR
                    );
 
 
 # Precomputed track data source files
 our $precomp_track_info = &Read_precomputed_tracks(\%global_vars);
 
 
 # Program option variables
 our ($opt_getseqs, $opt_joinassembly, $opt_initdb, $opt_hidedb, $opt_droptable, $opt_initblat, $opt_gc, $opt_repeats, $opt_iselements,
  $opt_desc, $opt_info, $opt_pfam, $opt_scanpfam, $opt_swissprot, $opt_pfamdesc, $opt_igenics,$opt_generefs,
- $opt_syncg,$opt_synct,$opt_syncd, $opt_syncc, $opt_syncdw, $opt_loaddump, $opt_allorg,$opt_snapshot, $opt_cleanblast,
+ $opt_syncg,$opt_synct,$opt_syncd, $opt_syncc, $opt_syncdw, $opt_loaddump, $opt_allorg,$opt_snapshot, $opt_removepriv,
  $opt_genes, $opt_gbhits, $opt_genepred, $opt_cogs, $opt_kegg, $opt_gbrnas, $opt_trnas, $opt_snornas,$opt_auth,
  $opt_rfam, $opt_tigr, $opt_jgi, $opt_easy, $opt_startblat, $opt_killblat, $opt_blatscript, $opt_selfz, $opt_multiz, $opt_ultracons,
  $opt_plfold, $opt_pldensity, $opt_custwig, $opt_wiki, $opt_wikibme, $opt_promsd, $opt_term, $opt_stringdb,
  $opt_arkops, $opt_tigrops, $opt_commit, $opt_perm, $opt_tracksup, $opt_altdb, $opt_primers,
  $opt_precomp, $opt_blastp, $opt_force, $opt_delete,$opt_web, $opt_public, $opt_all,
  $opt_makeblastdb, $opt_pubmultiz, $opt_cdd, $opt_blastpall, $opt_blastx, $opt_blastxall, $opt_mblastx, $opt_mblastxall, $opt_aligntracks,
  $opt_predictGenes, $opt_rrnablat, $opt_trnablat);
 
 
 
 # By default, we are not looking for any particular organism to start our work
 our $start_org          = '';
 our $found_org          = 1;
 
 
 
 # Main
 &Read_genome_info($global_constants->genome_info(), \%global_vars);       # default genome information
 &Read_genome_info($global_constants->genome_info_vir(), \%global_vars);   # default genome information for viruses
 &Read_genome_info($global_constants->genome_info_meta(), \%global_vars);  # metagenome information
 &Read_genome_info($global_constants->genome_info_mods(), \%global_vars);  # manual changes to genome info
 &Read_genome_info($global_constants->genome_info_euk(), \%global_vars);   # manual genome information for eukaryotes
 
 &Check_supported_org_list(\%org_abbr_AR,                                  # check support org list for typo's
               $global_constants->Supported_organisms());
 
 &Make_phylo_groups(\%global_vars);
 &Set_program_options();                                                   # command line options
 
 if ($opt_makeblastdb)
 {
     &Make_Blast_DBs(\%global_vars);
 }
 
 &Set_org_list();                                                          # set list of genomes to be processed
 
 # Cycle through genome list, running requested functions
 
 foreach my $org_abbr (@org_list)
 {
     $organism = $organism_AR{$org_abbr};
 
     &Set_vars_for_organism(\%global_vars);
 
     if (!$found_org)
     {
         if ($org_abbr eq $start_org)
         {
             $found_org = 1;
         }
         else
         {
             next;
         }
     }
 
     $utils->ResetError();
     $utils->org_name($organism->org_name());
 
     if ($opt_info)                 { $organism->Print_org_info($global_constants->gbdb_dir(), $global_constants->Supported_organisms());  }
     if ($opt_generefs)             { &Dump_generefs(\%global_vars); }
     if ($opt_getseqs)              { &Copy_seqs(\%global_vars); }
     if ($opt_joinassembly)         { &Join_assemblies(\%global_vars); }
     if ($opt_hidedb)               { &Hide_org_db(\%global_vars); }
     if ($opt_droptable ne '')      { &Drop_org_table(\%global_vars, $opt_droptable); }
 
     if (!-d $global_constants->cluster_data_dir()."/".$organism->db_name())
     {
         print "# Failed to complete run for ".$organism->org_menu_name()." (Db: ".$organism->db_name().")\n----------------------------\n";
         next;
     }
 
     if ($opt_loaddump)             { &Load_dbdump(\%global_vars); &Load_desc_page(\%global_vars); }
-    if ($opt_cleanblast)           { &Clean_blast_hits(\%global_vars); }
+    if ($opt_removepriv)           { &Remove_private_genome_hits(\%global_vars); }
     if ($opt_initdb)               { &Initialize_org_db(\%global_vars); }
     if ($opt_syncg)                { &Sync_genome_db(\%global_vars, "public"); }
     if ($opt_synct)                { &Sync_genome_db(\%global_vars, "test"); }
     if ($opt_syncd)                { &Sync_genome_db(\%global_vars, "dev"); }
     if ($opt_syncc)                { &Sync_genome_db(\%global_vars, "collab"); }
     if ($opt_syncdw)               { &Sync_genome_db(\%global_vars, "download"); }
     if ($opt_swissprot ne '')      { &Load_swissprot_db(\%global_vars, $opt_swissprot); }
     if ($opt_pfamdesc)             { &Load_pfam_desc(\%global_vars); }
     if ($opt_snapshot ne '')       { &Get_snapshot(\%global_vars, $opt_auth);      }
     if ($opt_initblat)             { &Load_blat_info(\%global_vars);    }
     if ($opt_startblat || $opt_all){ &Do_start_blat(\%global_vars);     }
     if ($opt_killblat)             { &Do_kill_blat(\%global_vars);      }
     if ($opt_blatscript)           { &Make_blat_script($organism); }
     if ($opt_gc || $opt_all)       { &Load_GC_track(\%global_vars);     }
     if ($opt_repeats || $opt_all)  { &Load_simple_repeats_track(\%global_vars); }
     if ($opt_iselements || $opt_all) { &Load_is_elements_track(\%global_vars);  }
     if ($opt_genes || $opt_all)    { &Load_cds_gene_track(\%global_vars);       }
     if ($opt_igenics || $opt_all)  { &Load_igenics(\%global_vars);       }
     if ($opt_gbhits || $opt_all)   { &Load_Genbank_hits(\%global_vars);         }
     if ($opt_term || $opt_all)     { &Load_terminator_tracks(\%global_vars);      }
     if ($opt_desc || $opt_all)     { &Load_desc_page(\%global_vars);   }
     if ($opt_cogs || $opt_all)     { &Load_COG_info(\%global_vars);     }
     if ($opt_kegg)                 { &Load_KEGG_info(\%global_vars);    }
     if ($opt_pfam || $opt_all)     { &Load_Pfam_track(\%global_vars);  }
     if ($opt_scanpfam)             { &Scan_Pfam_db(\%global_vars);     }
     if ($opt_gbrnas || $opt_all)   { &Load_gbRNA_track(\%global_vars);  }
     if ($opt_trnas || $opt_all)    { &Load_tRNA_track(\%global_vars);   }
     if ($opt_snornas)              { &Load_snoRNA_track(\%global_vars); }
     if ($opt_rfam || $opt_all)     { &Load_RFAM_track(\%global_vars);   }
     if ($opt_rrnablat)             { &Load_rRNA_Blat_track(\%global_vars); }
     if ($opt_trnablat)             { &Load_tRNA_Blat_track(\%global_vars); }
     if ($opt_tigr)                 { &Load_TIGR_gene_track(\%global_vars);     }
     if ($opt_jgi || $opt_all)      { &Load_JGI_gene_track(\%global_vars);      }
     if ($opt_stringdb || $opt_all) { &Load_StringDb_track(\%global_vars);      }
     if ($opt_easy || $opt_all)     { &Load_Easygene_track(\%global_vars);      }
     if ($opt_arkops || $opt_all)   { &Load_ArkinOperons(\%global_vars);        }
     if ($opt_tigrops || $opt_all)  { &Load_TIGR_Operons(\%global_vars);        }
     if ($opt_primers)              { &Load_precomp_tracks("primer", $precomp_track_info, \%global_vars); }
     if ($opt_promsd || $opt_all)   { &Load_precomp_tracks("promsd", $precomp_track_info, \%global_vars); }
     if ($opt_precomp ne '' || 
         $opt_all)                  { &Load_precomp_tracks($opt_precomp, $precomp_track_info, \%global_vars); }
     if ($opt_selfz || $opt_all)    { &Load_self_blastz_track(\%global_vars);   }
     if ($opt_multiz)               { &Load_multiz_track(\%global_vars, 0);   }
     if ($opt_pubmultiz)            { &Load_multiz_track(\%global_vars, 1);   }
     if ($opt_ultracons || $opt_all){ &Load_ultraConserved_track(\%global_vars);   }
     if ($opt_plfold)               { &Load_pl_dotplot_tracks(\%global_vars); }
     if ($opt_pldensity)            { &Load_pl_density_tracks(\%global_vars); }
     if ($opt_custwig)              { &Load_custom_wiggle_track(\%global_vars, $opt_custwig); }
     if ($opt_wiki)                 { &Load_wiki("wikiTrack", \%global_vars); }
 #    if ($opt_wiki)                 { &Load_wiki("wiki", \%global_vars); }
 #    if ($opt_wikibme)              { &Load_wiki("wikibme", \%global_vars); }
     if ($opt_aligntracks)          { &Load_align_genes_track(\%global_vars);   }
     if ($opt_cdd)                  { &Load_Conserved_Domains(\%global_vars)   }
-    if ($opt_blastp)               { &Load_BlastP_track(\%global_vars,"incremental");   }
-    if ($opt_blastpall)            { &Load_BlastP_track(\%global_vars,"full-rescan");   }
-    if ($opt_blastx)               { &Load_igenics(\%global_vars); &Load_BlastX_track(\%global_vars,"incremental");   }
-    if ($opt_blastxall)            { &Load_igenics(\%global_vars); &Load_BlastX_track(\%global_vars,"full-rescan");   }
-    if ($opt_mblastx)              { &Load_mBlastX_track(\%global_vars,"incremental");   }
-    if ($opt_mblastxall)           { &Load_mBlastX_track(\%global_vars,"full-rescan");   }
+    if ($opt_blastp)               { &Load_BlastP_track(\%global_vars,"incremental", 0);  }
+    if ($opt_blastpall)            { &Load_BlastP_track(\%global_vars,"full-rescan", 0);  }
+    if ($opt_blastx)               { &Load_igenics(\%global_vars); &Load_BlastX_track(\%global_vars,"incremental", 0); }
+    if ($opt_blastxall)            { &Load_igenics(\%global_vars); &Load_BlastX_track(\%global_vars,"full-rescan", 0);  }
+    if ($opt_mblastx)              { &Load_mBlastX_track(\%global_vars,"incremental", 0);  }
+    if ($opt_mblastxall)           { &Load_mBlastX_track(\%global_vars,"full-rescan", 0);  }
     if ($opt_predictGenes)         { &PredictGenes(\%global_vars);   }
     if ($opt_commit || $opt_all)   { &CVS_commit(\%global_vars);        }
     if ($opt_tracksup || $opt_all) { &Update_tracks(\%global_vars);     }
     if ($global_constants->Web_links_file() ne '')     { &Print_web_links($organism);   }
     if ($opt_perm)                 { &Set_permissions(\%global_vars);   }
 
     if (!$@)
     {
         print "# Completed run for ".$organism->org_menu_name()." (Db: ".$organism->db_name().", Abbr: $org_abbr)\n#----------------------------\n";
     }
 }
 
 
 #############
 ## End Main #
 #############
 
 
 sub Set_org_list
 {
     my @match_orgs;
     my $first_org = uc($ARGV[0]);
     my $tax_name_key = 'No information';
     my $org;
 
     $global_constants->Set_central_db();
     my $central_db = $global_constants->central_db();
 
     # If keyword "All" is used in species list, grab all previously analyzed
     # species
 
     if ($first_org eq "ALL")
     {
         my $db_name;
         my $all_db_list = `hgsql $central_db -s -e 'select * from dbDb' | awk '{print \$1}'`;
         $all_db_list =~ s/\n/ /g;
         foreach my $org_abbr (sort keys(%organism_AR))
         {
             $db_name = $organism_AR{$org_abbr}->db_name();
             if ($all_db_list =~ / $db_name /)
             {
                 push(@org_list,$org_abbr);
             }
         }
     }
     else
     {
         foreach my $cmd_line_org (@ARGV)
         {
             if ($cmd_line_org =~ /^START=(\S+)/)
             {
                 $start_org = $1;
                 $found_org = 0;
             }
             elsif ($cmd_line_org =~ /^TAX=(\S+)/)
             {
                 $tax_name_key = $1;
             }
 
             foreach my $org_abbr (sort keys(%organism_AR))
             {
                 $org = $organism_AR{$org_abbr};
 
                 # Add organism if the abbreviation is used (Pyro_aero) on the command line,
                 # if the database name is used, or a part of the full "Genus species" name
 
                 if (($org_abbr =~ /$cmd_line_org/) ||
                     ($org->org_name() =~ /$cmd_line_org/) ||
                     ($org->db_name() =~ /$cmd_line_org/))
                 {
                     push (@org_list,$org_abbr);
                 }
 
                 # Add if taxonomoy specificed within Archaea or
                 #  if it is in the Supported organisms list OR the over-ride
                 #  all-bact option is specified
 
                 elsif ($org->tax_ID() =~ / $tax_name_key[\;\.]/)
                 {
                     if (($org->tax_ID() =~ / Archaea;/) ||
                         ($org->tax_ID() =~ / Metagenome./) ||
                         ($org->tax_ID() =~ / Viruses;/) ||
                         $opt_allorg ||
                         ((defined $global_constants->Supported_organisms()->{$org->db_name()})))
                     {
                         push (@org_list,$org_abbr);
                     }
                 }
 
                 # Start multiple species selection with TAX= at this species
                 # Useful for re-starting up all-species analyses where it stops in middle
 
                 if (($org_abbr =~ /$start_org/) ||
                     ($org->org_name() =~ /$start_org/) ||
                     ($org->db_name() eq $start_org))
                 {
                     $start_org = $org_abbr;
                 }
             }
             $tax_name_key = '';
         }
     }
 
     if ($#org_list < 0)
     {
         print "\nError: No species were found with these keywords in the ",
         "genome info database.\nDid not do any work.\n\n";
             return (0);
     }
     return (1);
 }
 
 sub Print_choices
 {
     my $org_abbr;
     print("\nCurrent species available for analysis:\n\n");
     foreach $org_abbr (sort keys(%organism_AR))
     {
         print "$org_abbr:\t".$organism_AR{$org_abbr}->org_name()."\n";
     }
     print("\nFull list of abbreviations by Domain\n");
     print "Bacteria:\n";
     foreach $org_abbr (sort keys(%organism_AR))
     {
         if ($organism_AR{$org_abbr}->org_domain() eq "Bacteria")
         {
             print "$org_abbr ";
         }
     }
     print "\nArchaea:\n";
     foreach $org_abbr (sort keys(%organism_AR))
     {
         if ($organism_AR{$org_abbr}->org_domain() eq "Archaea")
         {
             print "$org_abbr ";
         }
     }
     print "\nEukaryota:\n";
     foreach $org_abbr (sort keys(%organism_AR))
     {
         if ($organism_AR{$org_abbr}->org_domain() eq "Eukaryota")
         {
             print "$org_abbr ";
         }
     }
     print "\nMetagenome:\n";
     foreach $org_abbr (sort keys(%organism_AR))
     {
         if ($organism_AR{$org_abbr}->org_domain() eq "Metagenome")
         {
             print "$org_abbr ";
         }
     }
     print("\n\n");
 }
 
 sub Read_web_links_info {
 
     my ($input_file) = @_;
     my $org_abbr = '';
 
     open(WEB_INFO,$input_file) ||
     die "Could not read $input_file web info data file.  Aborting.\n";
 
     while (my $line = <WEB_INFO>)
     {
         if ($line =~ /coords=\"(\S+)\".+hgGateway\?db=(\S+)\"/)
         {
             $org_abbr = $2;
             if (defined $org_abbr_AR{$org_abbr} && defined $organism_AR{$org_abbr_AR{$org_abbr}})
             {
                 $organism_AR{$org_abbr_AR{$org_abbr}}->image_ccords($1);
             }
         }
     }
 }
 
 sub Set_program_options
 {
     &Getopt::Long::Configure("bundling");
 
     $opt_altdb = '';
     $opt_web   = '';
     $opt_force = '';
     $opt_delete = '';
     $opt_custwig = '';
     $opt_droptable = '';
     $opt_snapshot = '';
     $opt_auth = '';
     $opt_precomp = '';
     $opt_swissprot = '';
 
-    Getopt::Long::GetOptions("getseqs","joinassembly", "initdb","hidedb","droptable=s","initblat","gc","gbhits","cleanblast",
+    Getopt::Long::GetOptions("getseqs","joinassembly", "initdb","hidedb","droptable=s","initblat","gc","gbhits","removepriv",
                  "repeats","iselements", "desc","info","generefs",
                  "pfam","scanpfam",
                  "genes","genepred","cogs","kegg","gbrnas","trnas","snornas","delete=s", "igenics",
                  "syncg","synct","syncd","syncc","syncdw","loaddump", "swissprot=s", "pfamdesc",
                  "rfam","tigr","jgi","easy","startblat","killblat","blatscript","selfz","multiz", "ultracons",
                  "stringdb",
                  "plfold","pldensity","custwig=s","wiki", "wikibme","promsd","term","arkops","tigrops","auth=s",
                  "commit","perm","tracksup","altdb=s","primers","precomp=s","snapshot=s",
                  "blastp","blastpall","blastx","blastxall","mblastx","mblastxall","force","web=s","public","all","allorg","makeblastdb", "pubmultiz",
                  "cdd", "aligntracks", "predictGenes", "rrnablat", "trnablat");
 
     if ($#ARGV < 0)
     {
     die "\nUsage: make-browser [-options] <Org-ident>\n\n",
     "       where <Org-ident> are one or more specifiers of the format:\n",
     "      (1) any substring of the full Genus & species name, in quotes (i.e. \"Pyrobaculum aerophilum\")\n",
     "      (2) a short Genu_spec abbreviation, 4 letters each (i.e. Pyro_aero)\n",
     "      (3) database name (i.e. pyrAer1)\n",
     "      (4) TAX=taxonomy group (i.e. TAX=Archaea, TAX=Crenarchaeota, TAX=Thermoprotei, or TAX=Pyrobaculum, etc.)\n",
     "      (5) START=org_name starts analysis of a list of organisms selected by TAX= at org_name\n",
     "                org_name can be specified in the form of (1),(2),or (3) above (i.e. START=pyrAer1, START=Pyrobaculum)\n\n",
     "          or use 'All' to run all previously established organism databases\n\n",
     "       or \"choices\" to see list of available species\n\n",
     "  Options: \n\n",
 
     "   DATABASE & FILE MAINTENANCE\n",
     "            --info      :  Print information about selected species in Genome-info-db/mods files\n",
     "            --getseqs   :  Get & format genome sequence files \n",
     "            --joinassembly   :  Format multiple-scaffold assemblies as a single genome \n",
     "            --initdb    :  Initialize organism database\n",
     "            --desc      :  Create basic description.html page (must run --genes first)\n",
     "            --hidedb    :  Delete organism from menu (but not data)\n",
     "            --droptable=<table> : Drop <table> from organism\n",
     "            --syncg     :  Synchronize /gbdb and mySql db for organism to public server\n",
     "            --synct     :  Synchronize /gbdb and mySql db for organism to testing server\n",
     "            --syncd     :  Synchronize /gbdb and mySql db for organism to development server\n",
     "            --syncc     :  Synchronize /gbdb and mySql db for organism to collaborative server\n",
     "            --syncdw    :  Synchronize /gbdb and mySql db for organism to download server\n",
     "            --swissprot=<MMDDYYYY> :  Load swissprot data with release date of <MMDDYYYY>\n",
     "            --pfamdesc  :  Load Pfam description table into proteome database\n",
     "            --initblat  :  Initialize db for Blat Servers\n",
     "            --startblat :  Start blat server (will not start if already running)\n",
     "            --killblat  :  Kill blat server for species\n",
     "            --blatscript:  Just print shell script to start servers, don't run anything\n",
     "            --makeblastdb: Re-load local blast databases for web blast server\n",
     "            --delete=(dbname1|dbname2|...) : Delete named database hits from blastp results\n",
     "            --commit  :  cvs commit changes to description.html front page\n",
     "            --perm    :  Set permissions to group-writeable for all files\n",
     "            --public  :  Required to update public genome server DB\n",
     "            --loaddump:  Load mySql database for organism onto current server (after running --syncg command)\n",
-    "            --cleanblast:  Clean blast hits to genomes that do not exist in centraldb\n",
+    "            --removepriv:  Remove hits to private genomes that do not exist in centraldb\n",
     "            --web=<file>  :  Print web links and image map info using coordinates from <file>\n",
     "            --snapshot <browser addr> :  Save an image snapshot of <browser addr> (i.e. archaea.ucsc.edu)\n",
     "            --auth <user:pass>        :  Used with --snapshot to authorize access to protected sites\n\n",
 
     "    TRACK CREATION\n",
     "            --force   :  Force reload of sequences & rerun of analyses\n",
     "            --all     :  Create/Load/Run all tasks (does not set --force)\n",
     "            --gc        :  Run G/C percent track\n",
     "            --repeats   :  Run simple repeats\n",
     "            --genes     :  Load primary gene track (i.e. Genbank Refseq or other)\n",
     "            --igenics   :  Load intergenic regions between CDS\n",
     "            --gbhits    :  Map sequenced genes & cDNAs in Genbank to genome\n",
     "            --promsd    :  Load precomputed promotor & Shine-Dalgarno tracks, if present\n",
     "            --precomp=<trackname> :  Load specified precomputed track (ex. insertionRegions, or 'all'), if present\n",
     "            --term      :  Load terminator poly-T track\n",
     "            --cogs      :  Load COG information\n",
     "            --pfam    :  Load PFAM information\n",
     "            --scanpfam:  Search all proteins with PFAM models (>12 hours per species)\n",
     "            --kegg    :  Load KEGG information\n",
     "            --gbrna   :  Load Genbank RNAs track\n",
     "            --trna    :  Load tRNAscan-SE track\n",
     "            --snorna  :  Load C/D guide snoRNAs track\n",
     "            --rfam    :  Load Rfam track\n",
     "            --rrnablat :  Load rRNA Blat hit track\n",
     "            --trnablat :  Load tRNA Blat hit track\n",
     "            --tigr    :  Load TIGR genes track\n",
     "            --jgi     :  Load JGI genes track\n",
     "            --easy    :  Load Krogh lab's EasyGene track\n",
     "            --predictGenes : Run Glimmer, GeneMark, and Prodigal gene finders\n",
     "            --blastp  :  Run blastp on all unscanned species' proteins\n",
     "            --blastpall :  Run blastp on ALL species' proteins (slow!)\n",
     "            --blastx  :  Run blastx on all unscanned species' proteins for intergenic regions between proteins\n",
     "            --blastxall :  Run blastx on All species' proteins for intergenic regions between proteins\n",
     "            --mblastx  :  Run blastx on all unscanned species' proteins for metagenomes with concatenated scaffolds\n",
     "            --mblastxall  :  Run blastx on All species' proteins for metagenomes with concatenated scaffolds\n",
     "            --primers :  Load available primer tracks\n",
     "            --arkops  :   Load operon info from Arkin microbesonline database\n",
     "            --tigrops :   Load operon info from OperonDB (TIGR)\n",
     "            --stringdb:   Load String DB links track (from EMBL)\n",
     "            --iselements   :  Load IS elements\n",
     "            --selfz  :    Create self-blastz alignment track\n",
     "            --multiz  :  Create multiZ alignment track\n",
     "            --pubmultiz  :  Create multiZ alignment track as public view\n",
     "            --ultracons : Create ultra-conserved alignment track\n",
     "            --plfold    :  Create RNAplfold dot plot tracks\n",
     "            --pldensity :  Create RNAplfold density tracks\n",
     "            --custwig=<string> : Create a wiggle track with the same name as prefix as string\n",
     "            --wiki     : Create genome browser wiki track\n",
 #    "            --wiki    : Create wiki tracks that link to Wikiea\n",
 #    "            --wikibme : Create wiki tracks that link to Wiki BME\n",
     "            --cdd     : Create NCBI Conserved Domains track\n",
     "            --aligntracks     : Create aligned genes track\n",
     "            --commit  :  cvs commit changes to description.html front page\n",
     "            --perm    :  Set permissions to group-writeable for all files\n",
     "            --public  :  Required to update public genome server DB\n",
     "            --tracksup:  Update tracks and search specs for current organism\n",
     "            --altdb=<string> : Update alternate track and seach spec db's named 'string' (i.e. 'pbac')\n",
     "\n";
     }
 
     $global_constants->Web_links_file($opt_web);
     $global_constants->force_refresh($opt_force);
     $global_constants->alt_browser($opt_altdb);
     $global_constants->delete_list($opt_delete);
     $global_constants->snapshot_addr($opt_snapshot);
 
     if ($opt_public)
     {
         if (!$global_constants->on_public() && !$global_constants->on_archtest() && !$global_constants->on_download())
         {
             die "Not on public/test web server.  Log into ".$global_constants->server_AR()->{public}." or ".
         $global_constants->server_AR()->{test}." and try again\n\n";
         }
         else
         {
             $global_constants->alt_browser("public");
             if ($opt_multiz)
             {
                 $opt_pubmultiz = 1;
                 $opt_multiz = 0;
             }
         }
     }
     else
     {
     if ($global_constants->on_public() || $global_constants->on_archtest() || $global_constants->on_download())
     {
         die "Must use --public when running on public or test server\n\n";
     }
     }
 
     if ($global_constants->on_collab() && $opt_altdb ne "" && $opt_multiz)
     {
 	$opt_pubmultiz = 1;
 	$opt_multiz = 0;
     }
 
     if (($global_constants->Web_links_file() ne '') && (-e $global_constants->Web_links_file()))
     {
         &Read_web_links_info($global_constants->Web_links_file());
     }
 
     if (uc($ARGV[0]) eq "CHOICES")
     {
         &Print_choices();
         exit(0);
     }
 
     umask "2";
 }

