Hi there,

there might be a rather simple solution to this but I already checked NCBI for a script (or something like this) but I wasn't lucky. So here is my problem...

I got a list of several species names, say 'Gardnerella vaginalis' is one of them, from that name I need to conclude what the genus is this species falls in. In most cases this is fairly easy since naming convention says that the first part is genus and second part specifies the species. However, since there might be one or the other synonym for a species (especially in the fungal world) I need some kind of lookup into the ncbi taxonomy which gives me the respective genus name for a given species name. (and in the best case this sould be script-able)

Any ideas are highly appreciated!

Thanks,

phil
With Entrez Direct:

```
esearch -db taxonomy -query "Gardnerella vaginalis" | efetch -format docsum | xtract -element Genus
Gardnerella
```

Alternatively, e.g.:

```
esearch -db taxonomy -query "Gardnerella vaginalis" | efetch -format xml | xtract -element Lineage
cellular organisms; Bacteria; Actinobacteria; Actinobacteria; Actinobacteridae; Bifidobacteriales; Bifidobacteriaceae; Gardnerella
```