ARB
Classes | Macros | Functions | Variables
adGene.cxx File Reference
#include "gb_local.h"
#include <adGene.h>
#include <arbdbt.h>
#include <arb_strbuf.h>
#include <arb_strarray.h>
Include dependency graph for adGene.cxx:

Go to the source code of this file.

Classes

struct  GEN_position_mem_handler
 

Macros

#define swap(a, b, type)   do { type tmp = (a); (a) = (b); (b) = (tmp); } while (0)
 

Functions

bool GEN_is_genome_db (GBDATA *gb_main, int default_value)
 
GBDATAGEN_findOrCreate_gene_data (GBDATA *gb_species)
 
GBDATAGEN_find_gene_data (GBDATA *gb_species)
 
GBDATAGEN_expect_gene_data (GBDATA *gb_species)
 
GBDATAGEN_find_gene_rel_gene_data (GBDATA *gb_gene_data, const char *name)
 
GBDATAGEN_find_gene (GBDATA *gb_species, const char *name)
 
GBDATAGEN_expect_gene (GBDATA *gb_species, const char *name)
 
static GBDATAGEN_create_nonexisting_gene_rel_gene_data (GBDATA *gb_gene_data, const char *name)
 
GBDATAGEN_create_nonexisting_gene (GBDATA *gb_species, const char *name)
 
GBDATAGEN_find_or_create_gene_rel_gene_data (GBDATA *gb_gene_data, const char *name)
 
GBDATAGEN_first_gene (GBDATA *gb_species)
 
GBDATAGEN_first_gene_rel_gene_data (GBDATA *gb_gene_data)
 
GBDATAGEN_next_gene (GBDATA *gb_gene)
 
GBDATAGEN_first_marked_gene (GBDATA *gb_species)
 
GBDATAGEN_next_marked_gene (GBDATA *gb_gene)
 
GEN_positionGEN_new_position (int parts, bool joinable)
 
void GEN_use_uncertainties (GEN_position *pos)
 
void GEN_free_position (GEN_position *pos)
 
static GB_ERROR parseCSV (GBDATA *gb_gene, const char *field_name, size_t parts_expected, ConstStrArray &parseTable)
 
static GB_ERROR parsePositions (GBDATA *gb_gene, const char *field_name, int parts_expected, size_t *results, ConstStrArray &parseTable)
 
GEN_positionGEN_read_position (GBDATA *gb_gene)
 
GB_ERROR GEN_write_position (GBDATA *gb_gene, const GEN_position *pos, long seqLength)
 
static int cmp_location_parts (const void *v1, const void *v2)
 
void GEN_sortAndMergeLocationParts (GEN_position *location)
 
const charGEN_origin_organism (GBDATA *gb_pseudo)
 
const charGEN_origin_gene (GBDATA *gb_pseudo)
 
bool GEN_is_pseudo_gene_species (GBDATA *gb_species)
 
GB_ERROR GEN_organism_not_found (GBDATA *gb_pseudo)
 
static const charpseudo_species_hash_key (const char *organism_name, const char *gene_name)
 
static GBDATAGEN_read_pseudo_species_from_hash (const GB_HASH *pseudo_hash, const char *organism_name, const char *gene_name)
 
void GEN_add_pseudo_species_to_hash (GBDATA *gb_pseudo, GB_HASH *pseudo_hash)
 
GB_HASHGEN_create_pseudo_species_hash (GBDATA *gb_main, long additionalSize)
 
GBDATAGEN_find_pseudo_species (GBDATA *gb_main, const char *organism_name, const char *gene_name, const GB_HASH *pseudo_hash)
 
GBDATAGEN_find_origin_organism (GBDATA *gb_pseudo, const GB_HASH *organism_hash)
 
GBDATAGEN_find_origin_gene (GBDATA *gb_pseudo, const GB_HASH *organism_hash)
 
GBDATAGEN_first_pseudo_species (GBDATA *gb_main)
 
