mozdev.org

BioBar

resources:
Customizing biobar search menus

Customize your search menu

With version 1.3 of biobar it is possible to customize the search menu of the toolbar. The procedure involves editing an XML file and saving the file in your profile directory.


There are two files which can be edited to add additional search terms/menu's to your searches.

  1. BiobarSearch.xml - Provides the menu listing and URLs for producing the standard search menu (individual databases).
  2. BiobarGroups.xml - Provides the URLs and menu for 'Searching by Groups'  option, which can be chosen from options.

Before customizing the search menu, please copy these files to from the following links to your profile directory. Following these links will open up the XML file on your browser, please choose File-> Save Page As to save the files. Please do not rename these files !!

Copy these files over to your Profile Directory.

Locating your Profile Directory: From the main browser toolbar, choose Tools -> Biobar -> My Profile Directory. The information will be displayed to you in an alert box.

Editing BiobarSearch.xml:

Go to your profile directory using the paths above. Open the xml file in yoru favorite editor. This file has the following syntax:

<?xml version="1.0"?>
<biobar>
<Databases>
---
---
<Group type="Fungal">
<Database type="SGD">
<Menuitem name="QuickSearch" url="Some Search URL"/>
<Menuitem name-"...." url="....."/>
</Database>
</Group>
</Databases>
</biobar>

The Group definition indicates the main groups of search databases in the search menu. EBI, NCBI, Plant, Animal, Structure etc. Please add a group of your own and give it a unique name like <Group type="my menu">. Inside each group are databases each having a name. For example, under structure, we have databases like MSD, RCSB etc. Add your database under your group like <Database type="MyDatabase">. Under each Database are a set of searchterms you would like to search by followed by the URL leading upto the search.

For example if you want to search by Group (My Menu) having a database (MyDatabase) which has a searchitem and url, you would edit the XML file and add at the following:

<Group type="My Menu">
<Database type="MyDatabase">
<Menuitem name="Keyword" url="http://mydatabase.org/something.cgi?something=something&amp;keyword="/>
</Database>
</Group>

Where the the url is everything but the text you will actually search. Please note that each menuitem is terminated with a /. Please also note the format for ampersand. The items you add should be nested within the overall XML tree. Ideally you would add a new <Group> below a </Group>.

Please save the XML file in your profile directory. Check to see that the XML file is valid by opening this XML file in your browser. If it renders properly as a tree, then you have a valid XML. Else please correct the errors.

Once you have saved the XML file, restart your browser, and the new search menu containing the search database you added will show up in the Search Window. You will also be able to choose the new database/s as a default from the options window.

Editing BiobarGroups.xml:

Save BiobarGroups.xml in your profile directory as described above. Open this file for editing your favorite browser. This file has a format similar to that showb below:

<?xml version="1.0"?>
<biobarGroups>
<Group name="Structures">
<Menuitems>
<Menuitem SearchTerm="PDB ID">
<url>http://www.ebi.ac.uk/msd-srv/atlas?toolbar=biobar&amp;id=</url>
<url>http://oca.ebi.ac.uk/oca-bin/ocaids?toolbar=biobar&amp;id=</url>
<url>http://www.rcsb.org/pdb/cgi/explore.cgi?toolbar=biobar&amp;pdbId=</url>
<url>http://www.ebi.ac.uk/thornton-srv/databases/cgi-bin/pdbsum/GetPage.pl?toolbar=biobar&amp;pdbcode=</url>
</Menuitem>
</Menuitems>
</Group>
</biobarGroups>

Each Group described a search Type (Structures, Function, Taxonomy etc). Each search Type has a set of searchTerms associated with the searchType. For example, one could search all structrual databases for PDB code, keyword, author etc. For each searchTerm, there are a set of URLs which describe the full command needed for searching.

If you wanted to add your own searchType (say Sequences) containing searchTerms Author, Keyword etc, you would have to add a new Group with a tree like:



<Group name="Sequences">
<Menuitems>
<Menuitem SearchTerm="Keyword">
<url>SomeURL containing the whole path</url>
<url></url>
</Menuitem>
<Menuitem SearchTerm+"Author">
<url></url>
<url></url>
</Menuitem>
</Menuitems>
</Group>

Once you have made the changes, save the file as BiobarGroups.xml in your profile area. Check that the XML file is valid by opening the file in your browser. Restart your browser. If you chose the 'Search Groups' in the biobar options window, then your database will show up.


The biobar project can be contacted through the mailing list or the member list.
Copyright © 2000-2017. All rights reserved. Terms of Use & Privacy Policy.