14 #define HELIX_PAIRS "helix_pairs"
15 #define HELIX_LINE "helix_line"
16 #define ALI_CONSENSUS "ALI_CON"
17 #define ALI_ERROR "ALI_ERR"
18 #define ALI_INTERVALS "ALI_INT"
27 "\nALIGNER V2.0 (Boris Reichel 5/95)\n";
31 "-s<species> aligne the sequence of <species>",
32 "-f<species_1>,...,<species_n>[;<extension_1>,...,<extension_k>] use specified family and family extension",
33 "-P<pt_server> use the PT_server <pt_server>",
34 "[-D<db_server>] use the DB_server <db_server>",
35 "[-nx] not exclusive mode (profile)",
36 "[-ms] mark species (profile)",
37 "[-mf] mark used family (profile)",
38 "[-mfe] mark used family extension (profile)",
39 "[-mgf] multi gap factor (0.1) (profile)",
40 "[-if] insert factor (2.0) (profile)",
41 "[-mif] multi insert factor (0.5) (profile)",
42 "[-m] mark all (-m == -ms -mf -mfe) (profile)",
43 "[-d<filename>] use <filename> for default values",
44 "[-msubX1,X2,...,X25] use X1,...,X25 for the substitute matrix: (profile)",
48 " g X11 X12 X13 X14 X15",
49 " u X16 X17 X18 X19 X20",
50 " - X21 X22 X23 X24 X25",
51 "[-mbindX1,X2,...,X25] use X1,...,X25 for the binding matrix: (profile)",
55 " g X11 X12 X13 X14 X15",
56 " u X16 X17 X18 X19 X20",
57 " - X21 X22 X23 X24 X25",
58 "[-maxf] maximal number of family members (10) (profile)",
59 "[-minf] minimal number of family members (5) (profile)",
60 "[-minw] minimal weight for family members (0.7) (profile)",
61 "[-maxew] maximal weight for family extension members (0.2) (profile)",
62 "unused [-cl] cost threshold (low) (0.25) ALI_ERR = ','",
63 "unused [-cm] cost threshold (middle) (0.5) ALI_ERR = '-'",
64 "unused [-ch] cost threshold (high) (0.8) ALI_ERR = '='",
65 "[-mm] maximal number of maps for solution (prealigner) (1000)",
66 "[-mma] maximal number of maps for aligner (prealigner) (2)",
67 "[-csub] cost threshold for substitution (prealigner) (0.5)",
68 "[-chel] cost threshold for helix binding (prealigner) (2.0)",
69 "[-ec] error count (prealigner) (2)",
70 "[-ib] interval border (prealigner) (5)",
71 "[-ic] interval center (prealigner) (5)",
80 for (i = 0; ali_man_line[i]; i++)
81 fprintf(stderr,
"%s\n", ali_man_line[i]);
86 fprintf(stderr,
"FATAL ERROR %s: %s\n", func, message);
91 fprintf(stderr,
"ERROR %s: %s\n", func, message);
99 while (species_number > 0 && *species_string !=
'\0') {
100 while (*species_string !=
'\0' && *species_string !=
',')
102 if (*species_string !=
'\0')
107 if (*species_string !=
'\0') {
108 while (*species_string !=
'\0' && *species_string !=
',')
109 *buffer++ = *species_string++;
125 while (*seq1 !=
'\0' && *seq2 !=
'\0') {
151 while (*seq_new !=
'\0' && *seq_orig !=
'\0') {
152 if (*seq_new != *seq_orig) {
160 ali_error(
"Unexpected character in original sequence");
169 ali_error(
"Unexpected character in original sequence");
178 ali_error(
"Unexpected character in original sequence");
195 *seq_new = *seq_orig;
209 if (*seq_new == *seq_orig)
219 char message_buffer[200];
220 char species_name[100], species_number;
228 aligs.
init(&argc, (
const char**)argv);
231 printf(
"Unknowen : ");
232 for (i = 1; i < argc; i++)
233 printf(
"%s ", argv[i]);
244 sprintf(message_buffer,
245 "\nStarting alignment of sequence: %s", species_name);
253 if (!align_sequence) {
254 ali_error(
"Can't read sequence from database");
259 char *align_string_original;
261 align_string = align_sequence->
string();
285 0, align_profile->
length() - 1);
286 ALI_SEQUENCE *align_pre_sequence_i, *align_pre_sequence;
289 align_pre_sequence_i = align_prealigner->
sequence();
291 align_pre_solution = align_prealigner->
solution();
293 delete align_prealigner;
295 align_pre_solution->
print();
299 String = align_pre_sequence_i->string();
301 freeset(String, align_pre_sequence->string());
307 sprintf(message_buffer,
"%d solutions generated (taking the first)",
315 approx_elem = align_pre_approx->
first();
318 String = sequence->
string();
321 ali_error(
"Bases changed in output sequence");
334 free(align_string_original);
335 delete align_pre_solution;
336 delete align_pre_approx;
337 delete align_profile;
338 delete align_pre_sequence;
339 delete align_pre_sequence_i;
341 delete align_sequence;
int ARB_main(int argc, char *argv[])
char * get_sequence_string(char *name, int and_mark=0)
static const char * ali_man_line[]
ALI_SEQUENCE * sequence()
int put_SAI(const char *name, char *sequence)
static const char * ali_version
char buffer[MESSAGE_BUFFERSIZE]
ALI_PREALIGNER_CONTEXT preali_context
static int get_species(char *species_string, unsigned int species_number, char *buffer)
char * cheapest_sequence()
ALI_NORM_SEQUENCE * sequence()
void init(int *argc, const char *argv[])
void message(char *errortext)
ALI_SEQUENCE * get_sequence(char *name, int and_mark=0)
void ali_error(const char *message, const char *func)
ALI_TLIST< ali_prealigner_approx_element * > * approximation()
void ali_fatal_error(const char *message, const char *func)
static int convert_for_back_write(char *seq_new, char *seq_orig)
void ali_warning(const char *message)
unsigned long sequence_length()
void ali_message(const char *message)
ALI_SUB_SOLUTION * solution()
static int check_base_invariance(char *seq1, char *seq2)
ALI_SEQUENCE * sequence_without_inserts()
void commit_transaction()
char * borders_sequence()
int put_sequence_string(char *name, char *sequence)
ALI_SEQUENCE * sequence(ALI_NORM_SEQUENCE *ref_seq)
ALI_PROFILE_CONTEXT prof_context