I want to programmatically list all the aliases for a whole number of gene names. I am using Entrez/NCBI and the "gene" database to do this.

For eg:

When I search the ncbi gene database for XRCC1, I get the results

http://www.ncbi.nlm.nih.gov/gene/?term=XRCC1

In the browser NCBI gives you a nice table with the "Name", "Geneid" , "Location" and importantly "Aliases". How do I get these aliases from a Biopython or Entrez eutils query programmatically?

Currently I can get a bunch of information from a function like:

```
from Bio import Entrez

def main(infile_name):
    Entrez.email = "myemail@myworkplace.com"
    # How do I setup this query to get Aliases?
    query = Entrez.esearch(db="gene",term=input_term,retmode="text")
    # Process this result and extract Aliases?
    result = Entrez.read(query)
    print result
```

Thanks for your help
You might try using the relatively new [Entrez Direct tools][1] that can be run from the command-line. Here is an example command for pulling the aliases for BRCA1[human].

```
esearch -db gene -query "(BRCA1[Preferred Symbol]) AND 9606[Taxonomy ID]" | \
  efetch -format xml | \
  xtract -pattern Entrezgene \
    -element Gene-ref_locus \
    -sep "|" -element Gene-ref_syn_E
```

This results in bar-separated aliases following the official symbol.

    BRCA1    IRIS|PSCP|BRCAI|BRCC1|FANCS|PNCA4|RNF53|BROVCA1|PPP1R53

 [1]: http://www.ncbi.nlm.nih.gov/books/NBK179288/