source: trunk/ARBDB/adExperiment.cxx

Last change on this file was 8607, checked in by westram, 13 years ago

merge from e4fix [8135] [8136] [8137] [8138] [8139] [8140] [8141] [8142] [8143] [8144] [8222]
(this revives the reverted patches [8129] [8130] [8131] [8132]; see [8133])

  • fixes
    • some free/delete mismatches
    • wrong definition of ORF objects (Level was no bit value)
    • amino consensus (failed for columns only containing 'C')
  • rename
    • AA_sequence_term → orf_term
    • ED4_sequence_terminal_basic → ED4_abstract_sequence_terminal
  • cleaned up hierarchy dumps
  • tweaked is_terminal()/to_terminal()
File size: 1.8 KB
Line 
1// =============================================================== //
2//                                                                 //
3//   File      : adExperiment.cxx                                  //
4//   Purpose   : DB-access on experiments                          //
5//                                                                 //
6//   Coded by Ralf Westram (coder@reallysoft.de) in December 2008  //
7//   Institute of Microbiology (Technical University Munich)       //
8//   http://www.arb-home.de/                                       //
9//                                                                 //
10// =============================================================== //
11
12#include <arbdbt.h>
13#include "gb_local.h"
14
15GBDATA* EXP_get_experiment_data(GBDATA *gb_species) {
16    return GB_search(gb_species, "experiment_data", GB_CREATE_CONTAINER);
17}
18
19GBDATA* EXP_find_experiment_rel_exp_data(GBDATA *gb_experiment_data, const char *name) {
20    return GBT_find_item_rel_item_data(gb_experiment_data, "name", name);
21}
22GBDATA* EXP_find_experiment(GBDATA *gb_species, const char *name) {
23    // search an experiment
24    // Note: If you know the experiment exists, use EXP_expect_experiment!
25    return EXP_find_experiment_rel_exp_data(EXP_get_experiment_data(gb_species), name);
26}
27GBDATA* EXP_first_experiment_rel_exp_data(GBDATA *gb_experiment_data) {
28    return GB_entry(gb_experiment_data, "experiment");
29}
30
31GBDATA* EXP_next_experiment(GBDATA *gb_experiment) {
32    gb_assert(GB_has_key(gb_experiment, "experiment"));
33    return GB_nextEntry(gb_experiment);
34}
35
36
37GBDATA* EXP_find_or_create_experiment_rel_exp_data(GBDATA *gb_experiment_data, const char *name) {
38    // Search for a experiment, when experiment does not exist create it
39    return GBT_find_or_create_item_rel_item_data(gb_experiment_data, "experiment", "name", name, false);
40}
41
Note: See TracBrowser for help on using the repository browser.