Difference between revisions of "PhyloSoC:phyreport"
m (Added phyreport wiki.)
|Line 148:||Line 148:|
Latest revision as of 15:34, 3 March 2008
- 1 NAME
- 2 VERSION
- 3 SYNOPSIS
- 4 DESCRIPTION
- 5 COMMAND LINE ARGUMENTS
- 6 EXAMPLES
- 7 DIAGNOSTICS
- 8 CONFIGURATION AND ENVIRONMENT
- 9 DEPENDENCIES
- 10 BUGS AND LIMITATIONS
- 11 SEE ALSO
- 12 LICENSE
- 13 AUTHORS
- 14 HISTORY
phyreport.pl - Create a standard report for a PhyloDB database or tree
This documentation refers to phyreport version 1.0.
Usage: phyreport.pl -o PhyloDbReport.txt
REQUIRED ARGUMENTS: --dsn # The DSN string the database to connect to # Must conform to: # 'DBI:mysql:database=biosql;host=localhost' --dbuser # User name to connect with --dbpass # Password to connect with --outfile # Full path to output file that will be created. ALTERNATIVE TO --dsn: --driver # DB Driver "mysql", "Pg", "Oracle" --dbname # Name of database to use --host # Host to connect with (ie. localhost) ADDITIONAL OPTIONS: --tree # Name of the tree to report on # Otherwise generate report for all trees --quiet # Run the program in quiet mode. --verbose # Run the program in verbose mode. ADDITIONAL INFORMATION: --version # Show the program version --usage # Show program usage --help # Print short help message --man # Open full program manual
Generate a summary report for a tree or the entire PhyloDB database.
COMMAND LINE ARGUMENTS
- -d, --dsn
- The DSN of the database to connect to; default is the value in the environment variable DBI_DSN. If DBI_DSN has not been defined and the string is not passed to the command line, the dsn will be constructed from --driver, --dbname, --host
DSN must be in the form: DBI:mysql:database=biosql;host=localhost
- -u, --dbuser
- The user name to connect with; default is the value in the environment variable DBI_USER.
This user must have permission to create databases.
- -p, --dbpass
- The password to connect with; default is the value in the environment variable DBI_PASSWORD. If this is not provided at the command line the user is prompted.
- -o, --outfile
- The full path of the output file that will be created.
Alternative to --dsn
An alternative to passing the full dsn at the command line is to provide the components separately.
- The database host to connect to; default is localhost.
- The database name to connect to; default is biosql.
- The database driver to connect with; default is mysql. Options other then mysql are currently not supported.
- Node id to serve as the root for a subtree report. CURRENTLY NOT IMPLEMENTED.
- -q, --quiet
- Run the program in quiet mode. No output will be printed to STDOUT and the user will not be prompted for intput. CURRENTLY NOT IMPLEMENTED.
- Execute the program in verbose mode.
- Show the program version.
- Show program usage statement.
- Show a short help message.
- Show the full program manual.
Generate report for entire database
The following commands would generate a report for the entire biosql database. The results would be saved to BiosqlReprot.txt.
phyreport.pl -d 'DBI:mysql:database=biosql;host=localhost' -u name -p password -o BiosqlReport.txt
If the dsn, user name and password are defined as environmental variables then the following command would yield the same result.
phyreport.pl -o BiosqlReport.txt
Generate report for a single tree
The following would generate a report for the tree named cats in the database named biosql. The results would be saved to the text file CatsReport.txt
phyreport.pl -d 'DBI:mysql:database=biosql;host=localhost' -u name -p password -t cats -o CatsReport.txt
The error messages below are followed by descriptions of the error and possible solutions.
CONFIGURATION AND ENVIRONMENT
Many of the options passed at the command line can be set as options in the user's environment.
- User name to connect to the database.
- Password for the database connection
- DSN for database connection.
For example in the bash shell this would be done be editing your .bashrc file to contain:
export DBI_USER=yourname export DBI_PASS=yourpassword export DBI_DSN='DBI:mysql:database=biosql;host-localhost'
The phyimport.pl program is dependent on the following PERL modules:
- DBI - http://dbi.perl.org
- The PERL Database Interface (DBI) module allows for connections to multiple databases.
- DBD::MySQL - http://search.cpan.org/~capttofu/DBD-mysql-4.005/lib/DBD/mysql.pm
- MySQL database driver for DBI module.
- DBD::Pg - http://search.cpan.org/~rudy/DBD-Pg-1.32/Pg.pm
- PostgreSQL database driver for the DBI module.
- Getopt::Long - http://perldoc.perl.org/Getopt/Long.html
- The Getopt module allows for the passing of command line options to perl scripts.
- Bio::Tree - http://www.bioperl.org
- The Bio::Tree module is part of the bioperl package.
A RDBMS is also required. This can be one of:
BUGS AND LIMITATIONS
- Currently only stable with the MySQL Database driver.
- DSN string must currently be in the form: DBI:mysql:database=biosql;host=localhost
Please report additional problems to James Estill <JamesEstill at gmail.com>
The program phyreport.pl is a component of a package of comand line programs for PhyloDB management. Additional programs include:
- Initialize a PhyloDB database.
- Import trees into the PhyloDB database.
- Export tree data in PhyloDB to common file formats.
- Compute optimization values for a PhyloDB database.
- Modify an existing phylogenetic database by deleting, adding or copying branches.
This program may be used, distributed or modified under the same terms as Perl itself. Please consult the Perl Artistic License (http://www.perl.com/pub/a/language/misc/Artistic.html) for the terms under which you may use, modify, or distribute this script.
THIS SOFTWARE COMES AS IS, WITHOUT ANY EXPRESS OR IMPLIED WARRANTY. USE AT YOUR OWN RISK.
James C. Estill <JamesEstill at gmail.com>
Hilmar Lapp <hlapp at gmx.net>
William Piel <william.piel at yale.edu>