[ <About> <Creating bioresources> <The bioresource predicate> <Remote bioresources> <Example bioconf> <Configuration> <More details> <TODO> ]

About

A bioresource is any file, database or URL containing biological data. Bioresources have some kind of access path, and can be given logical names. This makes it easier to refer to these resources - for example, if you wish to repeatedly use the gene_ontology.obo bioresource, you can associate a name (like go) to a path (the file path in your filesystem, or a URL)

Use of bioresources is optional, but they can make your life easier

Creating bioresources

When you install blip you will set up some standard bioresources (these may not be appropriate for your setup - when blip gets a final release the defaults will be standardised URLs). You will probably want to override these. You can do this by creating a bioconf file.

Your bioconf file will consist of prolog facts in the 'user' module. These facts use the predicate bioresource/2, bioresource/3 and bioresource/4.

Create a file bioconf.pro and place it somewhere accessible by all the users sharing the same configuration. We'll assume it's in your home dir for the purposes of this introduction

The bioresource predicate

The bioresource predicate names a bioresource, provides a path and the format of the resource.

Here is an example line from a bioconf.pro file:

user:bioresource(go,'/users/cjm/go/ontology/gene_ontology.obo'),obo).
          
This specifies a resource named 'go' in 'obo' format

To make full use of a bioconf file you should understand the SWI-Prolog predicate expand_file_search_path/2 (use the builtin SWI help system for more details). The blip bioresources system makes full use of this. For example, we can change the above to:

user:file_search_path(go, '/users/cjm/go/ontology').
user:bioresource(go,go('gene_ontology.obo'),obo).
          

Files can be in any format understood by blip (see for full list). Files can also be prolog factfiles. In these cases, the schema module must also be specified; for example:

user:bioresource(go,go('go.pro'),pro,ontol_db).
user:bioresource(words,datadir('words.pro'),pro,user).
            
There is no major advantage to explicitly specifying a prolog fact file if the original format is available - remember that the blip io system will take care of converting the original format to prolog fact file (ensuring the factfile is up to date with respect to the original file)

Remote bioresources

(experimental) - use the url term to specify a remote resource; eg:

user:bioresource(go,url('ftp://www.geneontology.org/pub/go/ontology/gene_ontology.org),obo).
            

Example bioconf

For guidance, look at the configuration in etc/bioconf.pro in the blip distribution.

Configuration

Create a file ~/.plrc (if you don't have one already). Add a line:

:- ['/users/cjm/bioconf.pro'].
          
(changing the path appropriately of course)

If you wish to split your conf over multiple files, do this:

:- multifile bioresource/3,bioresource/4.
:- ['/users/cjm/bioconf.pro'].
:- ['/users/cjm/bioconf_extra.pro'].
          

More details

See the io documentation

TODO

A later version of blip will have a set of standard bioresources defined as standard URLs. The URL mechanism will be improved so that local caches will be maintained on the user's machine. For now, users wishing to use bioresources should set them up themselves (which will entail downloading etc)