|
From: <all...@su...> - 2006-02-27 07:58:11
|
Update of /cvsroot/libnelson/java In directory sumo.genetics.ucla.edu:/tmp/cvs-serv24819 Modified Files: gecCel.java Log Message: add run, user, experiment ids Index: gecCel.java =================================================================== RCS file: /cvsroot/libnelson/java/gecCel.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** gecCel.java 17 Feb 2006 01:45:32 -0000 1.2 --- gecCel.java 27 Feb 2006 07:58:07 -0000 1.3 *************** *** 17,22 **** public class gecCel { public static void main(String[] argv) { ! String SEL_EXP_RUN = "SELECT sample.sample_id, chip.chip_id, chip.file_id || '.file' file_id FROM gen_experiment_chips sample, gen_chip_files chip, gen_file_types type WHERE type.file_type_id = chip.file_type_id AND sample.chip_id = chip.chip_id AND type.file_extension = 'cel'"; ! // String SEL_ANNOT = "SELECT d.sample_id, x.accession FROM gen_annotation_exp_sample_data d, gen_annotation_cvterm c, gen_annotation_dbxref x WHERE d.cell_type_level_id = c.cvterm_id AND c.dbxref_id = x.dbxref_id AND sample_id = ? UNION SELECT d.sample_id, 'null:' || c.name FROM gen_annotation_exp_sample_data d, gen_annotation_cvterm c WHERE d.dev_stage_level_id = c.cvterm_id AND sample_id = ? UNION SELECT d.sample_id, 'null:' || c.name FROM gen_annotation_exp_sample_data d, gen_annotation_cvterm c WHERE d.cell_growth_level_id = c.cvterm_id AND sample_id = ? UNION SELECT d.sample_id, x.accession FROM gen_annotation_exp_sample_ds d, gen_annotation_cvterm c, gen_annotation_dbxref x WHERE d.disease_state_level_id = c.cvterm_id AND c.dbxref_id = x.dbxref_id AND d.sample_id = ? UNION SELECT d.sample_id, x.accession FROM gen_annotation_exp_sample_ed d, gen_annotation_cvterm c, gen_annotation_dbxref x WHERE d.experiment_design_level_id = c.cvterm_id AND c.dbxref_id = x.dbxref! _id AND d.sample_id = ? UNION SELECT d.sample_id, x.accession FROM gen_annotation_exp_sample_pt d, gen_annotation_cvterm c, gen_annotation_dbxref x WHERE d.phenotype_level_id = c.cvterm_id AND c.dbxref_id = x.dbxref_id AND d.sample_id = ? UNION SELECT d.sample_id, x.accession FROM gen_annotation_exp_sample_data d, gen_annotation_cvterm c, gen_annotation_dbxref x WHERE d.rna_level_id = c.cvterm_id AND c.dbxref_id = x.dbxref_id AND sample_id = ?"; --- 17,21 ---- public class gecCel { public static void main(String[] argv) { ! String SEL_EXP_RUN = "SELECT u.acs_user_id user_id, experiment.experiment_id, run.run_id, sample.sample_id, chip.chip_id, chip.file_id || '.file' file_id FROM sb_users u, gen_experiments experiment, gen_experiment_runs run, gen_experiment_chips sample, gen_chip_files chip, gen_file_types type WHERE run.run_id = sample.run_id AND type.file_type_id = chip.file_type_id AND sample.chip_id = chip.chip_id AND type.file_extension = 'cel' AND experiment.experiment_id = run.experiment_id AND experiment.survey_taker_id = u.user_id"; // String SEL_ANNOT = "SELECT d.sample_id, x.accession FROM gen_annotation_exp_sample_data d, gen_annotation_cvterm c, gen_annotation_dbxref x WHERE d.cell_type_level_id = c.cvterm_id AND c.dbxref_id = x.dbxref_id AND sample_id = ? UNION SELECT d.sample_id, 'null:' || c.name FROM gen_annotation_exp_sample_data d, gen_annotation_cvterm c WHERE d.dev_stage_level_id = c.cvterm_id AND sample_id = ? UNION SELECT d.sample_id, 'null:' || c.name FROM gen_annotation_exp_sample_data d, gen_annotation_cvterm c WHERE d.cell_growth_level_id = c.cvterm_id AND sample_id = ? UNION SELECT d.sample_id, x.accession FROM gen_annotation_exp_sample_ds d, gen_annotation_cvterm c, gen_annotation_dbxref x WHERE d.disease_state_level_id = c.cvterm_id AND c.dbxref_id = x.dbxref_id AND d.sample_id = ? UNION SELECT d.sample_id, x.accession FROM gen_annotation_exp_sample_ed d, gen_annotation_cvterm c, gen_annotation_dbxref x WHERE d.experiment_design_level_id = c.cvterm_id AND c.dbxref_id = x.dbxref! _id AND d.sample_id = ? UNION SELECT d.sample_id, x.accession FROM gen_annotation_exp_sample_pt d, gen_annotation_cvterm c, gen_annotation_dbxref x WHERE d.phenotype_level_id = c.cvterm_id AND c.dbxref_id = x.dbxref_id AND d.sample_id = ? UNION SELECT d.sample_id, x.accession FROM gen_annotation_exp_sample_data d, gen_annotation_cvterm c, gen_annotation_dbxref x WHERE d.rna_level_id = c.cvterm_id AND c.dbxref_id = x.dbxref_id AND sample_id = ?"; *************** *** 33,41 **** System.out.println("<files>"); while(rs1.next()) { ! int chip_id = rs1.getInt("CHIP_ID"); ! String file_id = rs1.getString("FILE_ID"); ! int sample_id = rs1.getInt("SAMPLE_ID"); ! System.out.println(" <file file_id=\"" + file_id + "\" chip_id=\"" + chip_id + "\" sample_id=\"" + sample_id + "\">"); stmt2 = conn.prepareStatement( --- 32,50 ---- System.out.println("<files>"); while(rs1.next()) { ! int chip_id = rs1.getInt("CHIP_ID"); ! int sample_id = rs1.getInt("SAMPLE_ID"); ! int run_id = rs1.getInt("RUN_ID"); ! int exp_id = rs1.getInt("EXPERIMENT_ID"); ! int user_id = rs1.getInt("USER_ID"); ! String file_id = rs1.getString("FILE_ID"); ! System.out.println(" <file run_id=\"" + run_id + "\" " + ! "file_id=\"" + file_id + "\" " + ! "chip_id=\"" + chip_id + "\" " + ! "sample_id=\"" + sample_id + "\" " + ! "user_id=\"" + user_id + "\" " + ! "run_id=\"" + run_id + "\" " + ! "experiment_id=\"" + exp_id + "\" " + ! ">"); stmt2 = conn.prepareStatement( |