ARB
Classes | Macros | Enumerations | Functions | Variables
graph_aligner_gui.cxx File Reference
#include "graph_aligner_gui.hxx"
#include "ed4_defs.hxx"
#include <fast_aligner.hxx>
#include <aw_awars.hxx>
#include <aw_global_awars.hxx>
#include <aw_msg.hxx>
#include <aw_root.hxx>
#include <awt_sel_boxes.hxx>
#include <awt_config_manager.hxx>
#include <servercntrl.h>
#include <PT_com.h>
#include <client.h>
#include <arbdbt.h>
#include <arb_strbuf.h>
#include <arb_misc.h>
#include <arb_file.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <unistd.h>
#include <string>
#include <sstream>
#include <iostream>
#include <vector>
Include dependency graph for graph_aligner_gui.cxx:

Go to the source code of this file.

Classes

struct  sina_arb_interface_def
 

Macros

#define ga_assert(cond)   arb_assert(cond)
 
#define GA_AWAR_ROOT   "sina/"
 
#define GA_AWAR_TEMP   "tmp/" GA_AWAR_ROOT
 
#define GA_AWAR_CMD   GA_AWAR_ROOT "cmd"
 
#define GA_AWAR_TGT   GA_AWAR_ROOT "target"
 
#define GA_AWAR_SAI   GA_AWAR_ROOT "sai"
 
#define GA_AWAR_ALIGNMENT   GA_AWAR_ROOT "alignment"
 
#define GA_AWAR_PROTECTION   GA_AWAR_ROOT "protection"
 
#define GA_AWAR_TURN_CHECK   GA_AWAR_ROOT "turncheck"
 
#define GA_AWAR_REALIGN   GA_AWAR_ROOT "realign"
 
#define GA_AWAR_MATCH_SCORE   GA_AWAR_ROOT "match_score"
 
#define GA_AWAR_MISMATCH_SCORE   GA_AWAR_ROOT "mismatch_score"
 
#define GA_AWAR_GAP_PEN   GA_AWAR_ROOT "gap_pen"
 
#define GA_AWAR_GAP_EXT   GA_AWAR_ROOT "gap_ext"
 
#define GA_AWAR_ADVANCED   GA_AWAR_ROOT "advanced"
 
#define GA_AWAR_FS_MIN   GA_AWAR_ROOT "fs_min"
 
#define GA_AWAR_FS_MAX   GA_AWAR_ROOT "fs_max"
 
#define GA_AWAR_FS_MSC   GA_AWAR_ROOT "fs_msc"
 
#define GA_AWAR_MIN_FULL   GA_AWAR_ROOT "min_full"
 
#define GA_AWAR_FULL_MINLEN   GA_AWAR_ROOT "full_minlen"
 
#define GA_AWAR_OVERHANG   GA_AWAR_ROOT "overhang"
 
#define GA_AWAR_THREADS   GA_AWAR_ROOT "threads"
 
#define GA_AWAR_QSIZE   GA_AWAR_ROOT "qsize"
 
#define GA_AWAR_KMER_LEN   GA_AWAR_ROOT "kmer_len"
 
#define GA_AWAR_KMER_MM   GA_AWAR_ROOT "kmer_mm"
 
#define GA_AWAR_MIN_LEN   GA_AWAR_ROOT "min_len"
 
#define GA_AWAR_WEIGHT   GA_AWAR_ROOT "weight"
 
#define GA_AWAR_INSERT   GA_AWAR_ROOT "insert"
 
#define GA_AWAR_LOWERCASE   GA_AWAR_ROOT "lowercase"
 
#define GA_AWAR_AUTOFILTER   GA_AWAR_ROOT "autofilter"
 
#define GA_AWAR_KMER_NOREL   GA_AWAR_ROOT "kmer_norel"
 
#define GA_AWAR_KMER_NOFAST   GA_AWAR_ROOT "kmer_nofast"
 
#define GA_AWAR_SHOW_DIST   GA_AWAR_ROOT "show_dist"
 
#define GA_AWAR_SHOW_DIFF   GA_AWAR_ROOT "show_diff"
 
#define GA_AWAR_COLOR   GA_AWAR_ROOT "color"
 
#define GA_AWAR_GENE_START   GA_AWAR_ROOT "gene_start"
 
#define GA_AWAR_GENE_END   GA_AWAR_ROOT "gene_end"
 
