update sgn_submit, since I made a mistake when uploading data
Make sure no new libraries were added
update library set organism_id = 27 where library_id > 90;

submit-push-live.pl
Do it library by library
select location from seqread where library_id = 91 group by location
./submit-push-live.pl
Coffea/canephora/lib_name

./load_est.pl scopolamine sandbox ~/cgn_sgn_files/sgn_est
Still No read_id found for cccl4j5-30079.  This clone was not loaded into sgn-submit.  Upload failed.
Delete this clone from sgn_est, re-run the loading script.

(Add the unigenes missing from CAP3 result, for details see documentation in ~/cgn_2_sgn_files)

Run query_sgn_estid.pl
Run replace_member.pl with above result and the ace_parse file (ace_member)
Run create_qcpassed.pl from result file of query_sgn_estid.pl

Add group and group linkage as stated in Koni's pipeline doc
group_id is 34813 and member_id is 27

./querty_sgn_est_u_id.pl > sgn_est_uid

./sgn_cgn_uid.pl sgn_est_uid cgn_clone_uid

./replace_blast_id.pl cgn_sgn_uid cgn_at_blastx

./replace_fasta_id.pl cgn_sgn_uid cgn_unigene_5.fasta

mount the /data/shared/
Amendment 4/14/06, /data/shared can no longer be mounted, since it is now in a different subnet (the subnet for server room).  Copy the database files to local machine, make sure they are the database file formated with -o option.
Also, I modified blast-result-db-load.pl, sothat if a defline is not found, the program dies and rollback.

Make sure the text index is set properly

USE THE OLD DATABASE FILES in current_old
./blast-result-db-load.pl scopolamine sandbox  ~/cgn_sgn_files/cgn_sgn_unigene.seq ~/cgn_sgn_files/cgn_at_blastx_newid 15 2 1e-5 100
 ./blast-result-db-load.pl scopolamine sandbox  ~/cgn_sgn_files/cgn_sgn_unigene.seq ~/cgn_sgn_files/cgn_nr_blastx_newid 15 1 1e-5 100

replace the ids in estscan and interproscan result

./cds_upload
./domain_match_upload.pl


Modify the database schema, add two columns in table unigene
./add_cgn_id.pl 

Modify (commit) unigene.pl


query_cds_id.pl
(Remove the three unigenes from result file)

./add_cdsid_fm.pl

Modify family.pl (commit)

(cosII pages need to be modified!)

Finally, clean up the clone_name
query_cloneid_readid.pl
parse_cloneid_readid.pl 
update_seqread.pl
cleanup_clone.pl

update clone set clone_name=substring(clone_name from '^[^-]+') where
library_id > 90; (UPDATE 59720)

Add 2 columns to table unigene
login as postgres
SET SEARCH_PATH = sgn_bt, utils;
SELECT drop_cxgn_branch_views_for_table('sgn', 'unigene');
ALTER TABLE sgn_bt.unigene ADD COLUMN database_name VARCHAR DEFAULT 'sgn' NOT NULL;
ALTER TABLE sgn_bt.unigene ADD COLUMN sequence_name BIGINT NOT NULL DEFAULT 0;
UPDATE sgn_bt.unigene SET sequence_name = unigene_id;
SELECT create_cxgn_branch_views_for_table('sgn', 'unigene');

