Bio-Maxd

 view release on metacpan or  search on metacpan

lib/Bio/Maxd.pm  view on Meta::CPAN

}

sub _error {
  my($errnum,$errval)=@_;
  print STDERR "Error $errnum: $errval\n";
  return 0;
}

1;
__END__
=head1 NAME

Bio::Maxd - Perl extension for storing and retrieving data from maxd

=head1 SYNOPSIS

  use Bio::Maxd;
  my $maxd_db = new Bio::Maxd (-user=>'user', -pass=>'pass', 
                               -host=>'host', -dbase=>'database');
  $maxd_db->load_file(-file=>'path_to_data_file',
                  -experiment=>'experimentName', -array_type=>'geneChipName');
  $maxd_db->disconnect();

=head1 DESCRIPTION

B<Bio::Maxd> provides methods for uploading and retrieving
data to/from a maxd (MySQL) database.

"maxd" is a data warehouse and visualization environment for microarray
expression data developed by the Microarray Group at
Manchester Bioinformatics (http://www.bioinf.man.ac.uk/microarray/)

=head2 Bio::Maxd METHODS

B<new()>, This is the constructor for B<Bio::Maxd>.

 my $maxd_db = new Bio::Maxd();

This is the constructor for B<Bio::Maxd>. 
It establishes a database connection, or session, to the requested database.
Parameters:

=over 4

=item B<-user> and B<-pass>, default to $ENV{'MAXD_USERID'} with user/password.

=item B<-host>, defaults to $ENV{'MAXD_DBHOST'}, hostname or "localhost".

=item B<-dbase>, defaults to 'maxd'.

=item B<-verbose>, defaults to false.

=back

B<load_file()>, Parses and loads a datafile into a maxd database.. 

=over 4

=item B<-file>, datafile to parse.

=item B<-format>, data file format; Bio::Maxd will guess it, if not provided. 
Valid values are 'AFF' (Affimetrix matrics file)

=item B<-experiment>, Experiment ID or Experiment name.

=item B<-array_type>, ArrayType ID or ArrayType name

=back

B<export()>, Exports data from maxd database..

=over 4

=item B<-verbose>, reports activity.

=item B<-format>, desired format for the data to be exporte to. Valid values are 'GeneSpring'.

=item B<-submitter>, submitter name or id.

=item B<-experiment>, experiment name or id.

=item B<-array_type>, array name, i.e. 'HG-U95A2'

=item B<-repository_URL>, where to install files.

=item B<-image>, image name or id.

=item B<-hybridisation>, hybridisation name or id.

=back

=head1 MISCELLANEOUS

B<version()> Returns Bio::Maxd version

B<$ENV{'MAXD_USERID'}>, contains userid/password

B<$ENV{'MAXD_HOSTDB'}>, contains database host

B<$ENV{'MAXD_TEMPLATES'}>, directory for export templates

=head1 EXAMPLES

  use Bio::Maxd;
  my $maxd_db = new Bio::Maxd (-user=>'user', -pass=>'pass',
                               -host=>'host', -dbase=>'database');
  $maxd_db->load_file(-file=>'path_to_data_file',
                  -experiment=>'experimentName', -array_type=>'geneChipName');
  $maxd_db->disconnect();

See the 'examples' directory in the distribution for scripts loadData and exportData

=head1 EXPORT

None by default.

=head1 KNOWN BUGS

None, but that does not mean there are not any.

=head1 COPYRIGHT



( run in 1.544 second using v1.01-cache-2.11-cpan-39bf76dae61 )