[Bioperl-l] directory for config files

Heikki Lehvaslaiho heikki at ebi.ac.uk
Wed Apr 2 13:26:47 EST 2003


(You must be getting tired of my tirades. Sorry.) Seriously, it is
post.1.2.1, new things have to be discussed and added.


We should have directory under for config files and small data files.
Bioperl is already using one for the sequence database registry which is
bit of a special case as it is cross-platform project (see below) and
fetches its default file from the net. Normally, you'd have:

1. System wide default location     # populated by 'make install'? 
2. subdirectory under %HOME         # copied from  #1 and modified by 
                                    # user choices
3. ENV variable overriding the previous


The need to this file came from Martin Senger who that he'd like to add
a config file for his SOAPLab client and put it somewhere into the
distribution.

The other config files should follow the same location finding schema as
the registry file, but they are free from registry format limitations.
What I understood from Martin, is that he is planning to use directly
perl code as format since the file is read and written only by his
program.
 
The choise of format can be quite controversial, and perhaps we do not
have to decide anything on that. Two notes:
1. http://www.catb.org/%257Eesr/writings/taoup/html/ch05s02.html
2. YAML, www.yaml.org

Alternative to files in a distribution directory is to keep the data
inline and create the file into user's home directory when ranfor first
time.

Discuss.

	-Heikki



from doc/howto/BIODATABASE_ACCESS.txt:
#####################################################################
The registry file should be named seqdatabase.ini.  By default, it
should be installed in one of the following locations:

   $HOME/.bioinformatics/seqdatabase.ini
   /etc/bioinformatics/seqdatabase.ini

The Bio{Perl,Java,Python,Ruby} registry-handling code will initialize
itself from the registry file located in the home directory first,
followed by the system-wide default in /etc.

If a local registry file cannot be found, the registry-handling code
will take its configuration from the file located at this URL:

   http://www.open-bio.org/registry/seqdatabase.ini


MODIFYING THE SEARCH PATH

The registry file search path can be modified by setting the
environment variable OBDA_SEARCH_PATH.  This variable is a "+"
delimited string of files and URLs, for example:


OBDA_SEARCH_PATH=/home/lstein/seqdatabase.ini+http://foo.org/seqdatabase.ini

The search order proceeds from left to right.  The first file or URL
that is found ends the search.

#####################################################################

-- 
______ _/      _/_____________________________________________________
      _/      _/                      http://www.ebi.ac.uk/mutations/
     _/  _/  _/  Heikki Lehvaslaiho          heikki at ebi.ac.uk
    _/_/_/_/_/  EMBL Outstation, European Bioinformatics Institute
   _/  _/  _/  Wellcome Trust Genome Campus, Hinxton
  _/  _/  _/  Cambs. CB10 1SD, United Kingdom
     _/      Phone: +44 (0)1223 494 644   FAX: +44 (0)1223 494 468
___ _/_/_/_/_/________________________________________________________



More information about the Bioperl-l mailing list