-
Construction of Hyperlinks to Protein Explorer
- Demonstration Page of Hyperlinks that
Prespecify Molecules.
- Two URL's in Each Hyperlink.
A hyperlink to Protein Explorer (PE) which prespecifies a molecule
(PDB file) actually contains two URL's
- URL to PE, or PE-URL
- URL to PDB file, or PDB-URL
The general form of the hyperlink is
<a href="PE-URL?id=PDB-URL&">
Link Description</a>
or for the Comparator
<a href="PE-URL?id=PDB1-URL&id2=PDB2-URL&">
Link Description</a>
For example, the href
http://www.umass.edu/microbio/chime/explorer/pe.htm?id=http://www.umass.edu/microbio/chime/shared/1d66.pdb&
is used in this hyperlink
1d66 from UMass in Protein Explorer from UMass.
Never* use a target in the anchor! Use of a target defeats the
ability to have multiple PE windows running concurrently.
<a href="...">correct anchor format</a>
<a href="..."
target="window_name">INCORRECT anchor format</a>
*There is one exception: When making a hyperlink to PE
version 1.0 on an RCSB (or RCSB mirror) server, you should
use a target.
- Terminology:
explorer
means same as
protexpl.
The original folder/directory containing PE at UMass was named
explorer and that name
has been kept to avoid breaking hyperlinks and bookmarks. It is now recommended
that all new installations of PE be put in a folder named
protexpl to avoid confusion with
the Microsoft Windows desktop operating system, which is named explorer.
The downloadable package for PE was named explorer.exe but a file
of this name inadvertantly placed in C:\ prevents Windows from booting!
Therefore the downloadable PE package is now named protexpl.exe;
the folder into which it is unpacked should be named
protexpl to minimize confusion.
- General Formatting Rules for Hyperlinks
The following numbered list summarizes the general formatting rules.
More details are given below for some cases.
- When the source of the PDB file(s) is the Protein Data Bank,
the PDB-URL should give only the four-character PDB ID ("pid") code(s).
For example, the URL will end in
/protexpl/pe.htm?id=pid1&
for the Explorer, and in
/protexpl/pe.htm?id=pid1&id2=pid2&
for the Comparator.
If the PE-URL specifies one of the Protein Data Bank servers or mirrors, the
PDB files will automatically be fetched from the same location.
When the PE-URL specifies a local installation, or a non-PDB server,
this type of 4-character specification allows each client
to set, as a PE preference, their preferred PDB mirror site from which
the PDB files will be fetched via Internet.
- When the source of the PDB file(s) is not the Protein Data Bank,
the URL must be given for each PDB. Thus, the hyperlink will be
of the form
/protexpl/pe.htm?id=url1&
for the Explorer, and
/protexpl/pe.htm?id=url1&id2=url2&
for the Comparator.
- When the PDB-URL begins with http:// (or ftp://)
the
colon
must be escaped to
%3A
and if the PDB URL contains a query parameter, the
question mark
must be escaped to
%3F.
Do not escape slashes or the equals sign.
Moreover, when there are several query parameters,
the PDB filename must be the last item at the end of the PDB URL.
For example if the PDB-URL is
http://pqs.ebi.ac.uk/pqs-bin/macmol-chime.pl?filename=1hho.mmol
then a hyperlink would have this form
http://www.umass.edu/microbio/chime/protexpl/pe.htm?id=http%3A//pqs.ebi.ac.uk/pqs-bin/macmol-chime.pl%3Ffilename=1hho.mmol&
-
Relative PE-URL's may begin with
two dots,
such as "../shared/1d66.pdb".
These are taken to be relative to the source of PE itself; namely,
the protexpl folder/directory.
If PE is coming from a server, relative URL's designate files on the
server. If PE is coming from an installation on the local hard disk,
relative URL's designate files on the local hard disk.
Example:
/protexpl/pe.htm?id=../shared/1d66.pdb&
- Windows only:
in PDB-URL's designating files on the local hard disk,
colons
following the
disk drive letters
should be changed to vertical bars (change C: to C|). This is
not always necessary but the colon doesn't always work in earlier versions
of Netscape. (The colons in http:// and file:/// should remain as colons.)
Example:
http://www.umass.edu/microbio/chime/explorer/pe.htm?id=c|/pdb_files/1b07.pdb&
- Windows only:
in references to PDB files on the local hard disk,
backslashes delimiting folder names should be
changed to foreslashes, e.g. c:\chime\protexpl should be given as
c|/chime/protexpl. See complete example under previous paragraph.
- Macintosh only: colons which delimit
folder names should be changed to slashes.
For example, "Macintosh HD:Chime:protexpl" should be given as "Macintosh HD/Chime/protexpl".
- Filenames ending in .pdb:
URL's ending in .pdb confuse Windows Netscape when the URL references
a local file; therefore you should add
an amperesand (&) to the end of any such URL. Thus a url ending in .pdb
will not work in all cases while one ending .pdb& does.
- PDB ID codes
PDB ID codes are 4-character codes which uniquely identify all
structures available from the Protein
Data Bank. 4-character molecule identifiers are taken by the
Protein Explorer/Comparator (PE) to be PDB ID
codes; PE offers to fetch the PDB files via Internet from the Protein
Data Bank. The files are actually fetched from whichever PDB mirror
site has been set in your PE preferences in a previous PE session.
Server URL.
Thus, to pre-specify molecule 1d66 and invoke the Explorer, the URL is
the path to the folder where PE is installed, plus pe.htm?id=1d66.
So for example if you wish to use the PE from the UMass server, the
URL is
or from any server from which you are displaying the present page
(since the present page is part of the Protein Explorer which must
therefore be in the same folder on the server as the present page)
simply
Local Filepath, Absolute.
If you have installed PE locally in C:\Chime\protexpl
or Macintosh HD:Chime:protexpl, the URL's would be
Local Filepath, Relative.
The above links are absolute, but links can also be relative (which
enhances portability to another file tree). Suppose you have set up
three folders as follows
Folder Tree Part I:
|
C:\Chime\protexpl
C:\Chime\shared
C:\Chime\PDBLinks
|
or
|
Macintosh HD:Chime:protexpl
Macintosh HD:Chime:shared
Macintosh HD:Chime:PDBLinks
|
And suppose that in the latter folder you have created the file PDBLinks.htm
containing hyperlinks which invoke PE with pre-specified molecules. Then
from a hyperlink in the file PDBLinks/PDBLinks.htm, the
relative link for PDB ID 1d66 would then be
(where two periods means the parent folder of the PDBLinks folder).
Invoking Protein Comparator. Invoking the Comparator simply
requires that two PDB ID codes be specified, which for the server
URL above would be for example:
-
PDB Local Disk Files
If you have saved PDB files to a local disk, you can use URL's to
pre-specify particular files when invoking Explorer or Comparator.
Below, we'll give only the Relative style of
URL in the examples, but Local Filepath, Absolute or Server
URL, Absolute styles can also be used.
For purposes of example, let's suppose you have created a
folder under your "Chime" folder named "PDB Files", and into it
downloaded two PDB files as follows:
Folder Tree Part II:
|
C:\Chime\PDB Files\1lck.pdb
C:\Chime\PDB Files\1b07.pdb
|
or
|
Macintosh HD:Chime:PDB Files:1lck.pdb
Macintosh HD:Chime:PDB Files:1b07.pdb
|
Absolute PDB Filepaths.
Absolute PDB filepaths can be used to invoke Explorer or Comparator
respectively as follows.
If you actually do create a "PDB Files" folder (see "Folder Tree Part
II" above) and download 1lck and 1b07 into it from the PDB, the links below will work either
from your local installation of PE, or when PE is being served from
any server (provided it is in a folder named protexpl).
Relative PDB Filepaths.
Using the folder tree specified in the above examples, relative PDB
filepaths could be used in your /Chime/PDBLinks/PDBLinks.htm file as
follows. Or, for test purposes, if you copied the present file
(query_pe.htm) into such a Chime/PDBLinks folder and opened it in
Netscape, and if the PDB files are present in the parallel Chime/PDB
Files folder, and you have installed a local copy of the explorer in
Chime/protexpl and Chime/shared, the links below should work.
(In other words, they'll work if you have created the complete
folder tree, Parts I plus II above, and appropriately filled each
branch folder.)
- Server PDB Disk Files
If the PDB file is on the same web server disk as the explorer, it can be
loaded with a relative URL. Suppose the server contains two
folders at the same level, "protexpl" and "pdb_files", and that the latter
contains the file 1cmk1atp.pdb (an alignment of two molecules). This
file can be loaded with the URL
Note that there are three dots, not the usual
two, following "id=". This is necessary to signal to the Explorer that
the file is on the server, not on the local disk.