ARB
|
#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>
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) |
char * | create_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 char * | get_match_overlay (const PT_probematch *ml) |
const char * | get_match_acc (const PT_probematch *ml) |
int | get_match_start (const PT_probematch *ml) |
int | get_match_stop (const PT_probematch *ml) |
static const char * | get_match_info_formatted (PT_probematch *ml, const format_props &format) |
static const char * | get_match_hinfo_formatted (PT_probematch *ml, const format_props &format) |
static void | gene_rel_2_abs (PT_probematch *ml) |
bytestring * | match_string (const PT_local *locs) |
bytestring * | MP_match_string (const PT_local *locs) |
bytestring * | MP_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 |
|
inline |
Definition at line 25 of file PT_match.cxx.
Referenced by MatchRequest::add_hit(), and pt_sort_match_list().
|
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 |
Definition at line 312 of file PT_match.cxx.
References aisc_link(), aisc_unlink(), ARB_calloc(), GB_sort(), NULp, psg, pt_sort_compare_match(), and probe_struct_global::sort_by.
Referenced by probe_match().
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 |
Definition at line 346 of file PT_match.cxx.
References calc_position_wmis(), probe_struct_global::pos_to_weight, psg, and PT_MATCH_TYPE_WEIGHTED_PLUS_POS.
Referenced by get_match_overlay(), and probe_match().
int probe_match | ( | PT_local * | locs, |
aisc_string | probestring | ||
) |
find out where a given probe matches
Definition at line 364 of file PT_match.cxx.
References MatchRequest::allowed_mismatches(), ARB_strdup(), MatchRequest::collect_hits_for(), complement_probe(), compress_data(), create_reversed_probe(), GBS_global_string(), locs, probe_struct_global::main_probe, MIN_PROBE_LENGTH, psg, pt_assert, pt_build_pos_to_weight(), pt_export_error(), pt_sort_match_list(), probe_struct_global::reversed, probe_struct_global::TREE_ROOT2(), and y.
Definition at line 454 of file PT_match.cxx.
Referenced by detect_format_props().
|
static |
Definition at line 461 of file PT_match.cxx.
References probe_struct_global::ecoli, format_props::ecoli_width, format(), GBS_global_string(), gene_flag, format_props::gene_or_full_width, format_props::gpos_width, info2bio(), format_props::name_width, format_props::pos_width, psg, PT_abs_2_ecoli_rel(), set_max(), format_props::show_ecoli, format_props::show_gpos, format_props::show_mismatches, virt_fullname(), and virt_name().
Referenced by match_string().
|
inline |
Definition at line 487 of file PT_match.cxx.
References GBS_strstruct::cat(), pt_assert, and GBS_strstruct::put().
Referenced by cat_dashed_left(), cat_dashed_right(), cat_spaced_left(), and cat_spaced_right().
|
inline |
Definition at line 516 of file PT_match.cxx.
References cat_internal().
Referenced by get_match_info_formatted().
|
inline |
Definition at line 517 of file PT_match.cxx.
References cat_internal().
Referenced by get_match_info_formatted().
|
inline |
Definition at line 518 of file PT_match.cxx.
References cat_internal().
Referenced by get_match_hinfo_formatted().
|
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 | ) |
Definition at line 521 of file PT_match.cxx.
References base_2_readable(), Splits::check(), probe_struct_global::data, probe_input_data::get_dataPtr(), probe_input_data::get_size(), is_std_base(), locs, NULp, psg, pt_build_pos_to_weight(), result, and seq.
Referenced by get_match_info_formatted().
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 |
Definition at line 616 of file PT_match.cxx.
References GBS_strstruct::cat(), cat_spaced_left(), cat_spaced_right(), format_props::ecoli_width, GBS_global_string(), format_props::gene_or_full_width, get_match_overlay(), format_props::gpos_width, info2bio(), format_props::mis_width(), format_props::N_mis_width(), format_props::name_width, NULp, format_props::pos_width, PT_abs_2_ecoli_rel(), GBS_strstruct::release(), result, format_props::rev_width(), format_props::show_ecoli, format_props::show_gpos, format_props::show_mismatches, virt_fullname(), virt_name(), and format_props::wmis_width().
Referenced by match_string().
|
static |
Definition at line 644 of file PT_match.cxx.
References ARB_strdup(), GBS_strstruct::cat(), cat_dashed_left(), cat_dashed_right(), format_props::ecoli_width, gene_flag, format_props::gene_or_full_width, format_props::gpos_width, format_props::mis_width(), format_props::N_mis_width(), format_props::name_width, NULp, format_props::pos_width, probe_2_readable(), GBS_strstruct::put(), GBS_strstruct::release(), result, format_props::rev_width(), seq, format_props::show_ecoli, format_props::show_gpos, format_props::show_mismatches, and format_props::wmis_width().
Referenced by match_string().
|
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.
|
static |
Definition at line 362 of file PT_match.cxx.