#!/usr/bin/perl -w use strict; use warnings; use CGI; use CGI::Carp qw(fatalsToBrowser); use DBIx::Connector; #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"; 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 "Cnidbase: Comparative Evolutionary Genomics Database
"; 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/cnidpfam_search.html'},"Search Genomes"); print "

"; print "

"; print $cgi->p("Browse the following Pfam families. Click on a family name to search the Nematostella genome for that family. Click on description to be redirected to the Pfam database at the Sanger Institute to retieve additional information about this family."); print "

"; print $cgi->hr; print "
"; print "
"; print "

Help

"; 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 ""; print ""; print ""; # 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= 'cnidbase_pfam_search.cgi?name='. $name.''; { print ""; print ""; print ""; } } print "
Pfam NameDescriptionPfam Accession/Version
$name$description$accession/$version
"; 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;