Module: bbcflib.frontend

This module provides access to Fabrice David’s frontend code for deploying web interfaces to workflows. It provides a class Frontend which handles connections, and which returns objects of type Job when queried.

A Frontend object must be given either a URL to the frontend, such as http://htsstation.epfl.ch/rnaseq/, or a ConfigParser object defining the field frontend_url in the appropriate section.

Basic usage is to create a Frontend object, then call its job method with a job key.:

f = Frontend(url='http://htsstation.epfl.ch/rnaseq/')
j = f.job(14)
class bbcflib.frontend.Frontend(url=None, config=None, section='frontend')[source]

Connection to Fabrice David’s web frontends for workflows.

A Frontend object either takes url to connect to, or a ConfigParser given as the config keyword argument (and optionally a section keyword argument defaulting to "frontend".

If a config argument is given, it reads the field frontend_url from the configuration. If both the url and config arguments are given, url overrides config.

class bbcflib.frontend.Job(id, created_at, key, assembly_id, description, email, options)[source]

An object specifying a workflow job.

The fields are:

  • id (int)
  • created_at (str)
  • key (str)
  • assembly_id (str)
  • description (str)
  • email (str)
  • groups (dict)
  • options (dict)

groups is a dictionary of the form {'id':group_id, 'name':group_name, 'runs':{runs_info}}.

class bbcflib.frontend.Frontend(url=None, config=None, section='frontend')[source]

Connection to Fabrice David’s web frontends for workflows.

A Frontend object either takes url to connect to, or a ConfigParser given as the config keyword argument (and optionally a section keyword argument defaulting to "frontend".

If a config argument is given, it reads the field frontend_url from the configuration. If both the url and config arguments are given, url overrides config.

job(key)[source]

Fetch information about job key as a Job object.

class bbcflib.frontend.Job(id, created_at, key, assembly_id, description, email, options)[source]

An object specifying a workflow job.

The fields are:

  • id (int)
  • created_at (str)
  • key (str)
  • assembly_id (str)
  • description (str)
  • email (str)
  • groups (dict)
  • options (dict)

groups is a dictionary of the form {'id':group_id, 'name':group_name, 'runs':{runs_info}}.

add_group(id, name, group=None)[source]

Add info on the group to self.groups. If a dictionary group is given, self.groups is updated with the info it contains.

add_run(**kwargs)[source]

Add info on the run to a specified group info in self.groups. Mandatory keyword args are: group_id, id (run ID). All others will be added as complementary info to the dictionary describing the run.

bbcflib.frontend.parseConfig(file, job=None, gl=None)[source]

Constructs or updates a Job object from parsing a text config file with ConfigObj.

Previous topic

<no title>

Next topic

Module: bbcflib.genrep

This Page

Websites