
This is the directory for use in "Building", ie. assembling, the
physical DB from scratch.

There are a number of steps in this process:

1. Run define_physical_db.pl suppress all > $log.
This defines the database tables anew, burning anything that may've
been in there previously.

2. Run generate_bac_loadfile.pl.  
This will create the file bacs.load.  

3. su to become root.  Then manually transfer bacs.load into the
directory /var/lib/mysql/physical.

4.  Run load_physical_db.pl -setup -bacsfromfile >> $log.
This will load bacs.load into the DB, as well as manually loading
two other tables.  Overall, we will load:
  bacs
  users
  species
  
5.  Run generate_fpc_loadfiles.pl -user=??
-fpcversion=fpc_version.load -errorlog -fpcdir=../../TomatoFPC/??.
Run this once per subdir of TomatoFPC you want to load.  Each will
be created as one version and the local files
  fpc_version.load
  bac_contigs.load
  bac_associations.load
will be created.

6.  In your root window, copy these files over into
/var/lib/mysql/physical.

7. Run load_physical_db.pl -baccontigs -plates=PLATESDIR >> $log.
This will load
  fpc_version
  bac_contigs
  bac_associations
  overgo_plates
  probe_markers

NB. - If you wish to add further plates without having to rebuild
from scratch then they can be added in using the -addplate flag for
load_physical_db.pl:

  load_physical_db.pl -addplate=PATHTOPLATEFILE >> $log

8. Run load_plates_results.pl LOGFILE PLATEDATADIR.
This will load
  overgo_version
  overgo_results
  
9. Run deconvolution_algorithm.pl
This will load
  overgo_associations
  tentative_overgo_assoications
  tentative_association_conflict_groups
  
10. Run detect_plausible_bac_clusters.pl >> $log.
This will set plausible flags in physical.overgo_associations.

11. Run detect_plausible_bac_contigs.pl >> $log.
This will set plausible flags in physical.bac_associations.

12. run cache_physical_database.pl >> log.
This will "freeze out" a complete copy of the DB to date in
ready-made table_name.cache files ready for export to other systems.
The script automatically puts the cached files in DB/cache/

13. cd into ../cache and run tar -czf physical.cache.tar.gz *.cache.
This will make a cachefile of the complete database.