#define GA_AWAR_FS_COVER_GENE   GA_AWAR_ROOT "fs_cover_gene"
 
#define GA_AWAR_USED_RELS   GA_AWAR_ROOT "write_used_rels"
 
#define GA_AWAR_CALC_IDENTITY   GA_AWAR_ROOT "calc_idty"
 
#define GA_AWAR_NOWARN_START   GA_AWAR_ROOT "nowarn_start"
 
#define GA_AWAR_REFDB_MODE   GA_AWAR_ROOT "refdb_mode"
 
#define GA_AWAR_REFDB   GA_AWAR_ROOT "refdb"
 
#define GA_AWAR_REFDB_SELECT   GA_AWAR_TEMP "refdb"
 

Enumerations

enum  RefDbMode { REF_EXPLICIT, REF_LAST_SAVE, REF_CURRENT }
 
enum  SinaArbInterfaceVersion { ARB_5_99, ARB_7_1 }
 

Functions

static void refDbModeChanged_cb (AW_root *root)
 
static void newRefDbSelected_cb (AW_root *root)
 
void create_sina_variables (AW_root *root, AW_default db1)
 
static const charget_interface_id (SinaArbInterfaceVersion version)
 
static GB_ERROR detect_sina_version (AW_root *awr)
 
AW_active sina_mask (AW_root *awr)
 
const charstream2static (const std::stringstream &str)
 
const charempty_as_none (const char *sainame)
 
static void sina_start (AW_window *window, const AlignDataAccess *data_access)
 
static charfilter_posvar_SAI_for_ali (GBDATA *gb_extended, const char *ali_name)
 
static void accept_selected_ref_db (AW_window *aww, const char *const *awar_filename)
 
static AW_windowcreate_ref_db_selection_window (AW_root *aw_root)
 
static void sina_select_ref_db (AW_window *aww)
 
static void sina_cmd_changed_cb (AW_root *awr)
 
static AW_window_simple * new_sina_simple (AW_root *root, const AlignDataAccess *alignData, bool adv)
 
void show_sina_window (UNFIXED, const AlignDataAccess *alignData)
 

Variables

const SinaArbInterfaceVersion NO_INTERFACE = SinaArbInterfaceVersion(-1)
 
static sina_arb_interface_def supported_sina_versions []
 
static SinaArbInterfaceVersion used_sina_interface = NO_INTERFACE
 
static AWT_config_mapping_def sina_config_mapping []
 
static SinaArbInterfaceVersion gui_sina_interface = NO_INTERFACE
 

Macro Definition Documentation

#define ga_assert (   cond)    arb_assert(cond)
#define GA_AWAR_ROOT   "sina/"

Definition at line 49 of file graph_aligner_gui.cxx.

#define GA_AWAR_TEMP   "tmp/" GA_AWAR_ROOT

Definition at line 50 of file graph_aligner_gui.cxx.

#define GA_AWAR_CMD   GA_AWAR_ROOT "cmd"
#define GA_AWAR_TGT   GA_AWAR_ROOT "target"

Definition at line 53 of file graph_aligner_gui.cxx.

Referenced by create_sina_variables(), new_sina_simple(), and sina_start().

#define GA_AWAR_SAI   GA_AWAR_ROOT "sai"

Definition at line 54 of file graph_aligner_gui.cxx.

Referenced by create_sina_variables(), new_sina_simple(), and sina_start().

#define GA_AWAR_ALIGNMENT   GA_AWAR_ROOT "alignment"

Definition at line 55 of file graph_aligner_gui.cxx.

#define GA_AWAR_PROTECTION   GA_AWAR_ROOT "protection"

Definition at line 56 of file graph_aligner_gui.cxx.

Referenced by create_sina_variables(), new_sina_simple(), and sina_start().

#define GA_AWAR_TURN_CHECK   GA_AWAR_ROOT "turncheck"

Definition at line 57 of file graph_aligner_gui.cxx.

Referenced by create_sina_variables(), new_sina_simple(), and sina_start().

#define GA_AWAR_REALIGN   GA_AWAR_ROOT "realign"

Definition at line 58 of file graph_aligner_gui.cxx.

Referenced by create_sina_variables(), new_sina_simple(), and sina_start().

#define GA_AWAR_MATCH_SCORE   GA_AWAR_ROOT "match_score"

Definition at line 59 of file graph_aligner_gui.cxx.

Referenced by create_sina_variables(), new_sina_simple(), and sina_start().

#define GA_AWAR_MISMATCH_SCORE   GA_AWAR_ROOT "mismatch_score"

Definition at line 60 of file graph_aligner_gui.cxx.

Referenced by create_sina_variables(), new_sina_simple(), and sina_start().

#define GA_AWAR_GAP_PEN   GA_AWAR_ROOT "gap_pen"

Definition at line 61 of file graph_aligner_gui.cxx.

Referenced by create_sina_variables(), new_sina_simple(), and sina_start().

#define GA_AWAR_GAP_EXT   GA_AWAR_ROOT "gap_ext"

Definition at line 62 of file graph_aligner_gui.cxx.

Referenced by create_sina_variables(), new_sina_simple(), and sina_start().

#define GA_AWAR_ADVANCED   GA_AWAR_ROOT "advanced"

Definition at line 63 of file graph_aligner_gui.cxx.

Referenced by create_sina_variables(), new_sina_simple(), and show_sina_window().

#define GA_AWAR_FS_MIN   GA_AWAR_ROOT "fs_min"

Definition at line 64 of file graph_aligner_gui.cxx.

Referenced by create_sina_variables(), new_sina_simple(), and sina_start().

#define GA_AWAR_FS_MAX   GA_AWAR_ROOT "fs_max"

Definition at line 65 of file graph_aligner_gui.cxx.

Referenced by create_sina_variables(), new_sina_simple(), and sina_start().

#define GA_AWAR_FS_MSC   GA_AWAR_ROOT "fs_msc"

Definition at line 66 of file graph_aligner_gui.cxx.

Referenced by create_sina_variables(), new_sina_simple(), and sina_start().

#define GA_AWAR_MIN_FULL   GA_AWAR_ROOT "min_full"

Definition at line 67 of file graph_aligner_gui.cxx.

Referenced by create_sina_variables(), new_sina_simple(), and sina_start().

#define GA_AWAR_FULL_MINLEN   GA_AWAR_ROOT "full_minlen"

Definition at line 68 of file graph_aligner_gui.cxx.

Referenced by create_sina_variables(), new_sina_simple(), and sina_start().

#define GA_AWAR_OVERHANG   GA_AWAR_ROOT "overhang"

Definition at line 69 of file graph_aligner_gui.cxx.

Referenced by create_sina_variables(), new_sina_simple(), and sina_start().

#define GA_AWAR_THREADS   GA_AWAR_ROOT "threads"

Definition at line 70 of file graph_aligner_gui.cxx.

Referenced by create_sina_variables().

#define GA_AWAR_QSIZE   GA_AWAR_ROOT "qsize"

Definition at line 71 of file graph_aligner_gui.cxx.

Referenced by create_sina_variables().

#define GA_AWAR_KMER_LEN   GA_AWAR_ROOT "kmer_len"

Definition at line 72 of file graph_aligner_gui.cxx.

Referenced by create_sina_variables(), new_sina_simple(), and sina_start().

#define GA_AWAR_KMER_MM   GA_AWAR_ROOT "kmer_mm"

Definition at line 73 of file graph_aligner_gui.cxx.

Referenced by create_sina_variables(), new_sina_simple(), and sina_start().

#define GA_AWAR_MIN_LEN   GA_AWAR_ROOT "min_len"

Definition at line 74 of file graph_aligner_gui.cxx.

Referenced by create_sina_variables(), new_sina_simple(), and sina_start().

#define GA_AWAR_WEIGHT   GA_AWAR_ROOT "weight"

Definition at line 75 of file graph_aligner_gui.cxx.

Referenced by create_sina_variables(), new_sina_simple(), and sina_start().

#define GA_AWAR_INSERT   GA_AWAR_ROOT "insert"

Definition at line 76 of file graph_aligner_gui.cxx.

Referenced by create_sina_variables(), new_sina_simple(), and sina_start().

#define GA_AWAR_LOWERCASE   GA_AWAR_ROOT "lowercase"

Definition at line 77 of file graph_aligner_gui.cxx.

Referenced by create_sina_variables(), new_sina_simple(), and sina_start().

#define GA_AWAR_AUTOFILTER   GA_AWAR_ROOT "autofilter"

Definition at line 78 of file graph_aligner_gui.cxx.