GBDATAGEN_next_pseudo_species (GBDATA *gb_species)
 
static GBDATAGEN_next_marked_pseudo_species (GBDATA *gb_species)
 
GBDATAGEN_first_marked_pseudo_species (GBDATA *gb_main)
 
bool GEN_is_organism (GBDATA *gb_species)
 
GBDATAGEN_find_organism (GBDATA *gb_main, const char *name)
 
GBDATAGEN_first_organism (GBDATA *gb_main)
 
GBDATAGEN_next_organism (GBDATA *gb_organism)
 
long GEN_get_organism_count (GBDATA *gb_main)
 
GBDATAGEN_first_marked_organism (GBDATA *gb_main)
 
GBDATAGEN_next_marked_organism (GBDATA *gb_organism)
 
charGEN_global_gene_identifier (GBDATA *gb_gene, GBDATA *gb_organism)
 

Variables

static GEN_positionlastFreedPosition = NULp
 
static struct
GEN_position_mem_handler 
GEN_position_dealloc
 
static GEN_positionlocation2sort = NULp
 

Macro Definition Documentation

#define swap (   a,
  b,
  type 
)    do { type tmp = (a); (a) = (b); (b) = (tmp); } while (0)

Function Documentation

bool GEN_is_genome_db ( GBDATA gb_main,
int  default_value 
)
GBDATA* GEN_findOrCreate_gene_data ( GBDATA gb_species)

Definition at line 44 of file adGene.cxx.

References gb_assert, GB_CREATE_CONTAINER, and GB_search().

Referenced by GEN_create_nonexisting_gene(), and NT_fix_gene_data().

GBDATA* GEN_find_gene_data ( GBDATA gb_species)
GBDATA* GEN_expect_gene_data ( GBDATA gb_species)
GBDATA* GEN_find_gene_rel_gene_data ( GBDATA gb_gene_data,
const char name 
)
GBDATA* GEN_find_gene ( GBDATA gb_species,
const char name 
)
GBDATA* GEN_expect_gene ( GBDATA gb_species,
const char name 
)

Definition at line 72 of file adGene.cxx.

References GBT_expect_item_rel_item_data(), and GEN_expect_gene_data().

static GBDATA* GEN_create_nonexisting_gene_rel_gene_data ( GBDATA gb_gene_data,
const char name 
)
static
GBDATA* GEN_create_nonexisting_gene ( GBDATA gb_species,
const char name 
)
GBDATA* GEN_find_or_create_gene_rel_gene_data ( GBDATA gb_gene_data,
const char name 
)
GBDATA* GEN_first_gene ( GBDATA gb_species)
GBDATA* GEN_first_gene_rel_gene_data ( GBDATA gb_gene_data)

Definition at line 134 of file adGene.cxx.

References GB_entry().

Referenced by first_gene_in_range(), GEN_root::GEN_root(), and NT_convert_gene_locations().

GBDATA* GEN_next_gene ( GBDATA gb_gene)
GBDATA* GEN_first_marked_gene ( GBDATA gb_species)

Definition at line 143 of file adGene.cxx.

References GB_first_marked(), and GEN_expect_gene_data().

Referenced by pd_get_the_gene_names(), and probe_match_event().

GBDATA* GEN_next_marked_gene ( GBDATA gb_gene)

Definition at line 146 of file adGene.cxx.

References GB_next_marked().

Referenced by next_gene_in_range(), pd_get_the_gene_names(), and probe_match_event().

GEN_position* GEN_new_position ( int  parts,
bool  joinable 
)
void GEN_use_uncertainties ( GEN_position pos)
void GEN_free_position ( GEN_position pos)
static GB_ERROR parseCSV ( GBDATA gb_gene,
const char field_name,
size_t  parts_expected,
ConstStrArray parseTable 
)
static
static GB_ERROR parsePositions ( GBDATA gb_gene,
const char field_name,
int  parts_expected,
size_t results,
ConstStrArray parseTable 
)
static

