ARB
Classes | Functions | Variables
PT_match.cxx File Reference
#include "probe.h"
#include <PT_server_prototypes.h>
#include <struct_man.h>
#include "pt_split.h"
#include "probe_tree.h"
#include <arb_strbuf.h>
#include <arb_defs.h>
#include <arb_sort.h>
#include <cctype>
#include <map>
Include dependency graph for PT_match.cxx:

Go to the source code of this file.

Classes

class  Mismatches
 
class  MatchRequest
 
struct  format_props
 

Functions

void aisc_link (dll_public *dll, PT_probematch *match)
 
static int pt_sort_compare_match (const void *PT_probematch_ptr1, const void *PT_probematch_ptr2, void *)
 
static void pt_sort_match_list (PT_local *locs)
 
charcreate_reversed_probe (char *probe, int len)
 
CONSTEXPR_INLINE double calc_position_wmis (int pos, int seq_len, double y1, double y2)
 
static void pt_build_pos_to_weight (PT_MATCH_TYPE type, const char *sequence)
 
int probe_match (PT_local *locs, aisc_string probestring)
 
void set_max (const char *str, int &curr_max)
 
static format_props detect_format_props (const PT_local *locs, bool show_gpos)
 
void cat_internal (GBS_strstruct &memfile, int len, const char *text, int width, char spacer, bool align_left)
 
void cat_spaced_left (GBS_strstruct &memfile, const char *text, int width)
 
void cat_spaced_right (GBS_strstruct &memfile, const char *text, int width)
 
void cat_dashed_left (GBS_strstruct &memfile, const char *text, int width)
 
void cat_dashed_right (GBS_strstruct &memfile, const char *text, int width)
 
const charget_match_overlay (const PT_probematch *ml)
 
const charget_match_acc (const PT_probematch *ml)
 
int get_match_start (const PT_probematch *ml)
 
int get_match_stop (const PT_probematch *ml)
 
static const charget_match_info_formatted (PT_probematch *ml, const format_props &format)
 
static const charget_match_hinfo_formatted (PT_probematch *ml, const format_props &format)
 
static void gene_rel_2_abs (PT_probematch *ml)
 
bytestringmatch_string (const PT_local *locs)
 
bytestringMP_match_string (const PT_local *locs)
 
bytestringMP_all_species_string (const PT_local *)
 
int MP_count_all_species (const PT_local *)
 

Variables

static std::map< PT_local
*, Splits
splits_for_match_overlay
 

Function Documentation

void aisc_link ( dll_public *  dll,
PT_probematch *  match 
)
inline

Definition at line 25 of file PT_match.cxx.

Referenced by MatchRequest::add_hit(), and pt_sort_match_list().

static int pt_sort_compare_match ( const void *  PT_probematch_ptr1,
const void *  PT_probematch_ptr2,
void *   
)
static

Definition at line 285 of file PT_match.cxx.

References cmp, psg, PT_MATCH_TYPE_INTEGER, and probe_struct_global::sort_by.

Referenced by pt_sort_match_list().

static void pt_sort_match_list ( PT_local *  locs)
static
char* create_reversed_probe ( char probe,
int  len 
)

reverse order of bases in a probe

Definition at line 335 of file PT_match.cxx.

References ARB_strduplen(), and reverse_probe().

Referenced by get_design_info(), and probe_match().

CONSTEXPR_INLINE double calc_position_wmis ( int  pos,
int  seq_len,
double  y1,
double  y2 
)

Definition at line 342 of file PT_match.cxx.

Referenced by pt_build_pos_to_weight().

static void pt_build_pos_to_weight ( PT_MATCH_TYPE  type,
const char sequence 
)
static
int probe_match ( PT_local *  locs,
aisc_string  probestring 
)
void set_max ( const char str,
int curr_max 
)
inline

Definition at line 454 of file PT_match.cxx.

Referenced by detect_format_props().

static format_props detect_format_props ( const PT_local *  locs,
bool  show_gpos 
)
static
void cat_internal ( GBS_strstruct memfile,
int  len,
const char text,
int  width,
char  spacer,
bool  align_left 
)
inline
void cat_spaced_left ( GBS_strstruct memfile,
const char text,
int  width 
)
inline

