Archive Ensembl HomeArchive Ensembl Home
Bio::EnsEMBL::Utils::ScriptUtils Class Reference

List of all members.

Class Summary




Definition at line 11 of file

Available Methods

protected Values _by_chr_num ()
public A commify ()
public directory_hash ()
public dynamic_use ()
public Boolean inject ()
public parse_bytes ()
public path_append ()
public List sort_chromosomes ()
public Boolean user_proceed ()

Method Documentation

protected Values Bio::EnsEMBL::Utils::ScriptUtils::_by_chr_num ( )
  Example     : my @sorted = sort _by_chr_num qw(X, 6-COX, 14, 7);
  Description : Subroutine to use in sort for sorting chromosomes. Sorts
                numerically, then alphabetically
  Return type : values to be used by sort
  Exceptions  : none
  Caller      : internal ($self->sort_chromosomes)
click to view
public A Bio::EnsEMBL::Utils::ScriptUtils::commify ( )
  Arg[1]      : Int $num - a number to commify
  Example     : print "An easy to read number: ".$self->commify(100000000);
                # will print 100,000,000
  Description : put commas into a number to make it easier to read
  Return type : a string representing the commified number
  Exceptions  : none
  Caller      : general
  Status      : stable
click to view
public Bio::EnsEMBL::Utils::ScriptUtils::directory_hash ( )

Undocumented method

click to view
public Bio::EnsEMBL::Utils::ScriptUtils::dynamic_use ( )

Undocumented method

click to view
public Boolean Bio::EnsEMBL::Utils::ScriptUtils::inject ( )
  Arg [1]    : String $classname - The name of the class to require/import
  Example    : $self->inject('Bio::EnsEMBL::DBSQL::DBAdaptor');
  Description: Requires and imports the methods for the classname provided,
               checks the symbol table so that it doesnot re-require modules
               that have already been required.
  Returntype : true on success
  Exceptions : Warns to standard error if module fails to compile
  Caller     : internal
click to view
public Bio::EnsEMBL::Utils::ScriptUtils::parse_bytes ( )

Undocumented method

click to view
public Bio::EnsEMBL::Utils::ScriptUtils::path_append ( )

Undocumented method

click to view
public List Bio::EnsEMBL::Utils::ScriptUtils::sort_chromosomes ( )
  Arg[1]      : (optional) Hashref $chr_hashref - Hashref with chr_name as keys
  Example     : my $chr = { '6-COX' => 1, '1' => 1, 'X' => 1 };
                my @sorted = $support->sort_chromosomes($chr);
  Description : Sorts chromosomes in an intuitive way (numerically, then
                alphabetically). If no chromosome hashref is passed, it's
                retrieve by calling $self->get_chrlength()
  Return type : List - sorted chromosome names
  Exceptions  : thrown if no hashref is provided
  Caller      : general
click to view
public Boolean Bio::EnsEMBL::Utils::ScriptUtils::user_proceed ( )
  Arg[1]      : (optional) String $text - notification text to present to user
  Example     : # run a code snipped conditionally
                if ($support->user_proceed("Run the next code snipped?")) {
                    # run some code
                # exit if requested by user
                exit unless ($support->user_proceed("Want to continue?"));
  Description : If running interactively, the user is asked if he wants to
                perform a script action. If he doesn't, this section is skipped
                and the script proceeds with the code. When running
                non-interactively, the section is run by default.
  Return type : TRUE to proceed, FALSE to skip.
  Exceptions  : none
  Caller      : general
click to view

The documentation for this class was generated from the following file: