15 #include <PT_server.h>
50 #define AWAR_PROBE_CREATE_GENE_SERVER "tmp/probe_admin/gene_server" // whether to create a gene pt server
52 #define AWAR_ITARGET_STRING "nt/itarget_string"
57 #define AWAR_PD_SELECTED_MATCH "tmp/probe_design/match"
58 #define AWAR_PD_MATCH_RESOLVE "tmp/probe_design/match_resolve" // for IUPAC resolution
60 #define AWAR_PD_MATCH_SORTBY "probe_match/sort_by" // weighted mismatches
61 #define AWAR_PD_MATCH_ALSO_REVCOMP "probe_match/complement" // check reverse complement too
62 #define AWAR_PD_MATCH_MARKHITS "probe_match/mark_hits" // mark hitten species in database
63 #define AWAR_PD_MATCH_WRITE2TMP "probe_match/write_2_tmp" // write result to field tmp
64 #define AWAR_PD_MATCH_AUTOMATCH "probe_match/auto_match" // auto match probes when target string changes
66 #define AWAR_PD_MATCH_NHITS "tmp/probe_match/nhits" // display the 'number of hits'
70 #define AWAR_PD_DESIGN_CLIPRESULT "probe_design/CLIPRESULT" // 'length of output' (how many probes will get designed)
71 #define AWAR_PD_DESIGN_MISHIT "probe_design/MISHIT" // 'non group hits'
72 #define AWAR_PD_DESIGN_MAXBOND "probe_design/MAXBOND" // max hairpinbonds ?
73 #define AWAR_PD_DESIGN_MINTARGETS "probe_design/MINTARGETS" // 'min. group hits (%)'
75 #define AWAR_PD_DESIGN_MIN_LENGTH "probe_design/PROBELENGTH" // min. length of probe
76 #define AWAR_PD_DESIGN_MAX_LENGTH "probe_design/PROBEMAXLENGTH" // max. length of probe (or empty)
78 #define AWAR_PD_DESIGN_MIN_TEMP "probe_design/MINTEMP" // temperature (min)
79 #define AWAR_PD_DESIGN_MAX_TEMP "probe_design/MAXTEMP" // temperature (max)
80 #define AWAR_PD_DESIGN_MIN_GC "probe_design/MINGC" // GC content (min)
81 #define AWAR_PD_DESIGN_MAX_GC "probe_design/MAXGC" // GC content (max)
82 #define AWAR_PD_DESIGN_MIN_ECOLIPOS "probe_design/MINECOLI" // ecolipos (min)
83 #define AWAR_PD_DESIGN_MAX_ECOLIPOS "probe_design/MAXECOLI" // ecolipos (max)
85 #define AWAR_PD_DESIGN_GENE "probe_design/gene" // generate probes for genes ?
88 #define AWAR_PD_COMMON_EXP_BONDS_FORMAT "probe_design/bonds/pos%i" // format to generate bond awar names
89 #define AWAR_PD_COMMON_EXP_SPLIT "probe_design/SPLIT"
91 #define AWAR_PD_DESIGN_EXP_DTEDGE "probe_design/DTEDGE"
92 #define AWAR_PD_DESIGN_EXP_DT "probe_design/DT"
94 #define AWAR_PD_MATCH_NMATCHES "probe_match/nmatches"
95 #define AWAR_PD_MATCH_LIM_NMATCH "probe_match/lim_nmatch"
96 #define AWAR_PD_MATCH_MAX_RES "probe_match/maxres"
102 #define AWAR_PC_TARGET_STRING "probe_collection/target_string"
103 #define AWAR_PC_TARGET_NAME "probe_collection/target_name"
104 #define AWAR_PC_MATCH_WEIGHTS "probe_collection/match_weights/pos"
105 #define AWAR_PC_MATCH_WIDTH "probe_collection/match_weights/width"
106 #define AWAR_PC_MATCH_BIAS "probe_collection/match_weights/bias"
107 #define AWAR_PC_AUTO_MATCH "probe_collection/auto"
108 #define AWAR_PC_CURRENT_COLLECTION "probe_collection/current"
110 #define AWAR_PC_SELECTED_PROBE "tmp/probe_collection/probe"
111 #define AWAR_PC_MATCH_NHITS "tmp/probe_collection/nhits"
114 #define AWAR_PC_MISMATCH_THRESHOLD "probe_collection/mismatch_threshold"
116 #define REPLACE_TARGET_CONTROL_CHARS ":#=_:\\:=_"
140 refresh_sai_display =
false;
152 : event_param(event_param_), disable(disable_)
168 if (!auto_match_cb_settings.
disable) {
170 if (strlen(ts) > 0) {
187 static bool callback_active =
false;
191 if (!callback_active) {
192 for (
int i = 0; auto_match_sensitive_awars[i]; ++i) {
198 if (callback_active) {
199 for (
int i = 0; auto_match_sensitive_awars[i]; ++i) {
204 callback_active = bool(autoMatch);
208 if (!event_param && auto_match_cb_settings.
initialized()) {
231 PD.win =
new AW_window_simple;
232 PD.win->init(root,
"PD_RESULT",
"PD RESULT");
233 PD.win->load_xfig(
"pd_reslt.fig");
235 PD.win->button_length(6);
236 PD.win->auto_space(10, 10);
240 PD.win->create_button(
"HELP",
"HELP",
"H");
242 PD.win->at(
"result");
246 PD.resultList->clear();
247 PD.resultList->insert_default(
"No probes designed yet",
"");
249 PD.win->at(
"buttons");
252 PD.win->create_button(
"CLOSE",
"CLOSE",
"C");
255 PD.win->create_button(
"CLEAR",
"CLEAR",
"R");
258 PD.win->create_button(
"LOAD",
"LOAD",
"L");
261 PD.win->create_button(
"SAVE",
"SAVE",
"S");
264 PD.win->create_button(
"PRINT",
"PRINT",
"P");
267 PD.win->create_button(
"MATCH",
"MATCH",
"M");
269 PD.win->label(
"Auto match");
281 MAIN_LOCS, PT_LOCS,
PD.locs,
351 const char *species_name =
NULp;
362 const char *gene_name =
NULp;
365 if (!gb_gene_name) { error =
gene_requires(gb_gene,
"name");
break; }
413 for (
int i=0; i<16; i++) {
422 LOCS_SPLIT, (
double)commonSettings.
split,
426 for (
int i=0; i<16; i++) {
429 LOCS_BONDVAL, (
double)commonSettings.
bonds[i],
476 LOCS_MATCH_N_ACCEPT, (
long)matchSettings.
nmatches,
477 LOCS_MATCH_N_LIMIT, (
long)matchSettings.
nlimit,
478 LOCS_MATCH_MAX_HITS, (
long)matchSettings.
maxhits,
486 int i = atoi(awar_val);
493 int ulast = unames.
size()-1;
494 int umax = ulast <= 10 ? ulast : 10;
495 for (
int u = 0; u <= umax; ++u) {
496 if (u) readable.
cat(u == ulast ?
" and " :
", ");
497 readable.
cat(unames[u]);
500 if (umax<ulast) readable.
nprintf(30,
" (and %i other)", ulast-umax);
514 progress.
subtitle(
"Connecting PT-server");
520 if (!
PD.link) error =
"can't contact PT server";
526 error =
"Cannot contact to probe server: Connection Refused";
530 if (design_gene_probes) {
536 if (design_gene_probes) {
549 progress.
subtitle(
"probe design running");
552 LOCS_PROBE_DESIGN_CONFIG, PT_PDC, pdc,
566 aw_message(
"Connection to PT_SERVER lost (1)");
571 aw_message(
"Connection to PT_SERVER lost (1)");
577 PDC_CHECKSUMS, &check,
584 PDC_UNKNOWN_NAMES, &unknown_names,
587 aw_message(
"Connection to PT_SERVER lost (1)");
593 if (unknown_names.
size>1) {
599 if (design_gene_probes) {
601 "It knows nothing about the following genes:\n"
605 "You have to rebuild the PT server.",
611 "It knows nothing about the following species:\n"
615 "You may now temporarily add these sequences for probe design.\n",
617 "Add and continue,Abort"))
630 for (
size_t u = 0; !abort && u<unames_array.
size(); ++u) {
631 const char *uname = unames_array[u];
651 PDC_SEQUENCE, PT_SEQUENCE, pts,
652 SEQUENCE_SEQUENCE, &bs_seq,
659 free(readable_unames);
660 free(unknown_names.
data);
668 progress.
subtitle(
"Reading results from server");
670 char *locs_error =
NULp;
672 LOCS_ERROR, &locs_error,
675 aw_message(
"Connection to PT_SERVER lost (1)");
678 else if (*locs_error) {
690 PDC_TPROBE, tprobe.as_result_param(),
694 PD.resultList->clear();
697 char *match_info =
NULp;
699 PDC_INFO_HEADER, &match_info,
702 char *
s = strtok(match_info,
"\n");
704 PD.resultList->insert(s,
"");
705 s = strtok(
NULp,
"\n");
710 while (tprobe.exists()) {
711 T_PT_TPROBE tprobe_next;
712 char *match_info =
NULp;
715 TPROBE_NEXT, tprobe_next.as_result_param(),
716 TPROBE_INFO, &match_info,
719 tprobe.assign(tprobe_next);
722 probe = strpbrk(match_info,
"acgtuACGTU");
723 if (probe) space = strchr(probe,
' ');
724 if (probe && space) {
725 *space = 0; probe =
ARB_strdup(probe); *space=
' ';
730 PD.resultList->insert(match_info, probe);
734 PD.resultList->insert_default(
"",
"");
735 PD.resultList->update();
747 #if defined(ASSERTION_USED)
752 Maybe dontWriteAwars;
766 if (!gb_main) { error =
"Please open probe match window once to enable auto-match"; }
775 selection_id->
clear();
785 progress->
subtitle(
"Connecting PT-server");
789 if (!error && !
PD.link) error =
"Cannot contact PT-server";
799 if (show_status) progress->
subtitle(
"Probe match running");
802 LOCS_MATCH_ALSO_REVCOMP, (
long)matchSettings.
alsoRevcompl,
803 LOCS_COMPLEMENT_FIRST, (
long)0,
804 LOCS_MATCH_SORT_BY, (
long)matchSettings.
sortBy,
805 LOCS_MATCH_MAX_MISMATCHES, (
long)matchSettings.
maxMismatches,
806 LOCS_SEARCHMATCH, probe,
809 error =
"Connection to PT_SERVER lost (2)";
823 long matches_truncated = 0;
825 if (show_status) progress->
subtitle(
"Reading results");
827 T_PT_MATCHLIST match_list;
828 long match_list_cnt = 0;
829 char *locs_error =
NULp;
832 LOCS_MATCH_LIST, match_list.as_result_param(),
833 LOCS_MATCH_LIST_CNT, &match_list_cnt,
834 LOCS_MATCH_STRING, &bs,
835 LOCS_MATCHES_TRUNCATED, &matches_truncated,
836 LOCS_ERROR, &locs_error,
839 error =
"Connection to PT_SERVER lost (3)";
847 error =
"Missing status from server (connection aborted?)";
852 if (matches_truncated) {
853 aw_message(
"Too many matches, displaying a random digest.\n"
854 "Increase the limit in the expert window.");
859 long unknown_species_count = 0;
860 long unknown_gene_count = 0;
863 char toksep[2] = { 1, 0 };
864 char *strtok_ptr =
NULp;
865 const char *hinfo = strtok_r(bs.
data, toksep, &strtok_ptr);
869 char *
result = ARB_alloc<char>(1024);
883 const char *searched =
GBS_global_string(
"%-*s%s", width,
"Searched for ", probe);
884 selection_id->
insert(searched, probe);
885 if (hinfo) selection_id->
insert(hinfo,
"");
891 int mark = extras && matchSettings.
markHits;
892 int write_2_tmp = extras && matchSettings.
write2tmp;
897 if (mark && !error) {
898 if (show_status) progress->
subtitle(gene_flag ?
"Unmarking all species and genes" :
"Unmarking all species");
924 if (write_2_tmp && !error) {
925 if (show_status) progress->
subtitle(
"Deleting old 'tmp' fields");
947 if (show_status) progress->
subtitle(
"Parsing results");
954 error =
"Wrong PT-Server chosen (selected one is built for genes)";
959 const char *match_name =
NULp;
960 while (hinfo && !error && (match_name = strtok_r(
NULp, toksep, &strtok_ptr))) {
961 const char *match_info = strtok_r(
NULp, toksep, &strtok_ptr);
962 if (!match_info)
break;
966 char *gene_str =
NULp;
978 if (gene_flag && strncmp(gene_str,
"intergene_", 10) != 0) {
1008 GBDATA *gb_parent = gene_flag ? gb_gene : gb_species;
1025 char *concatenatedContent = ARB_alloc<char>(strlen(prevContent)+1+strlen(match_info)+1);
1026 sprintf(concatenatedContent,
"%s\n%s", prevContent, match_info);
1028 free(concatenatedContent);
1041 flags[0] = flags[1] =
'?';
1042 unknown_species_count++;
1047 sprintf(result,
"%s %s", flags, match_info+1);
1048 char *gene_match_name =
new char[strlen(match_name) + strlen(gene_str)+2];
1049 sprintf(gene_match_name,
"%s/%s", match_name, gene_str);
1050 if (selection_id) selection_id->
insert(result, gene_match_name);
1053 sprintf(result,
"%c %s", flags[0], match_info);
1054 if (selection_id) selection_id->
insert(result, match_name);
1077 if (unknown_species_count>0) {
1078 error =
GBS_global_string(
"%li matches hit unknown species -- PT-server is out-of-date or build upon a different database", unknown_species_count);
1080 if (unknown_gene_count>0 && !error) {
1081 error =
GBS_global_string(
"%li matches hit unknown genes -- PT-server is out-of-date or build upon a different database", unknown_gene_count);
1090 if (counter) *counter = mcount;
1096 const char *last_line =
NULp;
1098 else if (matches_truncated) last_line =
"****** List is truncated *******";
1099 else last_line =
"****** End of List *******";
1131 arb_progress progress(
"Matching all resolved strings", iselection_id->
size());
1133 const bool got_result = selentry;
1137 matchSettings.targetString = entry;
1145 #define DISP_FORMAT "%7i %s"
1146 const char *displayed;
1162 iselection_id->
sort(
true,
true);
1177 if (strchr(selected_match,
'/')) {
1178 temp = strtok(selected_match,
"/");
1180 temp = strtok(
NULp,
" /\n");
1192 free(selected_match);
1196 static bool avoid_recursion =
false;
1197 if (!avoid_recursion) {
1205 if (maxChanged) awar_minl->
write_int(maxl);
1212 static bool avoid_recursion =
false;
1213 if (!avoid_recursion) {
1222 if (currMin>currMax) {
1243 double default_bonds[16] = {
1250 for (
int i=0; i<16; i++) {
1319 float default_weights[16] = {0.0};
1320 float default_width = 1.0;
1321 float default_bias = 0.0;
1324 g_probe_collection.
getParameters(default_weights, default_width, default_bias);
1325 g_probe_collection.
clear();
1329 for (
int i = 0; i < 16 ; i++) {
1337 g_probe_collection.
setParameters(default_weights, default_width, default_bias);
1344 if (current && current[0]) {
1349 for (
size_t i = 0; i<probes.
size(); ++i) {
1350 const char *
probe = probes[i];
1351 const char *colon = strchr(probe,
':');
1355 const char *
seq = colon+1;
1356 g_probe_collection.
add(name, seq);
1370 AW_window_simple *aws =
new AW_window_simple;
1372 aws->init(root,
"PD_exp",
"Probe Design (Expert)");
1376 aws->init(root,
"PM_exp",
"Probe Match (Expert)");
1377 aws->load_xfig(
"pm_spec.fig");
1380 aws->label_length(30);
1381 aws->button_length(10);
1385 aws->create_button(
"CLOSE",
"CLOSE",
"C");
1387 aws->callback(
makeHelpCallback(for_design ?
"pd_spec_param.hlp" :
"pm_spec_param.hlp"));
1389 aws->create_button(
"HELP",
"HELP",
"C");
1391 for (
int i=0; i<16; i++) {
1393 sprintf(bondAt,
"%i", i);
1445 for (
int i = 0; i<16; ++i) {
1457 AW_window_simple *aws =
new AW_window_simple;
1458 aws->init(root,
"PROBE_DESIGN",
"PROBE DESIGN");
1460 aws->load_xfig(
"pd_main.fig");
1464 aws->create_button(
"CLOSE",
"CLOSE",
"C");
1468 aws->create_button(
"HELP",
"HELP",
"H");
1473 aws->create_button(
"GO",
"GO",
"G");
1477 aws->create_button(
"RESULT",
"RESULT",
"S");
1481 aws->create_button(
"EXPERT",
"EXPERT",
"S");
1483 aws->at(
"pt_server");
1484 aws->label(
"PT-Server:");
1505 aws->label(
"Gene probes?");
1519 for (
int i=0; s[i]; i++) {
1520 s[i] = toupper(s[i]);
1525 selection_id->
clear();
1538 int index = ali_type==
GB_AT_RNA ? 1 : 0;
1541 if (istring && istring[0]) {
1544 int bases_to_resolve = 0;
1545 char *istr = istring;
1546 int istring_length = strlen(istring);
1551 if (i==
'?')
continue;
1565 int *offsets_to_resolve =
new int[bases_to_resolve];
1566 int resolutions = 1;
1570 int offset_count = 0;
1580 offsets_to_resolve[offset_count++] =
offset;
1589 int *resolution_idx =
new int[bases_to_resolve];
1590 int *resolution_max_idx =
new int[bases_to_resolve];
1593 for (i=0; i<bases_to_resolve; i++) {
1594 resolution_idx[i] = 0;
1600 char *
buffer =
new char[istring_length+1];
1601 int not_last = resolutions-1;
1607 memcpy(buffer, istring, istring_length+1);
1608 for (i=0; i<bases_to_resolve; i++) {
1609 int off = offsets_to_resolve[i];
1616 selection_id->
insert(buffer, buffer);
1620 int nidx = bases_to_resolve-1;
1622 while (!done && nidx>=0) {
1623 if (resolution_idx[nidx]<resolution_max_idx[nidx]) {
1624 resolution_idx[nidx]++;
1633 while (nidx<bases_to_resolve) resolution_idx[nidx++] = 0;
1637 delete [] resolution_max_idx;
1638 delete [] resolution_idx;
1644 delete [] offsets_to_resolve;
1694 free(target_string);
1702 AW_window_simple *aws =
new AW_window_simple;
1704 aws->init(root,
"PROBE_MATCH_RESOLVE_IUPAC",
"Resolve IUPAC for Probe Match");
1707 aws->button_length(11);
1711 aws->create_button(
"CLOSE",
"CLOSE",
"C");
1715 aws->create_button(
"HELP",
"HELP",
"H");
1731 aws->at(
"match_all");
1733 aws->create_button(
"MATCH_ALL",
"Match all",
"M");
1737 aws->create_button(
"CLEAR",
"Clear",
"r");
1739 aws->at(
"iupac_info");
1741 aws->create_button(
"IUPAC_INFO",
"IUPAC info",
"I");
1743 awar_itarget->
touch();
1775 static AW_window_simple *aws =
NULp;
1777 aws =
new AW_window_simple;
1779 aws->init(root,
"PROBE_MATCH",
"PROBE MATCH");
1780 aws->load_xfig(
"pd_match.fig");
1782 aws->auto_space(5, 5);
1786 aws->create_button(
"CLOSE",
"CLOSE",
"C");
1790 aws->create_button(
"HELP",
"HELP",
"H");
1798 selection_id->
insert_default(
"****** No results yet *******",
"");
1803 aws->create_button(
"PRINT",
"PRINT",
"P");
1805 aws->at(
"matchSai");
1806 aws->help_text(
"saiProbe.hlp");
1808 aws->create_button(
"MATCH_SAI",
"Match SAI",
"S");
1812 aws->create_button(
"EXPERT",
"EXPERT",
"X");
1814 aws->at(
"pt_server");
1817 aws->at(
"complement");
1823 aws->at(
"weighted");
1826 aws->at(
"mismatches");
1835 aws->button_length(9);
1840 aws->create_button(
"MATCH",
"MATCH",
"D");
1849 aws->create_button(
"CLEAR",
"Clear",
"0");
1852 aws->at(
"revcompl");
1853 aws->create_button(
"REVCOMPL",
"RevCompl",
"R");
1857 aws->create_button(
"COMPL",
"Compl",
"C");
1861 aws->create_button(
"IUPAC",
"IUPAC",
"I");
1878 GBS_global_string(
"Are you sure to stop %s", kill_all ?
"all servers" :
"that server")))
1885 while (pt_servers[max]) max++;
1891 arb_progress progress(
"Stopping PT-servers..", max-min+1);
1894 for (
int i = min; i <= max && !
error; i++) {
1896 error =
"no server selected to stop";
1923 return GBS_global_string(
"echo 'Contents of directory %s:'; echo; (cd \"%s\"; ls -hl); echo; "
1924 "echo 'Available disk space in %s:'; echo; df -h \"%s\"; echo; ",
1926 dirname, directory);
1935 if (server_id == -1) {
1936 error =
"No pt-server selected.";
1946 query_cmd.
cat(
"echo 'Running ARB programs:'; echo; ");
1955 query_cmd.
cat(arb_who);
1972 if (create_gene_server && !
GEN_is_genome_db(gb_main, -1)) create_gene_server =
false;
1975 if (create_gene_server) {
1987 if (alitype ==
GB_AT_AA) error =
"The PT-server does only support RNA/DNA sequence data";
1996 if (server_num == -1) {
1997 error =
"no pt-server selected.";
2002 "This function will send your loaded database to the pt_server,\n"
2003 "which will need a long time (up to several hours) to analyse the data.\n"
2004 "Until the new server has analyzed all data, no server functions are available.\n\n"
2005 "Note 1: You must have the write permissions to do that ($ARBHOME/lib/pts/xxx))\n"
2006 "Note 2: The server will do the job in background,\n"
2007 " quitting this program won't affect the server",
2011 progress.
subtitle(
"Stopping PT-server");
2015 const char *file =
NULp;
2029 progress.
subtitle(
"Exporting the database");
2032 if (create_gene_server) {
2034 error =
GB_save_as(gb_main, temp_server_name, mode);
2038 progress.
subtitle(
"Preparing DB for gene PT server");
2042 if (error) error =
GBS_global_string(
"Couldn't convert database for gene pt server\n(Reason: %s)", error);
2045 free(temp_server_name);
2054 char *dir =
const_cast<char*
>(strrchr(file,
'/'));
2065 progress.
subtitle(
"Start PT-server (builds in background)");
2086 AW_window_simple *aws =
new AW_window_simple;
2087 aws->init(root,
"PT_SERVER_ADMIN",
"PT_SERVER ADMIN");
2089 aws->load_xfig(
"pd_admin.fig");
2094 aws->create_button(
"HELP",
"HELP",
"H");
2098 aws->create_button(
"CLOSE",
"CLOSE",
"C");
2100 aws->button_length(18);
2102 aws->at(
"pt_server");
2107 aws->create_button(
"START_SERVER",
"Start server");
2111 aws->create_button(
"KILL_SERVER",
"Stop server");
2115 aws->create_button(
"CHECK_SERVER",
"Check server");
2117 aws->at(
"kill_all");
2119 aws->create_button(
"KILL_ALL_SERVERS",
"Stop all servers");
2123 aws->create_button(
"CREATE_TEMPLATE",
"Configure");
2127 aws->create_button(
"EDIT_LOG",
"Build history");
2131 aws->create_button(
"VIEW_SERVER_LOG",
"View server log");
2135 aws->create_button(
"UPDATE_SERVER",
"Build server");
2138 aws->at(
"gene_server");
2139 aws->label(
"Gene server?");
2149 static AW_window_simple *aws =
NULp;
2152 aws =
new AW_window_simple;
2154 aws->init(root,
"MATCH_DISPLAYCONTROL",
"MATCH DISPLAY CONTROL");
2156 aws->auto_space(10, 10);
2157 aws->label_length(35);
2159 const int FIELDSIZE = 5;
2160 const int SCALERSIZE = 500;
2162 aws->label(
"Mismatch threshold");
2167 aws->label(
"Clade marked threshold");
2172 aws->label(
"Clade partially marked threshold");
2178 aws->create_autosize_button(
"MARKER_SETTINGS",
"Marker display settings",
"d");
2219 int nPercent = (
int)(100.0 * nItem / nItems);
2228 if (pContext->
pFile) {
2230 fprintf(pContext->
pFile,
"%s\n", pResult);
2245 float mismatchThreshold;
2251 const MatchMap& results;
2254 : mismatchThreshold(misThres),
2260 std::pair<MatchMapIter,MatchMapIter> iter = results.equal_range(speciesName);
2262 for (; iter.first != iter.second ; ++iter.first) {
2264 if (pMatchResult->
weight() <= mismatchThreshold) {
2265 int nProbe = pMatchResult->
index();
2276 ArbProbe *find_probe(
int markerIdx)
const {
2280 if (markerIdx>=0 && markerIdx<
int(rProbeList.size())) advance(wanted, markerIdx);
2281 else wanted = rProbeList.end();
2283 return wanted == rProbeList.end() ?
NULp : *wanted;
2297 getMatchesContext->
detect(speciesName, matches);
2305 else fprintf(stderr,
"ProbeCollDisplay::handle_click: no probe found for markerIdx=%i\n", markerIdx);
2320 bool redraw =
false;
2354 g_results_manager.
reset();
2362 const long nItems = rProbeList.size();
2366 int nProbeIndex = 0;
2371 arb_progress progress(
"Matching probe collection", nItems);
2376 const ArbProbe *pProbe = *ProbeIter;
2380 ArbMatchResultSet *pResultSet = g_results_manager.
addResultSet(pProbe);
2394 pResultSet->initialise(pProbe, nProbeIndex);
2400 if (parser.get_error()) {
2404 int nStartFullName = 0;
2405 int nEndFullName = 0;
2407 parser.getColumnRange(
"fullname", &nStartFullName, &nEndFullName);
2409 pResultSet->headline(g_spd->
getHeadline(), nEndFullName);
2414 for (
int cn = 0 ; cn < nMatches && !
error ; cn++) {
2419 if (parsed.get_error()) {
2423 char *pName = parsed.get_column_content(
"name",
true);
2424 char *pFullName = parsed.get_column_content(
"fullname",
true);
2425 const char *pMatchPart = parsed.get_probe_region();
2427 pResultSet->add(pName,
2440 if (error) error =
GBS_global_string(
"while matching probe #%li: %s", nItem, error);
2451 arb_progress progress(
"Writing results to file", 100L);
2460 fclose(Context.
pFile);
2472 g_results_manager.
reset();
2483 if (newMaxWeight != oldMaxWeight) {
2485 newMaxWeight =
std::max(newMaxWeight, 0.000001);
2530 if (pSequence && pSequence[0]) {
2541 if (pSequence && pSequence[0]) {
2554 static AW_window_simple *aws =
NULp;
2559 aws =
new AW_window_simple;
2561 aws->init(root,
"PROBE_MATCH_WITH_SPECIFICITY",
"PROBE MATCH WITH SPECIFICITY");
2563 aws->load_xfig(
"pd_match_with_specificity.fig");
2567 aws->create_button(
"CLOSE",
"CLOSE",
"C");
2571 aws->create_button(
"HELP",
"HELP",
"H");
2580 PM_Context.
ntw = ntw;
2584 aws->create_button(
"RESULTS",
"RESULTS",
"R");
2586 aws->at(
"pt_server");
2594 aws->create_button(
"EDIT",
"EDIT",
"E");
2598 aws->create_button(
"MATCH",
"MATCH",
"M");
2602 aws->create_button(
"FORGET",
"FORGET",
"F");
2605 aws->label(
"Auto match");
2613 aws->create_autosize_button(
"CONTROL",
"Display control",
"D");
2621 awar_automatch->
touch();
2646 const ArbProbe *pProbe = *ProbeIter;
2649 saved = saved +
'#'+pProbe->
name()+
':'+pProbe->
sequence();
2660 const ArbProbe *pProbe = *ProbeIter;
2674 if (ProbeCollection.
openXML(pFileName, sErrorMessage)) {
2682 g_probe_collection = ProbeCollection;
2690 for (cn = 0; cn < 16 ; cn++) {
2725 for (cn = 0; cn < 16 ; cn++) {
2742 struct stat FileStatus;
2743 int nResult = ::stat(pFileName, &FileStatus);
2747 bWrite = (
aw_question(
"probe_collection_save",
"File already exists. Overwrite?",
"YES,NO") == 0);
2770 if (!pSequence || !pSequence[0]) {
2771 error =
"Please enter a target string";
2774 error =
"Target string already in collection";
2790 error =
"failed to add probe";
2809 bool sequenceChanged =
false;
2812 if (!pSequence || !pSequence[0]) {
2813 error =
"Please enter a target string";
2815 else if (!oldSequence || !oldSequence[0]) {
2816 error =
"Please select probe to modify";
2819 sequenceChanged = strcmp(oldSequence, pSequence) != 0;
2820 if (sequenceChanged) {
2822 error =
"Target string already in collection";
2843 error =
"failed to replace probe";
2866 if (selection_id->
size() < 1) {
2886 static char *awar_name =
NULp;
2888 ".",
"xpc", &awar_name,
2892 static char *awar_name =
NULp;
2894 ".",
"xpc", &awar_name,
2924 static AW_window_simple *aws =
NULp;
2931 aws =
new AW_window_simple;
2933 aws->init(root,
"PROBE_COLLECTION",
"PROBE COLLECTION");
2935 aws->load_xfig(
"pd_match_probe_collection.fig");
2939 aws->create_button(
"CLOSE",
"CLOSE",
"C");
2943 aws->create_button(
"HELP",
"HELP",
"H");
2961 aws->create_button(
"ADD",
"ADD",
"A");
2965 aws->create_button(
"MODIFY",
"MODIFY",
"M");
2969 aws->create_button(
"REMOVE",
"REMOVE",
"R");
2973 aws->create_button(
"LOAD",
"LOAD",
"L");
2977 aws->create_button(
"SAVE",
"SAVE",
"S");
2981 aws->create_button(
"CLEAR",
"CLEAR",
"L");
2983 for (
int i = 0 ; i < 16 ; i++) {
2984 sprintf(buffer,
"%i", i);
2987 aws->create_input_field(buffer, 4);
3011 void TEST_pd_get_the_names() {
3030 TEST_EXPECT_EQUAL(checksum.
data,
"2170459355#3425507407#727314028#2492024995#2931521641#2778470002");
3032 free(checksum.
data);
3038 static void mark_all_genes(
GBDATA *gb_main) {
3046 void TEST_pd_get_the_gene_names() {
3053 mark_all_genes(gb_main);
3061 TEST_EXPECT_EQUAL(bs.
data,
"genome1/gene1#genome1/gene2#genome1/gene3#genome1/joined1#genome2/gene1#genome2/gene2#genome2/gene3#genome2/joined1");
3062 TEST_EXPECT_EQUAL(checksum.
data,
"2151640631#4022586387#1662310901#364505133#84218586#1757287028#1057001327#2202967910");
3064 free(checksum.
data);
3070 #endif // UNIT_TESTS
AutoMatchSettings(ProbeMatchEventParam *event_param_, bool disable_)
const char * GBS_ptserver_logname(void)
GB_ERROR GB_begin_transaction(GBDATA *gbd)
ArbMatchResultSet * addResultSet(const ArbProbe *pProbe)
GB_ERROR GBK_system(const char *system_command)
void set_marker_display(MarkerDisplay *display)
#define AWAR_PC_MISMATCH_THRESHOLD
static void selected_probe_changed_cb(AW_root *root)
GBDATA * GB_open(const char *path, const char *opent)
void sort(bool backward, bool case_sensitive)
void cut_tail(size_t byte_count)
static void target_string_changed_cb(AW_root *root)
static void trigger_auto_match(AW_root *root)
AW_awar * set_srt(const char *srt)
#define AWAR_SAVED_DB_PATH
#define AWAR_PD_MATCH_LIM_NMATCH
AW_window * create_probe_design_window(AW_root *root, GBDATA *gb_main)
GetMatchesContext(float misThres, int numProbes)
GBDATA * GEN_next_gene(GBDATA *gb_gene)
void add(const char *awar_name, const char *config_name)
GBDATA * GBT_first_marked_species(GBDATA *gb_main)
static GB_ERROR pd_get_the_gene_names(GBDATA *gb_main, bytestring &bs, bytestring &checksum)
#define AWAR_PD_MATCH_ALSO_REVCOMP
GBDATA * GBT_first_marked_species_rel_species_data(GBDATA *gb_species_data)
static void match_changed_cb(AW_root *root)
#define AWAR_PC_MATCH_WIDTH
const char * get_error() const
ProbeCollDisplay(int numProbes)
return string(buffer, length)
std::vector< std::string > probeSeq
#define AWAR_PD_DESIGN_MINTARGETS
void select_element_at(int wanted_index)
GB_ERROR GB_append_exportedError(GB_ERROR error)
GB_ERROR GBT_restore_marked_species(GBDATA *gb_main, const char *stored_marked)
void set_displayed(const char *disp)
GB_ERROR GB_write_string(GBDATA *gbd, const char *s)
#define AWAR_PROBE_CREATE_GENE_SERVER
void load_xfig(const char *file, bool resize=true)
const TypedSelectionList & get_typedsellist() const
const ArbProbePtrList & probeList() const
void insert_default(const char *displayed, const AW_scalar &value)
#define AWAR_SPV_DB_FIELD_NAME
GBDATA * GEN_find_gene(GBDATA *gb_species, const char *name)
AW_window * createSaiProbeMatchWindow(AW_root *awr, GBDATA *gb_main)
void AW_edit(const char *path)
#define AWAR_PD_DESIGN_EXP_DT
AW_window * awt_create_load_box(AW_root *aw_root, const char *action, const char *what, const char *default_directory, const char *file_extension, char **set_file_name_awar, const WindowCallback &ok_cb, const WindowCallback &close_cb, const char *close_button_text)
char * GBT_complementNucSequence(const char *s, int len, char T_or_U)
void create_probe_design_variables(AW_root *root, AW_default props, AW_default db)
static void modify_probe_event(AW_window *aww, ArbPC_Context *pContext)
long GB_mode_of_file(const char *path)
int aisc_close(aisc_com *link, AISC_Object &object)
const char *const members
char * get_column_content(const char *columnName, bool chop_spaces) const
#define AWAR_PD_DESIGN_MIN_TEMP
AW_selection_list * selection_id
GB_ERROR GB_end_transaction(GBDATA *gbd, GB_ERROR error)
#define AWAR_PD_MATCH_AUTOMATCH
static void probe_match_event_using_awars(AW_root *root, ProbeMatchEventParam *event_param)
void awt_clear_selection_list_cb(AW_window *, AW_selection_list *sellist)
AW_selection_list * selection_id
GBDATA * GBT_get_alignment(GBDATA *gb_main, const char *aliname)
static int init_local_com_struct()
double maximumWeight() const
#define AWAR_PC_MATCH_WEIGHTS
ArbProbePtrList::const_iterator ArbProbePtrListConstIter
const char * ARB_getenv_ignore_empty(const char *envvar)
static void pd_export_pt_server(AW_window *aww, GBDATA *gb_main)
char * ARB_strdup(const char *str)
AW_selection_list * resultList
void AWT_insert_config_manager(AW_window *aww, AW_default default_file_, const char *id, const StoreConfigCallback &store_cb, const RestoreConfigCallback &load_or_reset_cb, const char *macro_id, const AWT_predefined_config *predef)
#define AWAR_DEFAULT_ALIGNMENT
AW_window * create_probe_match_with_specificity_window(AW_root *root, TREE_canvas *ntw)
#define AWAR_SPV_DB_FIELD_WIDTH
GB_ERROR arb_look_and_start_server(long magic_number, const char *arb_tcp_env)
static void auto_match_cb(AW_root *root)
static void probe_collection_close(AW_window *aww)
static saiProbeData * g_spd
GB_ERROR arb_look_and_kill_server(int magic_number, const char *arb_tcp_env)
AW_awar * set_minmax(float min, float max)
ArbPM_Context * PM_Context
static void probelength_changed_cb(AW_root *root, bool maxChanged)
void delete_element_at(int index)
const char * GBS_global_string(const char *templat,...)
int aisc_nput(aisc_com *link, int o_type, const AISC_Object &object,...)
#define AWAR_PD_COMMON_EXP_BONDS_FORMAT
#define AWAR_MAX_MISMATCHES
bool displays_probeColl_markers(MarkerDisplay *md)
#define AWAR_PD_DESIGN_CLIPRESULT
char * GBS_string_eval(const char *insource, const char *icommand)
void AW_POPDOWN(AW_window *window)
static AW_window * probe_collection_save_prompt(AW_root *root)
#define AWAR_PD_DESIGN_MISHIT
void cat(const char *from)
int get_index_of_selected()
static void save_probe_collection(AW_window *aww, const char *const *awar_filename)
char * ARB_strpartdup(const char *start, const char *end)
#define AWAR_DTREE_GROUP_MARKED_THRESHOLD
static void probe_collection_update_parameters()
int allowedMismatches() const
ProbeMatchEventParam(GBDATA *gb_main_, AW_selection_list *id)
static void setup_probe_config(AWT_config_definition &cdef, const AWT_config_mapping_def *mapping)
char * GBS_ptserver_id_to_choice(int i, int showBuild)
GBDATA * GB_get_grandfather(GBDATA *gbd)
static bool probe_match_with_specificity_enum_callback(void *pVoidContext, const char *pResult, bool bIsComment, int nItem, int nItems)
char buffer[MESSAGE_BUFFERSIZE]
GB_ERROR GB_push_transaction(GBDATA *gbd)
GB_ERROR arb_start_server(const char *arb_tcp_env, int do_sleep)
void incMarker(size_t markerIdx)
#define DOWNCAST(totype, expr)
static const char * ptserver_directory_info_command(const char *dirname, const char *directory)
static GB_ERROR pd_get_the_names(GBDATA *gb_main, bytestring &bs, bytestring &checksum)
bool openXML(const char *pFileAndPath, std::string &rErrorMessage)
GB_ERROR error_if_aborted()
AW_awar * add_callback(const RootCallback &cb)
GB_ERROR GB_delete(GBDATA *&source)
static void modify_target_string(AW_window *aww, GBDATA *gb_main, ModMode mod_mode)
static int probe_match_send_data(const ProbeMatchSettings &matchSettings)
#define TEST_EXPECT_MORE(val, ref)
GBDATA * GBT_first_species_rel_species_data(GBDATA *gb_species_data)
void insert(const char *displayed, const AW_scalar &value)
const char * get_string() const
void setHeadline(const char *hline)
static struct aisc_static_set_mem md
static AW_window * probe_collection_load_prompt(AW_root *root, ArbPC_Context *pContext)
static void pd_query_pt_server(AW_window *aww)
#define AWAR_SPV_SELECTED_PROBE
const char * read_char_pntr() const
static AW_window * create_IUPAC_resolve_window(AW_root *root, GBDATA *gb_main)
#define AWAR_PD_DESIGN_MIN_LENGTH
void handle_click(int markerIdx, AW_MouseButton, AWT_graphic_exports &) OVERRIDE
int aisc_put(aisc_com *link, int o_type, const AISC_Object &object,...)
size_t GB_read_string_count(GBDATA *gbd)
GB_ERROR GB_await_error()
static AW_root * SINGLETON
static ArbPM_Context PM_Context
#define AWAR_PC_SELECTED_PROBE
AW_window * TREE_create_marker_settings_window(AW_root *root)
static AutoMatchSettings auto_match_cb_settings
WindowCallback makeHelpCallback(const char *helpfile)
const char * getHeadline() const
void detect(std::string speciesName, NodeMarkers &matches) const
void getParameters(float aValues[16], float &dWidth, float &dBias) const
static void pd_start_pt_server(AW_window *aww)
const char * GBS_read_arb_tcp(const char *env)
static void pd_edit_ptserver_log(AW_window *)
int get_probe_region_offset() const
void awt_edit_arbtcpdat_cb(AW_window *)
NOT4PERL void GBT_reverseComplementNucSequence(char *seq, long length, char T_or_U)
const char * GBS_scan_arb_tcp_param(const char *ipPort, const char *wantedParam)
ArbProbeCollection & get_probe_collection()
AW_window * AWT_create_IUPAC_info_window(AW_root *aw_root)
AW_awar * awar_float(const char *var_name, float default_value=0.0, AW_default default_file=AW_ROOT_DEFAULT)
bool remove(const char *pSequence)
char * createCallOnSocketHost(const char *host, const char *remotePrefix, const char *command, SpawnMode spawnmode, const char *logfile)
GBDATA * GEN_first_marked_gene(GBDATA *gb_species)
static int probe_design_send_data(AW_root *root, const T_PT_PDC &pdc)
static void pd_view_server_console(AW_window *)
static void probe_match_with_specificity_edit_event()
void hide_marker_display()
const char * resultsFileName() const
int enumerate_results(ArbMatchResultsEnumCallback pCallback, void *pContext)
void index(int nIndex) const
void transferProbeData(saiProbeData *spd)
bool add(const char *pName, const char *pSequence, const ArbProbe **ppProbe=NULp)
#define AWAR_PD_MATCH_MAX_RES
static void popup_probe_design_result_window(AW_window *aww, GBDATA *gb_main)
MarkerDisplay * get_marker_display()
GB_ERROR GB_save_as(GBDATA *gbd, const char *path, const char *savetype)
#define AWAR_PD_MATCH_NHITS
static int weights[MAX_BASETYPES][MAX_BASETYPES]
static void load_probe_collection(AW_window *aww, ArbPC_Context *Context, const char *const *awar_filename)
AW_selection_list * probes_id
static const char * auto_match_sensitive_awars[]
#define TEST_REJECT_NULL(n)
static void probe_match_all_event(AW_window *aww, AW_selection_list *iselection_id, GBDATA *gb_main)
static void remove_probe_from_collection_event(AW_window *aww, ArbPC_Context *pContext)
static void error(const char *msg)
#define AWAR_PD_DESIGN_MAXBOND
static void add_probe_to_collection_event(AW_window *aww, ArbPC_Context *pContext)
#define AWAR_TREE_REFRESH
static void show_probes_in_sellist(const ArbProbePtrList &rProbeList, AW_selection_list *sellist)
static AWT_config_mapping_def probe_design_mapping_def[]
static void popup_match_window_cb(AW_window *aww, GBDATA *gb_main)
#define AWAR_PD_MATCH_WRITE2TMP
ArbMatchResultsManager & get_results_manager()
static __ATTR__USERESULT GB_ERROR probe_match_event(const ProbeMatchSettings &matchSettings, ProbeMatchEventParam *event_param)
static char * readableUnknownNames(const ConstStrArray &unames)
GBDATA * GBT_next_marked_species(GBDATA *gb_species)
const char * get_error() const
ArbMatchResultPtrByStringMultiMap::const_iterator ArbMatchResultPtrByStringMultiMapConstIter
#define AWAR_PD_DESIGN_MAX_GC
ProbeMatchEventParam(GBDATA *gb_main_, int *counter_)
void create_print_box_for_selection_lists(AW_window *aw_window, const TypedSelectionList *typedsellist)
static void clear_itarget(AW_window *aww)
const Nuc_Group nuc_group[26][2]
static void probe_forget_matches_event(AW_window *aww, ArbPM_Context *pContext)
GB_alignment_type GBT_get_alignment_type(GBDATA *gb_main, const char *aliname)
#define AWAR_PD_DESIGN_MAX_LENGTH
#define AWAR_SPECIES_NAME
const std::string & displayName() const
GBDATA * GEN_find_gene_data(GBDATA *gb_species)
GBDATA * GEN_next_organism(GBDATA *gb_organism)
#define AWAR_TARGET_STRING
#define AWAR_PD_SELECTED_MATCH
#define AWAR_PD_COMMON_EXP_SPLIT
NOT4PERL GB_ERROR GB_xcmd(const char *cmd, XCMD_TYPE exectype) __ATTR__USERESULT_TODO
int GB_read_flag(GBDATA *gbd)
GBDATA * GBT_find_species_rel_species_data(GBDATA *gb_species_data, const char *name)
static void resolved_probe_chosen(AW_root *root)
#define AWAR_PD_MATCH_NMATCHES
char * read_string() const
static WindowCallback simple(void(*root_cb)(AW_root *, T), T t)
#define AWAR_PC_TARGET_STRING
AW_awar * awar(const char *awar)
GB_ERROR GB_pop_transaction(GBDATA *gbd)
GBDATA * GBT_find_sequence(GBDATA *gb_species, const char *aliname)
GB_ERROR GB_set_mode_of_file(const char *path, long mode)
char * GBT_read_gene_sequence(GBDATA *gb_gene, bool use_revComplement, char partSeparator)
AW_awar * remove_callback(const RootCallback &cb)
void awt_create_PTSERVER_selection_list(AW_window *aws, const char *varname)
AW_window * create_load_box_for_selection_lists(AW_root *aw_root, const StorableSelectionList *storabsellist)
static void probe_design_event(AW_window *aww, GBDATA *gb_main)
void awt_create_PTSERVER_selection_button(AW_window *aws, const char *varname)
long GBT_count_marked_species(GBDATA *gb_main)
#define AWAR_PD_MATCH_MARKHITS
const char * arb_look_and_start_ptserver(int magic_number, int ptserver_id, GB_ERROR &error)
#define AISC_MAGIC_NUMBER
const ArbProbeMatchWeighting & matchWeighting() const
#define AWAR_PD_DESIGN_MIN_ECOLIPOS
bool aw_ask_sure(const char *unique_id, const char *msg)
static void minmax_awar_pair_changed_cb(AW_root *root, bool maxChanged, const char *minAwarName, const char *maxAwarName)
const char * get_marker_name(int markerIdx) const OVERRIDE
static void resolve_IUPAC_target_string(AW_root *root, AW_selection_list *selection_id, GBDATA *gb_main)
std::vector< std::string > probeSpecies
int aw_question(const char *unique_id, const char *question, const char *buttons, bool sameSizeButtons, const char *helpfile)
#define AWAR_PD_DESIGN_MAX_ECOLIPOS
const char *const * GBS_get_arb_tcp_entries(const char *matching)
#define AWAR_PC_CURRENT_COLLECTION
#define AWAR_PC_MATCH_NHITS
std::list< ArbProbe * > ArbProbePtrList
GB_ERROR GB_export_errorf(const char *templat,...)
ProbeCommonSettings(AW_root *root)
AW_awar * awar_int(const char *var_name, long default_value=0, AW_default default_file=AW_ROOT_DEFAULT)
void retrieve_marker_state(const char *speciesName, NodeMarkers &matches) OVERRIDE
static void gc_minmax_changed_cb(AW_root *root, bool maxChanged)
static void clear_probe_collection_event(AW_window *aww, ArbPC_Context *pContext)
void GB_write_flag(GBDATA *gbd, long flag)
static AW_window * create_probe_match_specificity_control_window(AW_root *root)
static int ecolipos2int(const char *awar_val)
str readable(const copy< T > &v)
static GB_ERROR gene_requires(GBDATA *gb_gene, const char *whats_required)
const AW_scalar * get_value() const
static ArbPC_Context PC_Context
GB_CSTR GB_getenvUSER(void)
#define REPLACE_TARGET_CONTROL_CHARS
static void auto_match_changed(AW_root *root)
#define AWAR_PC_MATCH_BIAS
static void probe_match_update_probe_list(ArbPM_Context *pContext)
aisc_com * aisc_open(const char *path, AISC_Object &main_obj, long magic, GB_ERROR *error)
#define __ATTR__USERESULT
void nprintf(size_t maxlen, const char *templat,...) __ATTR__FORMAT_MEMBER(2)
const std::string & sequence() const
bool is_gene_result() const
static void save_probe_list_to_DB(const ArbProbePtrList &rProbeList, AW_root *root)
static void temp_minmax_changed_cb(AW_root *root, bool maxChanged)
#define AWAR_PD_DESIGN_EXP_DTEDGE
void subtitle(const char *stitle)
char * GB_read_string(GBDATA *gbd)
#define AWAR_PROBE_ADMIN_PT_SERVER
AW_window * create_save_box_for_selection_lists(AW_root *aw_root, const StorableSelectionList *storabsellist)
const char * GBS_static_string(const char *str)
void setProbeTarget(const char *target)
#define AWAR_PD_MATCH_RESOLVE
const char * bond_awar_name(int i)
ProbeMatchSettings(AW_root *root)
uint32_t GBS_checksum(const char *seq, int ignore_case, const char *exclude)
#define TEST_EXPECT_NO_ERROR(call)
void aw_message(const char *msg)
static int probe_common_send_data(const ProbeCommonSettings &commonSettings)
ProbeMatchEventParam * event_param
GBDATA * GEN_first_gene(GBDATA *gb_species)
GBDATA * GBT_next_species(GBDATA *gb_species)
GBDATA * GBT_find_species(GBDATA *gb_main, const char *name)
void AWT_system_in_console_cb(AW_window *, const char *command, XCMD_TYPE exectype)
int aisc_get(aisc_com *link, int o_type, const AISC_Object &object,...)
#define AWAR_PD_DESIGN_MAX_TEMP
static AWT_config_mapping_def probe_match_mapping_def[]
GB_ERROR write_string(const char *aw_string)
void GBT_split_string(ConstStrArray &dest, const char *namelist, const char *separator, SplitMode mode)
#define AWAR_PC_AUTO_MATCH
static void selected_match_changed_cb(AW_root *root)
char * GBT_get_default_alignment(GBDATA *gb_main)
static SmartPtr< GetMatchesContext > getMatchesContext
const char * get_data() const
#define AWAR_PD_DESIGN_MIN_GC
void setParameters(const float aValues[16], float dWidth, float dBias)
static AW_window * create_probe_collection_window(AW_root *root, ArbPM_Context *pContext)
void GBS_add_ptserver_logentry(const char *entry)
GB_transaction ta(gb_var)
GB_CSTR GB_read_char_pntr(GBDATA *gbd)
std::multimap< std::string, ArbMatchResult * > ArbMatchResultPtrByStringMultiMap
AW_awar * awar_string(const char *var_name, const char *default_value="", AW_default default_file=AW_ROOT_DEFAULT)
GB_ERROR write_float(float aw_float)
GBDATA * GEN_next_marked_gene(GBDATA *gb_gene)
const std::string & name() const
const char * GBS_ptserver_tag(int id)
GBDATA * GB_search(GBDATA *gbd, const char *fieldpath, GB_TYPES create)
GBDATA * GEN_first_organism(GBDATA *gb_main)
static GB_ERROR species_requires(GBDATA *gb_species, const char *whats_required)
GB_CSTR GBT_get_name_or_description(GBDATA *gb_item)
bool GEN_is_genome_db(GBDATA *gb_main, int default_value)
static void pd_kill_pt_server(AW_window *aww, bool kill_all)
static void probe_match_with_specificity_event(AW_root *root, TREE_canvas *ntw)
AW_window * create_probe_match_window(AW_root *root, GBDATA *gb_main)
#define AWAR_ITARGET_STRING
bool saveXML(const char *pFileAndPath) const
void GBT_splitNdestroy_string(ConstStrArray &names, char *&namelist, const char *separator, SplitMode mode)
static void enable_auto_match_cb(AW_root *root, ProbeMatchEventParam *event_param)
#define AWAR_SPV_ACI_COMMAND
#define AWAR_DTREE_GROUP_PARTIALLY_MARKED_THRESHOLD
static void popupSaiProbeMatchWindow(AW_window *aw, GBDATA *gb_main)
#define AWAR_PD_MATCH_SORTBY
static bool allow_probe_match_event
#define TEST_EXPECT_EQUAL(expr, want)
GB_ERROR write_int(long aw_int)
#define AWAR_PD_DESIGN_GENE
static AW_window * create_probe_expert_window(AW_root *root, bool for_design)
AW_window * create_probe_admin_window(AW_root *root, GBDATA *gb_main)
GBDATA * GB_entry(GBDATA *father, const char *key)
void inc_and_check_user_abort(GB_ERROR &error)
int aisc_create(aisc_com *link, int father_type, const AISC_Object &father, int attribute, int object_type, AISC_Object &object,...)
static void refresh_matchedProbesDisplay_cb(AW_root *root, TREE_canvas *ntw)
size_t get_position() const
void aw_message_if(GB_ERROR error)
bool GB_supports_mapfile(void)
char * GBS_global_string_copy(const char *templat,...)
void GB_close(GBDATA *gbd)
#define AWAR_PC_TARGET_NAME
NOT4PERL GB_ERROR GBT_determine_T_or_U(GB_alignment_type alignment_type, char *T_or_U, const char *supposed_target)
const ArbProbe * find(const char *pSequence) const
#define AWAR_SPV_SAI_2_PROBE
GBDATA * GBT_get_species_data(GBDATA *gb_main)
GB_write_int const char s