if  (Input_Format == PARTIAL_READ_FORMAT)
if  (Input_Format == PARTIAL_READ_INPUT)
int  main    (int argc, char * argv [])  {   Bank_t  read_bank (Read_t::NCode( ));   Celera_Message_t  msg;   Read_t  read;   FILE  * input_fp;   vector <char *>  string_list, qual_list;   vector <int>  offset;   vector <int>  ref;   vector <Range_t>  pos;   vector < vector <int> >  del_list;   Gapped_Multi_Alignment_t  gma;   int  contig_ct, unitig_ct;   cerr << "Starting on " << __DATE__ << " at " << __TIME__ << endl;   Verbose = 1;   Parse_Command_Line (argc, argv);   cerr << "Read bank is " << Bank_Name << endl;   gma . setPrintFlag (PRINT_WITH_DIFFS);   if  (Input_Format == CELERA_MSG_FORMAT)       {        cerr << "Processing ";        if  (Do_Contig_Messages)            cerr << "contig";          else            cerr << "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, offset, msg, read_bank);                Multi_Align (string_list, offset, 5, 0.04, gma, & ref);                Permute (qual_list, ref);                gma . Get_Positions (pos);                gma . Extract_IMP_Dels (del_list);                msg . Update_IMPs (pos, ref, del_list);                if  (Output_Alignments)                    {                     cout << endl << endl << "Unitig #" << msg . getAccession ()                          << endl;                     gma . Print (stdout, string_list, 60);                    }                  else                    {                     gma . Set_Consensus_And_Qual (string_list, qual_list);                     msg . setSequence (gma . getConsensusString ());                     msg . setQuality (gma . getQualityString ());                     msg . setUniLen (strlen (gma . getConsensusString ()));                     msg . print (stdout);                    }                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_FORMAT               || Input_Format == PARTIAL_READ_FORMAT)       {        char  line [MAX_LINE];        char  cid [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, offset,                           frg_id_list, pos_list, seg_list, read_bank);                     msg . setAccession (cid);                     msg . setIMPs (frg_id_list, pos_list);                     Multi_Align (string_list, offset, 5, 0.04, gma, & ref);                     Permute (qual_list, ref);                     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 ()));                     if  (Output_Alignments)                         {                          cout << endl << endl << "Contig " << cid                               << " with " << frg_id_list . size ()                               << " reads" << endl;                          gma . Consensus_To_Lower ();                          gma . Print (stdout, string_list, 60);                         }                     else if  (Output_FASTA)                         {                          cout << ">" << cid << endl;                          Fasta_Print_Skip (stdout, gma . getConsensusString (),                               "-", NULL);                         }                       else                         {                          msg . print (stdout);                         }                     contig_ct ++;                    }                frg_id_list . clear ();                pos_list . clear ();                seg_list . clear ();                p = strtok (NULL, " \t\n");                strcpy (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_FORMAT)                    {                     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, offset,                   frg_id_list, pos_list, seg_list, read_bank);             msg . setAccession (cid);             msg . setIMPs (frg_id_list, pos_list);             Multi_Align (string_list, offset, 5, 0.04, gma, & ref);             Permute (qual_list, ref);             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 ()));             if  (Output_Alignments)                 {                  cout << endl << endl << "Contig " << cid                       << " with " << frg_id_list . size ()                       << " reads" << endl;                  gma . Consensus_To_Lower ();                  gma . Print (stdout, string_list, 60);                 }             else if  (Output_FASTA)                 {                  cout << ">" << cid << endl;                  Fasta_Print_Skip (stdout, gma . getConsensusString (),                       "-", NULL);                 }               else                 {                  msg . print (stdout);                 }             contig_ct ++;            }        cerr << "Processed " << contig_ct << " contigs" << endl;       }   fclose (input_fp);   read_bank . close ();   return  0;  }