/EfetchThePython

Primary LanguagePythonMIT LicenseMIT

Efetch The Python

This python script, which can be found here, facilitates automated GenBank searches and returns a tab-delimited list of hits and optionally a FASTA file with the hits if the flag --FASTA is set. The parameter --term takes as arguments the typical search code of GenBank searches, e.g. "Merops[Organism], COI". The parameter --output defines the prefix for the output files.

Since efetch requires an authentification, you have to provide your NCBI email ID via --email and your API key via --api_key. See here for more details how to obtain an API key.

The script uses the Biopython module which can be installed as follows:

pip install biopython

A typical commandline looks like this:

python EfetchThePython.py \
    --email <your mail address> \
    --api_key <your API key> \
    --Term "Merops[Organism], COI" \
    --Output data/Merops \
    --FASTA