HGNC logo Program Documentation HUGO logo
About HGNC button Gene Search button Guidelines button Gene Submission button Downloads button Home button
Giving unique and meaningful names to every human gene

Main Index Custom Downloads Program Documentation Column Definitions Pattern Matching

The HGNC Database Download script serves as a front end for a PostgreSQL database it provides a web-based interface which will allow users to select columns of data for output, execute limited SQL queries and save searches for future reference

Bookmark Title: field allows you to name any HTML table the script generates

  1. Select columns to display from the checkboxes at the top of the page, or select a predefined set using the Column presets pulldown menu (see Column definitions for more information about what the columns represent).
  2. Select Status to be displayed
  3. Select Chromosomes to display data on (if no individual chromosomes are selectd all chromosomes are displayed (ie 'Select all Chromosomes' is the default setting)
  4. The WHERE field enables you to specify an SQL query see Pattern Matching and also the Postgres Documentation for more information
  5. ORDER BY sets which column is used to order the data (this defaults to Approved Symbol)
  6. LIMIT takes an interger and restricts the number of lines returned by the script
  7. Output format specifies how the data is displayed

On submission this form is replaced by the script output; if you bookmark that page every time you return to it the search is rerun and the new output displayed. The Bookmark Title field allows any HTML table the script generates to be given a name (which will be picked up by your browser if the page is bookmarked.

If you want to change the column order in the HTML or Text outputs this can be done by directly editing the URL, the order of the 'col' parameters in the URL defines the column order. If a column is required more than once simply add an extra col parameter.


Embedding tables into PHP

Assuming your server supports PHP, create a page using .php instead of .html or .htm, copy paste in the output from 'Make PHP code' into the document


<html><body>
<table border="1">
<tr><th>HGNC ID</th> <th>Approved Symbol</th> <th>Approved Name</th> <th>Status</th> <th>Locus Type</th></tr>
<?php
    $url = "http://www.genenames.org/cgi-bin/hgnc_downloads.cgi?".
    "title=Genew%20output%20data&col=gd_hgnc_id&col=gd_app_sym&col=gd_app_name&col=gd_status&".
    "col=gd_locus_type&status=Approved&=on&where=&".
    "order_by=gd_app_sym_sort&status_opt=3&limit=20&format=include&submit=submit&".
    ".cgifields=status&.cgifields=&.cgifields=chr"
    include("$url")
?>
</table></body></html>

Future development


The work of the HGNC is supported by National Human Genome Research Institute (NHGRI) grant P41 HG03345 and Wellcome Trust grant 081979/Z/07/Z.