The stable_id database is used by the Registry method get_species_and_object_type().
EnsEMBL REST API heavily relies on this method.

The database can be created once all the release databases, which contain
stable_ids to be copied into the stable_id database, are ready.

Currently the following stable ids are copied:

core	  Exon
	  Gene
	  Transcript
	  Translation
	  Operon
	  OperonTranscript
	  RNAProduct


For Gene, Transcript and Translation, an archive_id_lookup is also created, containing all previously used ids

For help/usage try:
perl populate_stable_id_lookup.pl --help


This command will create database ensembl_stable_ids_88 on server mysql-xxx-dev.ebi.ac.uk for release 88 databases found on mysql-ens-xxx.ebi.ac.uk:

eg: 
(with -test flag create a small subset database)
perl populate_stable_id_lookup.pl -lhost mysql-xxx-dev.ebi.ac.uk -luser xxxrw -lpass xxxx -lport 4484 -dbname ensembl_stable_ids_88 -create -host mysql-ens-xxx.ebi.ac.uk  -user ensro -port 4519 -version 88 -test

(without -test flag creates a full version)
perl populate_stable_id_lookup.pl -lhost mysql-xxx-dev.ebi.ac.uk -luser xxxrw -lpass xxxx -lport 4484 -dbname ensembl_stable_ids_88 -create -host mysql-ens-xxx.ebi.ac.uk  -user ensro -port 4519 -version 88 -create_index

RELEASE=88
DIR=ensembl/misc-scripts/stable_id_lookup

cd $DIR
bsub -q production -M 700 -R'select[mem>700] rusage[mem=700]' -o stable_id_lookup.out -e stable_id_lookup.err perl populate_stable_id_lookup.pl \
-lhost mysql-xxx-dev-x.ebi.ac.uk -luser xxxx -lpass xxxx -lport 4484 -dbname ensembl_stable_ids_${RELEASE} -create -host mysql-ens-xxx-1.ebi.ac.uk  -user xxx -port 4519 -version ${RELEASE} -create_index

-luser,lpass,lhost,lport = lookup credentials, or the dev server account with write permissions.
-user,pass,host,port = read-only credentials for staging servers. This is where the stable IDs come from.
-dbname = name of new lookup database to create on the server defined by -lhost

For release 89, the job consumed around 100MB of memory and took around 3 mins to run for ensembl on the EBI cluster.
For release 92, the job took around 8 minutes.
