--- Attributes.html 2005/10/22 17:43:49 1.7 +++ Attributes.html 2006/06/13 23:32:15 1.8 @@ -47,9 +47,9 @@
  • Now choose WIDTH from the same pull down menu, and click show spreadsheet. Because width is a numeric variable, I grouped these key/value pairs in 1/10ths of the maximum. If you look at the Color Descriptions box you will see ranges (this is not perfect at the moment, but it is on the way).
  • -
  • Now reset the WIDTH pull-down menu to empty (the first option in the list), and choose PIRSF from the menu labelled "color columns by each PEGs attribute" and click show spreadsheet. This is the same as before, but hopefully we can add more keys here and color other things.
  • +
  • Now reset the WIDTH pull-down menu to empty (the first option in the list), and choose structure from the menu labelled "color columns by each PEGs attribute" and click show spreadsheet. This is the same as before, but hopefully we can add more keys here and color other things.
  • -
  • From one of the PEGs that is colored as having a PIRSF link click on the link to get to the protein page. There is the attributes box (as before), and a new "Edit Attributes" button. When you click this, you will get three fields, key, value, and URL. If you go to a protein that does not have any attributes yet, you still get the edit box to let you add some attributes.
  • +
  • From one of the PEGs that is colored as having a structure link click on the link to get to the protein page. There is the attributes box (as before), and a new "Edit Attributes" button. When you click this, you will get three fields, key, value, and URL. If you go to a protein that does not have any attributes yet, you still get the edit box to let you add some attributes.
  • @@ -177,8 +177,8 @@ [fid, key, value, url]

    You can request an E. coli key like this $fig->get_attributes('83333.1');

    -

    You can request any PIRSF key like this -$fig->get_attributes('', 'PIRSF');

    +

    You can request any "structure" key like this +$fig->get_attributes('', 'structure');

    You can request any google url like this $fig->get_attributes('', '', '', 'http://www.google.com');

    NOTE: If there are no attributes an empty array will be returned. You need to check for this and not assume that it will be undef.

    @@ -193,7 +193,7 @@ value optional URL to add optional file to store the attributes in. -

    A note on file names. At the moment the file assigned_attributes is used to store new attributes by default, and load_attributes loads that file last so any changes will overwrite existing keys. However this is not quite true since we can now have multiple key/values for a single peg. Using this method you can define a filename to store the attributes in. The directory structure will be figured out for you, so you can use something like ``pirsf'' as the file name.

    +

    A note on file names. At the moment the file assigned_attributes is used to store new attributes by default, and load_attributes loads that file last so any changes will overwrite existing keys. However this is not quite true since we can now have multiple key/values for a single peg. Using this method you can define a filename to store the attributes in. The directory structure will be figured out for you, so you can use something like ``structure'' as the file name.

    delete_attribute

    @@ -223,7 +223,7 @@

    erase_attribute_entirely

    This method will remove any notion of the attribute that you give it. It is different from delete as that just removes a single attribute associated with a peg. This will remove the files and uninstall the attributes from the database so there is no memory of that type of attribute. All of the attribute files are moved to FIG_Tmp/Attributes/deleted_attributes, and so you can recover the data for a while. Still, you should probably use this carefully!

    I use this to clean out old PIR superfamily attributes immediately before installing the new correspondence table.

    -

    e.g. my $status=$fig->erase_attribute_entirely(``pirsf'');

    +

    e.g. my $status=$fig->erase_attribute_entirely(``structure'');

    This will return the number of files that were moved to the new location

    @@ -232,7 +232,7 @@

    Without any arguments:

    Returns a reference to a hash, where the key is the type of feature (peg, genome, rna, prophage, etc), and the value is a reference to a hash where the key is the key name and the value is a reference to an array of all features with that id.

    e.g.

    -

    print ``There are '' , scalar @{{$fig->get_keys}->{'peg'}->{'PIRSF'}}, `` PIRSF keys in the database\n'';

    +

    print ``There are '' , scalar @{{$fig->get_keys}->{'peg'}->{'structure'}}, `` Structure keys in the database\n'';

    my $keys=$fig->get_keys; foreach my $type (keys %$keys) { @@ -265,9 +265,9 @@

             $fig->get_values('peg'); # will get all values for pegs
    -        $fig->get_values('peg', 'pirsf'); # will get all values for pegs with attribute pirsf
    + $fig->get_values('peg', 'structure'); # will get all values for pegs with attribute structure
    -        $fig->get_values(undef, 'pirsf'); # will get all values for anything with that attribute
    + $fig->get_values(undef, 'structure'); # will get all values for anything with that attribute

    key_info