Advertisement
LuciaPrieto

Untitled

Jun 16th, 2018
387
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MySQL 0.56 KB | None | 0 0
  1. -- Relacion interaccion proteinas con enfermedades a traves de genes
  2. DROP TABLE IF EXISTS tmp_disppi;
  3. CREATE TABLE tmp_disppi AS
  4. SELECT DISTINCT dp1.disease_cui, ppi.id_p1, ppi.id_p2
  5.   FROM p_interacts_with_p ppi
  6.        INNER JOIN edsssdb.tmp_disprot dp1
  7.          ON ( dp1.prot_id = ppi.id_p1 )
  8.        INNER JOIN edsssdb.tmp_disprot dp2
  9.          ON ( dp2.prot_id = ppi.id_p2 AND dp1.disease_cui = dp2.disease_cui);
  10. CREATE INDEX ix_tmp_disppi1 ON tmp_disppi ( id_p1, id_p2, disease_cui );
  11. CREATE INDEX ix_tmp_disppi2 ON tmp_disppi ( disease_cui, id_p1, id_p2 );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement