#!/usr/bin/perl -w use strict; use warnings; use CGI; use CGI::Carp qw(fatalsToBrowser); use DBIx::Connector; #use GD; #use GD::Graph::bars; #use GD::Graph::colour; #my $dbc = new DBIx::Connector(-realm => 'stellabase'); my $q; my $cgi; $cgi = new CGI; my $dbc; # set up information to connect to database my $data_source = "DBI:mysql:stellabase"; my $user = "stellabase"; my $password = "stellabase"; # connect my $dbh = DBI->connect($data_source, $user, $password) or die "Can't connect to $dbc: $DBI::errstr"; #my $dbh = $dbc->connect() #or die "Can't connect to $dbc: $DBI::errstr"; print $cgi->header('text/html'); print $cgi-> start_html ( -title=>'Query Results', -author=>'jawatson@bu.edu', -meta=>{'keywords'=>'DBI', 'description'=>"Query Results"}, -BGCOLOR=>'#ffffff', -alink=>'#ff0000', -vlink=>'#cc99ff', -link=>'#9900ff', -MARGINHEIGHT=>0, -MARGINWIDTH=>0, -TOPMARGIN=>5, -LEFTMARGIN=>5); # create local variables for receiving the data my $name; my $description; my $accession; my $version; my $sth; print "
![]() | ";
print "";
print "![]() | ";
print "
";
print $cgi->a({-href=>'http://www.stellabase.org/index.html'},"Home");
print " - ";
print $cgi->a({-href=>'http://www.stellabase.org/html/about.html'},"About");
print " - ";
print $cgi->a({-href=>'http://www.stellabase.org/html/gene_search.html'},"Gene Search");
print " - ";
print $cgi->a({-href=>'http://cnidbase.bu.edu/?show_expression_search=1&org=3'},"Gene Expresssion Search");
print " - ";
print $cgi->a({-href=>'http://www.stellabase.org/html/primer_lib_search.html'},"Primer Library Search");
print " - ";
print $cgi->a({-href=>'http://www.stellabase.org/html/gen_stock.html'},"Genetic Stock Search");
print " - ";
print $cgi->a({-href=>'http://www.stellabase.org/htdig/search.html'},"Literature Search");
print " - ";
print $cgi->a({-href=>'http://www.stellabase.org/blast/blast_cs.html'},"Blast");
print "
";
print $cgi->a({-href=>'http://www.stellabase.org/html/dump_primers.html'},"Add Primers");
print " - ";
print $cgi->a({-href=>'http://www.stellabase.org/html/dump_stock.html'},"Add Stock");
print " - ";
print $cgi->a({-href=>'http://www.stellabase.org/html/dump_notes.html'},"Add Notes About a Gene");
print " - ";
print $cgi->a({-href=>'http://www.stellabase.org/html/cnidbase_proteomes.html'},"Compare Genomes");
print " - ";
print $cgi->a({-href=>'http://www.stellabase.org/html/cnidbasepfam_search.html'},"Search Genomes");
print "
"; print ""; print ""; print $cgi->hr; print "
"; $q = qq{SELECT name, description, accession, version from pfam;}; my $sth = $dbh->prepare($q) or die "Can't prepare statement: $DBI::errstr"; my $rc = $sth->execute; #headings to table print ""; print "
"; die $sth->errstr if $sth->err; print $cgi->br; print $cgi->hr; print "Questions, comments, suggestions: "; print $cgi->a({-href=>'mailto:busully@bu.edu'},'busully@bu.edu '); $dbh->disconnect; print $cgi->end_html;"; # loop through rows of data and print them while (($name, $description, $accession, $version) = $sth->fetchrow_array) { my $pfam=$accession; my $url1= 'http://www.sanger.ac.uk/cgi-bin/Pfam/getacc?'.$pfam.''; my $url2= 'stellapfam_search.cgi?name='. $name.''; { print " Pfam Name "; print "Description "; print "Pfam Accession/Version "; } } print " $name "; print "$description "; print "$accession/$version