stock->stock_id); $results = array(); while ($r = db_fetch_object($resource)) { // Get the genotype & feature associated with each experiment $query2 = "SELECT g.*, f.uniquename as feature_uniquename, f.name as feature_name, f.feature_id FROM genotype g " ."LEFT JOIN feature_genotype fg ON fg.genotype_id=g.genotype_id " ."LEFT JOIN feature f ON fg.feature_id=f.feature_id " ."WHERE g.genotype_id IN (SELECT genotype_id FROM nd_experiment_genotype WHERE nd_experiment_id=%d)"; $genotype_feature = db_fetch_object(db_query($query2, $r->nd_experiment_id)); $item = array( 'nd_experiment' => array( 'nd_experiment_id' => $r->nd_experiment_id ), 'genotype' => array( 'genotype_id' => $genotype_feature->genotype_id, 'uniquename' => $genotype_feature->uniquename, 'description' => $genotype_feature->description, ), 'feature' => array( 'feature_id' => $genotype_feature->feature_id, 'uniquename' => $genotype_feature->feature_uniquename, 'name' => $genotype_feature->feature_name, ), ); // Get the nid associated with the feature (used for linking) $query3 = "SELECT nid FROM chado_feature WHERE feature_id=%d"; $nid = db_fetch_object(db_query($query3,$genotype_feature->feature_id)); $item['feature']['nid'] = $nid->nid; $results[$r->nd_experiment_id] = $item; } ?>
Genotype Experiments
".$genotype.''; } // feature name if ($r['feature']['name']) { $marker_name = $r['feature']['name']; } else { $marker_name = $r['feature']['uniquename']; } // add link if feature sync'd if ($r['feature']['nid']) { $marker_link = 'node/'.$r['feature']['nid']; $marker = l($marker_name, $marker_link); } else { $marker = $marker_name; } ?>
Marker AssayedGenotype Observed
'genotype_experiments'), 5); ?>