Referenced by create_sina_variables(), new_sina_simple(), and sina_start().

#define GA_AWAR_KMER_NOREL   GA_AWAR_ROOT "kmer_norel"

Definition at line 79 of file graph_aligner_gui.cxx.

Referenced by create_sina_variables(), new_sina_simple(), and sina_start().

#define GA_AWAR_KMER_NOFAST   GA_AWAR_ROOT "kmer_nofast"

Definition at line 80 of file graph_aligner_gui.cxx.

Referenced by create_sina_variables(), new_sina_simple(), and sina_start().

#define GA_AWAR_SHOW_DIST   GA_AWAR_ROOT "show_dist"

Definition at line 81 of file graph_aligner_gui.cxx.

Referenced by create_sina_variables(), new_sina_simple(), and sina_start().

#define GA_AWAR_SHOW_DIFF   GA_AWAR_ROOT "show_diff"

Definition at line 82 of file graph_aligner_gui.cxx.

Referenced by create_sina_variables(), new_sina_simple(), and sina_start().

#define GA_AWAR_COLOR   GA_AWAR_ROOT "color"

Definition at line 83 of file graph_aligner_gui.cxx.

Referenced by create_sina_variables(), new_sina_simple(), and sina_start().

#define GA_AWAR_GENE_START   GA_AWAR_ROOT "gene_start"

Definition at line 84 of file graph_aligner_gui.cxx.

Referenced by create_sina_variables(), new_sina_simple(), and sina_start().

#define GA_AWAR_GENE_END   GA_AWAR_ROOT "gene_end"

Definition at line 85 of file graph_aligner_gui.cxx.

Referenced by create_sina_variables(), new_sina_simple(), and sina_start().

#define GA_AWAR_FS_COVER_GENE   GA_AWAR_ROOT "fs_cover_gene"

Definition at line 86 of file graph_aligner_gui.cxx.

Referenced by create_sina_variables(), new_sina_simple(), and sina_start().

#define GA_AWAR_USED_RELS   GA_AWAR_ROOT "write_used_rels"

Definition at line 87 of file graph_aligner_gui.cxx.

Referenced by create_sina_variables(), new_sina_simple(), and sina_start().

#define GA_AWAR_CALC_IDENTITY   GA_AWAR_ROOT "calc_idty"

Definition at line 88 of file graph_aligner_gui.cxx.

Referenced by create_sina_variables(), new_sina_simple(), and sina_start().

#define GA_AWAR_NOWARN_START   GA_AWAR_ROOT "nowarn_start"

Definition at line 89 of file graph_aligner_gui.cxx.

Referenced by create_sina_variables(), new_sina_simple(), and sina_start().

#define GA_AWAR_REFDB_MODE   GA_AWAR_ROOT "refdb_mode"
#define GA_AWAR_REFDB   GA_AWAR_ROOT "refdb"
#define GA_AWAR_REFDB_SELECT   GA_AWAR_TEMP "refdb"

Enumeration Type Documentation

enum RefDbMode
Enumerator
REF_EXPLICIT 
REF_LAST_SAVE 
REF_CURRENT 

Definition at line 94 of file graph_aligner_gui.cxx.

Enumerator
ARB_5_99 
ARB_7_1 

Definition at line 194 of file graph_aligner_gui.cxx.

Function Documentation

static void refDbModeChanged_cb ( AW_root root)
static
static void newRefDbSelected_cb ( AW_root root)
static
void create_sina_variables ( AW_root root,
AW_default  db1 
)
static const char* get_interface_id ( SinaArbInterfaceVersion  version)
static
static GB_ERROR detect_sina_version ( AW_root awr)
static
AW_active sina_mask ( AW_root awr)

Definition at line 284 of file graph_aligner_gui.cxx.

References AWM_ALL, AWM_DISABLED, and detect_sina_version().

Referenced by ED4_root::generate_window().

const char* stream2static ( const std::stringstream &  str)
inline

Definition at line 294 of file graph_aligner_gui.cxx.

References GBS_static_string().

Referenced by sina_start().

const char* empty_as_none ( const char sainame)
inline

Definition at line 298 of file graph_aligner_gui.cxx.

Referenced by sina_start().

static void sina_start ( AW_window window,
const AlignDataAccess data_access 
)
static

Definition at line 304 of file graph_aligner_gui.cxx.

