There is no need to create a new Bio::Root::Utilities.pm object whenthe :obj tag is used. This tag will import the static $Utilobject created by Bio::Root::Utilities.pm into your name space. Thissaves you from having to call new Bio::Root::Utilities.You are free to not use the :obj tag and create the object as youlike, but a Bio::Root::Utilities object is not configurable; any givenscript only needs a single copy.

Title : compress Usage : $Util->compress(filename, [tmp]); Purpose : Compress a file to conserve disk space. Example : $Util->compress("/usr/people/me/data.txt"); Returns : String (name of compressed file, full path). Argument : filename = String (name of file to be compressed, full path). : If the supplied filename ends with '.gz' or '.Z', : that extension will be removed before attempting to compress. : tmp = boolean, : If true, (or if user is not the owner of the file) : the file is compressed to a tmp file : If false, file is clobbered with the compressed version. Throws : Exception if file cannot be compressed : If user is not owner of the file, generates a warning : and compresses to a tmp file. : To avoid this warning, use the -o file test operator : and call this function with a true second argument. Comments : Attempts to compress using gzip (default compression level). : If that fails, will attempt to use compress. : In some situations, the full path to the gzip executable : may be required. This can be specified with the $GNU_PATH : package global variable. When installed, $GNU_PATH is an : empty string.

Usage : $object->create_filehandle(<named parameters>); Purpose : Create a FileHandle object from a file or STDIN. : Mainly used as a helper method by read() and get_newline(). Example : $data = $object->create_filehandle(-FILE =>'usr/people/me/data.txt') Argument : Named parameters (case-insensitive): : (all optional) : -CLIENT => object reference for the object submitting : the request. This facilitates use by : Bio::Root::IOManager::read(). Default = $Util. : -FILE => string (full path to file) or a reference : to a FileHandle object or typeglob. This is an : optional parameter (if not defined, STDIN is used). Returns : Reference to a FileHandle object. Throws : Exception if cannot open a supplied file or if supplied with a : reference that is not a FileHandle ref. Comments : If given a FileHandle reference, this method simply returns it. : This method assumes the user wants to read ascii data. So, if : the file is binary, it will be treated as a compressed (gzipped) : file and access it using gzip -ce. The problem here is that not : all binary files are necessarily compressed. Therefore, : this method should probably have a -mode parameter to : specify ascii or binary.

Title : month2num Purpose : Converts a string containing a name of a month to integer : representing the number of the month in the year. Example : $Util->month2num("march"); # returns 3 Argument : The string argument must contain at least the first : three characters of the month's name. Case insensitive. Throws : Exception if the conversion fails.

Title : num2month Purpose : Does the opposite of month2num. : Converts a number into a string containing a name of a month. Example : $Util->num2month(3); # returns 'Mar' Throws : Exception if supplied number is out of range.

Title : uncompress Usage : $Util->uncompress(filename, [tmp]); Purpose : Uncompress a file. Example : $Util->uncompress("/usr/people/me/data.txt.gz"); Returns : String (name of uncompressed file, full path). Argument : filename = String (name of file to be uncompressed, full path). : If the supplied filename does not end with '.gz' or '.Z' : a '.gz' will be appended before attempting to uncompress. : tmp = boolean, : If true, (or if user is not the owner of the file) : the file is uncompressed to a tmp file : If false, file is clobbered with the uncompressed version. Throws : Exception if file cannot be uncompressed : If user is not owner of the file, generates a warning : and uncompresses to a tmp file. : To avoid this warning, use the -o file test operator : and call this function with a true second argument. Comments : Attempts to uncompress using gunzip. : If that fails, will use uncompress. : In some situations, the full path to the gzip executable : may be required. This can be specified with the $GNU_PATH : package global variable. When installed, $GNU_PATH is an : empty string.

User feedback is an integral part of the evolution of this and other Bioperl modules.Send your comments and suggestions preferably to one of the Bioperl mailing lists.Your participation is much appreciated.

Methods beginning with a leading underscore are considered privateand are intended for internal use by this module. They arenot considered part of the public interface and are described herefor documentation purposes only.