+ ++line_count;
+ // setup loop by getting file's first line
+ multiplatform_getline(para_file, line);
+ // strip leading/trailing whitespace
+ boost::trim(line);
+ // ignore commented out or blank lines
+ if ( line.size() == 0 or line[0] == '#' ) {
+ continue;
+ }
+
+ // split the line on white spance
+ boost::split(tokens, line, boost::is_space());
+ // do we have a name/value pair?
+ if (tokens.size() != 2) {
+ std::stringstream errmsg;
+ errmsg << "Error parsing MUPA file line: "
+ << line_count << std::endl
+ << line;
+ throw mussa_load_error(errmsg.str());
+ }
+
+ boost::to_upper(tokens[0]);
+ // Parameters only useful after a sequence block
+ if (parsing_state == INSEQUENCE) {
+ // in the following if blocks, if we do
+ // successfully match a token we should continue
+ // on to the next token
+ // but if we don't match a token we want to
+ // fall through to the top level parsing
+
+ if (tokens[0] == "FASTA_INDEX") {
+ fasta_index = atoi(tokens[1].c_str());
+ continue;
+ } else if (tokens[0] == "ANNOTATION") {
+ annot_file = file_path_base / tokens[1];
+ continue;
+ } else if (tokens[0] == "SEQ_START") {
+ sub_seq_start = atoi(tokens[1].c_str());
+ continue;
+ } else if (tokens[0] == "SEQ_END") {
+ sub_seq_end = atoi(tokens[1].c_str());
+ continue;
+ } else {
+ // any other token means we're done with this
+ // sequence so we should load it
+ // (and let the "unknown" token fall through into the
+ // top level token parser)
+ load_sequence(seq_file, annot_file, fasta_index, sub_seq_start,
+ sub_seq_end);
+ parsing_state = START;
+ }
+ }
+ // if we didn't consume a token from the previous if block
+ // try
+ // top level token parsing
+ if (tokens[0] == "ANA_NAME") {
+ analysis_name = tokens[1];
+ } else if (tokens[0] == "APPEND_WIN") {