Definition at line 232 of file adGene.cxx.

References error(), GBS_global_string(), and parseCSV().

Referenced by GEN_read_position().

GEN_position* GEN_read_position ( GBDATA gb_gene)
GB_ERROR GEN_write_position ( GBDATA gb_gene,
const GEN_position pos,
long  seqLength 
)
static int cmp_location_parts ( const void *  v1,
const void *  v2 
)
static

Definition at line 476 of file adGene.cxx.

References cmp, GEN_position::start_pos, and GEN_position::stop_pos.

Referenced by GEN_sortAndMergeLocationParts().

void GEN_sortAndMergeLocationParts ( GEN_position location)
const char* GEN_origin_organism ( GBDATA gb_pseudo)
const char* GEN_origin_gene ( GBDATA gb_pseudo)
bool GEN_is_pseudo_gene_species ( GBDATA gb_species)
GB_ERROR GEN_organism_not_found ( GBDATA gb_pseudo)
static const char* pseudo_species_hash_key ( const char organism_name,
const char gene_name 
)
static

Definition at line 581 of file adGene.cxx.

References GBS_global_string().

Referenced by GEN_add_pseudo_species_to_hash(), and GEN_read_pseudo_species_from_hash().

static GBDATA* GEN_read_pseudo_species_from_hash ( const GB_HASH pseudo_hash,
const char organism_name,
const char gene_name 
)
static

Definition at line 585 of file adGene.cxx.

References GBS_read_hash(), and pseudo_species_hash_key().

Referenced by GEN_find_pseudo_species().

void GEN_add_pseudo_species_to_hash ( GBDATA gb_pseudo,
GB_HASH pseudo_hash 
)
GB_HASH* GEN_create_pseudo_species_hash ( GBDATA gb_main,
long  additionalSize 
)
GBDATA* GEN_find_pseudo_species ( GBDATA gb_main,
const char organism_name,
const char gene_name,
const GB_HASH pseudo_hash 
)
GBDATA* GEN_find_origin_organism ( GBDATA gb_pseudo,
const GB_HASH organism_hash 
)
GBDATA* GEN_find_origin_gene ( GBDATA gb_pseudo,
const GB_HASH organism_hash 
)
GBDATA* GEN_first_pseudo_species ( GBDATA gb_main)
GBDATA* GEN_next_pseudo_species ( GBDATA gb_species)
static GBDATA* GEN_next_marked_pseudo_species ( GBDATA gb_species)
static

Definition at line 701 of file adGene.cxx.

References GBT_next_marked_species(), and GEN_is_pseudo_gene_species().

Referenced by GEN_first_marked_pseudo_species().

GBDATA* GEN_first_marked_pseudo_species ( GBDATA gb_main)
bool GEN_is_organism ( GBDATA gb_species)
GBDATA* GEN_find_organism ( GBDATA gb_main,
const char name 
)
GBDATA* GEN_first_organism ( GBDATA gb_main)
GBDATA* GEN_next_organism ( GBDATA gb_organism)
long GEN_get_organism_count ( GBDATA gb_main)

Definition at line 756 of file adGene.cxx.

References GEN_first_organism(), and GEN_next_organism().

Referenced by GBT_create_organism_hash().

GBDATA* GEN_first_marked_organism ( GBDATA gb_main)
GBDATA* GEN_next_marked_organism ( GBDATA gb_organism)
char* GEN_global_gene_identifier ( GBDATA gb_gene,
GBDATA gb_organism 
)

Variable Documentation

GEN_position* lastFreedPosition = NULp
static

Definition at line 153 of file adGene.cxx.

Referenced by GEN_new_position().

struct GEN_position_mem_handler GEN_position_dealloc
static
GEN_position* location2sort = NULp
static

Definition at line 474 of file adGene.cxx.