References AISC_MAGIC_NUMBER, AlignDataAccess::alignment_name, ARB_5_99, ARB_7_1, arb_look_and_start_server(), aw_message(), aw_message_if(), AW_root::awar(), AWAR_PT_SERVER, AWAR_SPECIES_NAME, GBS_strstruct::cat(), GBS_strstruct::cat_sQuoted(), empty_as_none(), ga_assert, GA_AWAR_AUTOFILTER, GA_AWAR_CALC_IDENTITY, GA_AWAR_CMD, GA_AWAR_COLOR, GA_AWAR_FS_COVER_GENE, GA_AWAR_FS_MAX, GA_AWAR_FS_MIN, GA_AWAR_FS_MSC, GA_AWAR_FULL_MINLEN, GA_AWAR_GAP_EXT, GA_AWAR_GAP_PEN, GA_AWAR_GENE_END, GA_AWAR_GENE_START, GA_AWAR_INSERT, GA_AWAR_KMER_LEN, GA_AWAR_KMER_MM, GA_AWAR_KMER_NOFAST, GA_AWAR_KMER_NOREL, GA_AWAR_LOWERCASE, GA_AWAR_MATCH_SCORE, GA_AWAR_MIN_FULL, GA_AWAR_MIN_LEN, GA_AWAR_MISMATCH_SCORE, GA_AWAR_NOWARN_START, GA_AWAR_OVERHANG, GA_AWAR_PROTECTION, GA_AWAR_REALIGN, GA_AWAR_REFDB, GA_AWAR_SAI, GA_AWAR_SHOW_DIFF, GA_AWAR_SHOW_DIST, GA_AWAR_TGT, GA_AWAR_TURN_CHECK, GA_AWAR_USED_RELS, GA_AWAR_WEIGHT, GB_await_error(), GB_begin_transaction(), GB_commit_transaction(), GB_find(), GB_fopen_tempfile(), gb_main, AlignDataAccess::gb_main, GB_read_char_pntr(), GB_remove_on_exit(), GB_unique_filename(), GB_xcmd(), GBS_global_string(), GBS_read_arb_tcp(), GBT_first_marked_species(), GBT_next_marked_species(), GBS_strstruct::get_data(), AlignDataAccess::get_first_selected_species, AlignDataAccess::get_next_selected_species, AW_window::get_root(), NULp, GBS_strstruct::putfloat(), GBS_strstruct::putlong(), AW_awar::read_char_pntr(), AW_awar::read_float(), AW_awar::read_int(), AW_awar::read_string(), SEARCH_CHILD, stream2static(), used_sina_interface, and XCMD_ASYNC_WAITKEY.

Referenced by new_sina_simple().

static char* filter_posvar_SAI_for_ali ( GBDATA gb_extended,
const char ali_name 
)
static
static void accept_selected_ref_db ( AW_window aww,
const char *const *  awar_filename 
)
static
static AW_window* create_ref_db_selection_window ( AW_root aw_root)
static

Definition at line 559 of file graph_aligner_gui.cxx.

References accept_selected_ref_db(), awt_create_load_box(), and NULp.

Referenced by sina_select_ref_db().

static void sina_select_ref_db ( AW_window aww)
static
static void sina_cmd_changed_cb ( AW_root awr)
static
static AW_window_simple* new_sina_simple ( AW_root root,
const AlignDataAccess alignData,
bool  adv 
)
static
void show_sina_window ( UNFIXED  ,
const AlignDataAccess alignData 
)

Variable Documentation

Definition at line 198 of file graph_aligner_gui.cxx.

Referenced by detect_sina_version(), get_interface_id(), and new_sina_simple().

sina_arb_interface_def supported_sina_versions[]
static
Initial value:
= {
{ ARB_7_1, "ARB7.1" },
{ ARB_5_99, "ARB5.99" },
{ NO_INTERFACE, "<none>" },
}
const SinaArbInterfaceVersion NO_INTERFACE

Definition at line 205 of file graph_aligner_gui.cxx.

SinaArbInterfaceVersion used_sina_interface = NO_INTERFACE
static
AWT_config_mapping_def sina_config_mapping[]
static

Definition at line 505 of file graph_aligner_gui.cxx.

SinaArbInterfaceVersion gui_sina_interface = NO_INTERFACE
static

Definition at line 581 of file graph_aligner_gui.cxx.

Referenced by new_sina_simple(), and sina_cmd_changed_cb().