cerr << "Minimum overlap bases is " << Min_Overlap << endl;
int  main    (int argc, char * argv [])  {   Bank_t  read_bank (Read_t::NCode( ));   Celera_Message_t  msg;   Read_t  read;   FILE  * input_fp;   string  label = "Contig";   string  cid;   vector <char *>  string_list, qual_list;   vector <char *>  tag_list;   vector <int>  offset;   vector <int>  ref;   vector <Range_t>  pos, clr_list;   vector < vector <int> >  del_list;   Gapped_Multi_Alignment_t  gma;   time_t  now;   long  status;   int  contig_ct, unitig_ct;      try     {      now = time (NULL);      cerr << "Starting on " << ctime (& now) << endl;      Verbose = 0;      Parse_Command_Line (argc, argv);      cerr << "Read bank is " << Bank_Name << endl;      status = cerr . setf (ios :: fixed);      cerr << "Alignment error rate is " << setprecision (2)           << Error_Rate << endl;      cerr . setf (status);      gma . setPrintFlag (PRINT_WITH_DIFFS);      if  (Input_Format == CELERA_MSG_INPUT)          {           cerr << "Processing ";           if  (Do_Contig_Messages)               cerr << "contig";             else               {                cerr << "unitig";                label = "Unitig";               }           cerr << " messages from file " << Tig_File_Name << endl;           input_fp = File_Open (Tig_File_Name . c_str (), "r");           read_bank . open (Bank_Name);           unitig_ct = contig_ct = 0;           while  (msg . read (input_fp))             {              if  (msg . getMsgType () == IUM_MSG && Do_Unitig_Messages)                  {                   cerr << "Process unitig " << msg . getAccession () << endl;                   Get_Strings_And_Offsets                       (string_list, qual_list, clr_list, tag_list, offset,                        msg, read_bank);                   try                     {                      cid = msg . getAccession ();                      Multi_Align (cid, string_list, offset, ALIGN_WIGGLE,                           Error_Rate, Min_Overlap, gma, & ref, & tag_list);                     }                   catch (AlignmentException_t)                     {                      cerr << "Failed on unitig " << msg . getAccession () << endl;                      throw;                     }                   Permute (qual_list, ref);                   Permute (clr_list, ref);                   gma . Set_Flipped (clr_list);                   gma . Get_Positions (pos);                   gma . Extract_IMP_Dels (del_list);                   msg . Update_IMPs (pos, ref, del_list);                   Output_Unit (label, msg . getAccession (),                        msg . getNumFrags (), gma, msg, string_list,                        qual_list, clr_list, tag_list);                   unitig_ct ++;                  }              if  (msg . getMsgType () == ICM_MSG && Do_Contig_Messages)                  {                   contig_ct ++;                  }             }           if  (Do_Unitig_Messages)               cerr << unitig_ct << " IUM messages processed" << endl;           if  (Do_Contig_Messages)               cerr << contig_ct << " ICM messages processed" << endl;          }      else if  (Input_Format == SIMPLE_CONTIG_INPUT                  || Input_Format == PARTIAL_READ_INPUT)          {           char  line [MAX_LINE];           vector <Ordered_Range_t>  pos_list, seg_list;           vector <int>  frg_id_list;           int  fid;           input_fp = File_Open (Tig_File_Name . c_str (), "r");           read_bank . open (Bank_Name);           msg . setType (IUM_MSG);           msg . setStatus (UNASSIGNED_UNITIG);           contig_ct = 0;           while  (fgets (line, MAX_LINE, input_fp) != NULL)             {              char  * p;              p = strtok (line, " \t\n");              if  (p == NULL)                  continue;              if  (strcmp (p, "C") == 0)                  {                   if  (frg_id_list . size () > 0)                       {                        Get_Strings_And_Offsets (string_list, qual_list, clr_list,                             tag_list, offset, frg_id_list, pos_list, seg_list,                             read_bank);                        msg . setAccession (cid);                        msg . setIMPs (frg_id_list, pos_list);                        try                          {                           Multi_Align (cid, string_list, offset, ALIGN_WIGGLE,                                Error_Rate, Min_Overlap, gma, & ref, & tag_list);                          }                        catch (AlignmentException_t & e)                          {                           int  b = e . b_id ();                           cerr << "Failed on contig " << cid << endl;                           cerr << "Could not align string "                                << tag_list [b] << " subscript " << b << endl;                           throw;                          }                        Permute (qual_list, ref);                        Permute (clr_list, ref);                        Permute (frg_id_list, ref);                        gma . Set_Flipped (clr_list);                        gma . Get_Positions (pos);                        gma . Extract_IMP_Dels (del_list);                        msg . Update_IMPs (pos, ref, del_list);                        gma . Set_Consensus_And_Qual (string_list, qual_list);                        msg . setSequence (gma . getConsensusString ());                        msg . setQuality (gma . getQualityString ());                        msg . setUniLen (strlen (gma . getConsensusString ()));                        Output_Unit (label, msg . getAccession (),                             msg . getNumFrags (), gma, msg, string_list,                             qual_list, clr_list, tag_list);                        contig_ct ++;                       }                   frg_id_list . clear ();                   pos_list . clear ();                   seg_list . clear ();                   p = strtok (NULL, " \t\n");                   cid = p;                  }                else                  {                   Ordered_Range_t  ps;                   int  a, b;                   fid = strtol (p, NULL, 10);                   p = strtok (NULL, " \t\n");                   a = strtol (p, NULL, 10);                   p = strtok (NULL, " \t\n");                   b = strtol (p, NULL, 10);                   ps . setRange (a, b);                   frg_id_list . push_back (fid);                   pos_list . push_back (ps);                   if  (Input_Format == PARTIAL_READ_INPUT)                       {                        p = strtok (NULL, " \t\n");                        a = strtol (p, NULL, 10);                        p = strtok (NULL, " \t\n");                        b = strtol (p, NULL, 10);                        ps . setRange (a, b);                        seg_list . push_back (ps);                       }                  }             }           // Process the last contig here           if  (frg_id_list . size () > 0)               {                Get_Strings_And_Offsets (string_list, qual_list, clr_list,                     tag_list, offset, frg_id_list, pos_list, seg_list, read_bank);                if  (Extra_fp != NULL)                    {                     fprintf (stderr,                          "Fasta sequence option not yet available--Ignored\n");                     fclose (Extra_fp);                    }                msg . setAccession (cid);                msg . setIMPs (frg_id_list, pos_list);                try                  {                   Multi_Align (cid, string_list, offset, ALIGN_WIGGLE,                        Error_Rate, Min_Overlap, gma, & ref, & tag_list);                  }                catch (AlignmentException_t & e)                  {                   int  b = e . b_id ();                   cerr << "Failed on contig " << cid << endl;                   cerr << "Could not align string "                        << tag_list [b] << " subscript " << b << endl;                   throw;                  }                Permute (qual_list, ref);                Permute (clr_list, ref);                Permute (frg_id_list, ref);                gma . Set_Flipped (clr_list);                gma . Get_Positions (pos);                gma . Extract_IMP_Dels (del_list);                msg . Update_IMPs (pos, ref, del_list);                gma . Set_Consensus_And_Qual (string_list, qual_list);                msg . setSequence (gma . getConsensusString ());                msg . setQuality (gma . getQualityString ());                msg . setUniLen (strlen (gma . getConsensusString ()));                Output_Unit (label, msg . getAccession (),                     msg . getNumFrags (), gma, msg, string_list,                     qual_list, clr_list, tag_list);                contig_ct ++;               }           cerr << "Processed " << contig_ct << " contigs" << endl;          }      fclose (input_fp);      read_bank . close ();     }   catch (Exception_t & e)     {      cerr << "** AMOS Exception **" << endl;      cerr << e << endl;      exit (EXIT_FAILURE);     }   catch (std :: exception & e)     {      cerr << "** Standard Exception **" << endl;      cerr << e << endl;      exit (EXIT_FAILURE);     }   return  0;  }