use gk_central_042211;
/* query to id fully-qualified EC numbers in poorly-named A.th. reactions */
select e2n.name, d.identifier from ReactionlikeEvent r
join Event_2_crossReference e2c on e2c.DB_ID = r.DB_ID
join Event_2_name e2n on e2n.DB_ID = r.DB_ID
join DatabaseIdentifier d on d.DB_ID = e2c.crossReference
join Event_2_species e on e.DB_ID = r.DB_ID
join Species s on s.DB_ID = e.species
join Taxon_2_name t on t.DB_ID = s.DB_ID
where t.name like 'Arabidopsis%'
and d.referenceDatabase = 4
and e2n.name like '%->%'
and d.identifier not like '%-%'
order by e2n.name;

use test;
/* load in PJ's EC nums and names file */
/* mysqlimport -u root -p  -v --local --ignore-lines=12 test ./EC_reaction_names.txt */

/* scratch queries */
select * from Taxon_2_name
where name like '%Ara%';

select * from Species s
join Taxon_2_name t on t.DB_ID = s.DB_ID
where t.name like '%Arabi%';

select * from Event_2_crossReference;

select * from DatabaseIdentifier;

select * from ReferenceDatabase;