I have added attributes to the database in a more significant way. This page is to document those attributes and ways to access/modify them. The page has two sections, a non-technical section for general discussion and overview, and a technical section for behind-the-scenes type information.

Most people should read the first section and ignore the second section.

A comment on nomenclature: I use the term tag/value pairs and attributes interchangeably. Something can have an attribute, and you have to say what that is and what its value is. We also have an idea that an attribute can be a URL, and if so, it should be presented as a URL. So we actually have tag, value, value. You will see this in action. The third element is called URL, but we always check and make sure that it begins http before turning it into a URL, and so we reserve the option of renaming this and making it something else. That will be mentioned here.

Non-technical Section

We have extended the notion of tag/value pairs beyond things associated with a peg and into the arena of anything. Any feature such as peg, prophage, rna, insertion element, and so on, can have a tag value pair associated with it. In addition, genomes have tag/value pairs associated with them. In this sense, we can annotate the organisms from which the genomes were derived and begin to ask complex questions of the type "show me all organisms that are motile but don't have any flagellar genes". We are working on this interface.

You can easily see the tag value pairs in action in the following places:

  1. The protein page. Any of the attributes shown with a URL is really a tag value pair. More complex editing of those attributes will follow.
  2. The genome statistics page. Take a look at the updated statistics page. There is also an option to edit (and add) the attributes associated with a genome.
  3. The spreadsheet page. You can color by PIRSF, and more will be coming, soon.

Technical stuff

Rightly or wrongly I moved some of the methods in associated with attributes. I also renamed a couple of them. The old names are still valid, they are just pointers to the new routines. Apparently nothing breaks, but let me know if it does.

There are now four base methods for handling attributes:

  1. add_attribute - to add a new attribute to an object
  2. delete_attribute - to remove an existing attribute from an object
  3. change_attribute - to modify an existing attribute
  4. get_attributes - to get attributes for an object

In addition, there are some methods that make specific calls I am using:

  1. get_tags - get tags for either all known objects or a selected type of object (peg, rna, genome, etc)