Definition at line 516 of file PT_match.cxx.

References cat_internal().

Referenced by get_match_info_formatted().

void cat_spaced_right ( GBS_strstruct memfile,
const char text,
int  width 
)
inline

Definition at line 517 of file PT_match.cxx.

References cat_internal().

Referenced by get_match_info_formatted().

void cat_dashed_left ( GBS_strstruct memfile,
const char text,
int  width 
)
inline

Definition at line 518 of file PT_match.cxx.

References cat_internal().

Referenced by get_match_hinfo_formatted().

void cat_dashed_right ( GBS_strstruct memfile,
const char text,
int  width 
)
inline

Definition at line 519 of file PT_match.cxx.

References cat_internal().

Referenced by get_match_hinfo_formatted().

const char* get_match_overlay ( const PT_probematch *  ml)
const char* get_match_acc ( const PT_probematch *  ml)

Definition at line 606 of file PT_match.cxx.

References probe_struct_global::data, probe_input_data::get_acc(), and psg.

int get_match_start ( const PT_probematch *  ml)

Definition at line 609 of file PT_match.cxx.

References probe_struct_global::data, probe_input_data::get_start(), and psg.

int get_match_stop ( const PT_probematch *  ml)

Definition at line 612 of file PT_match.cxx.

References probe_struct_global::data, probe_input_data::get_stop(), and psg.

static const char* get_match_info_formatted ( PT_probematch *  ml,
const format_props format 
)
static
static const char* get_match_hinfo_formatted ( PT_probematch *  ml,
const format_props format 
)
static
static void gene_rel_2_abs ( PT_probematch *  ml)
static

after gene probe match all positions are gene-relative. gene_rel_2_abs() makes them genome-absolute.

Definition at line 685 of file PT_match.cxx.

References probe_struct_global::data, probe_struct_global::gb_main, probe_input_data::get_geneabspos(), psg, pt_assert, and ta.

Referenced by match_string().

bytestring* match_string ( const PT_local *  locs)

Create list of species where probe matches.

header^1name^1info^1name^1info....^0 (where ^0 and ^1 are ASCII 0 and 1)

Implements server function 'MATCH_STRING'

Definition at line 705 of file PT_match.cxx.

References GBS_strstruct::cat(), bytestring::data, detect_format_props(), format(), gene_flag, gene_rel_2_abs(), get_match_hinfo_formatted(), get_match_info_formatted(), GBS_strstruct::get_position(), NULp, GBS_strstruct::put(), GBS_strstruct::release(), bytestring::size, and virt_name().

bytestring* MP_match_string ( const PT_local *  locs)

Create list of species where probe matches and append number of mismatches and weighted mismatches (used by multiprobe)

Format: "header^1name^1#mismatches^1#wmismatches^1name^1#mismatches^1#wmismatches....^0" (where ^0 and ^1 are ASCII 0 and 1)

Implements server function 'MP_MATCH_STRING'

Definition at line 741 of file PT_match.cxx.

References GBS_strstruct::cat(), bytestring::data, GBS_strstruct::erase(), GBS_strstruct::get_data(), GBS_strstruct::get_position(), GBS_strstruct::nprintf(), NULp, GBS_strstruct::put(), bytestring::size, and virt_name().

bytestring* MP_all_species_string ( const PT_local *  )

Create list of all species known to PT server

Format: ^1name^1name....^0 (where ^0 and ^1 are ASCII 0 and 1)

Implements server function 'MP_ALL_SPECIES_STRING'

Definition at line 769 of file PT_match.cxx.

References GBS_strstruct::cat(), bytestring::data, probe_struct_global::data, probe_struct_global::data_count, GBS_strstruct::erase(), GBS_strstruct::get_data(), GBS_strstruct::get_position(), probe_input_data::get_shortname(), NULp, psg, GBS_strstruct::put(), and bytestring::size.

int MP_count_all_species ( const PT_local *  )

Definition at line 792 of file PT_match.cxx.

References probe_struct_global::data_count, and psg.

Variable Documentation

std::map<PT_local*,Splits> splits_for_match_overlay
static

Definition at line 362 of file PT_match.cxx.