adj = (*cpi) -> tiles . front( ) -> off; for ( tpi  = (*cpi) -> tiles . begin( ); tpi != (*cpi) -> tiles . end( ); ++ tpi ) (*tpi) -> off -= adj;
if ( cp == NULL || (*tpi)->off - adj > cp->len - OPT_MinOverlap ) { cp = new Contig_t( ); cp -> adjust = (*cpi) -> adjust; contigs . push_back (cp);  adj = (*tpi) -> off; }  (*tpi) -> off -= adj; cp -> tiles . push_back (*tpi); end = (*tpi) -> off + labs ((*tpi) -> end - (*tpi) -> beg) + 1; if ( end > cp -> len ) cp -> len = end;
void CleanContigs (Assembly_t & assembly){  vector<Contig_t *>::iterator cpi;  vector<Tile_t *>::iterator tpi;  long int adj;  for ( cpi  = assembly . contigs . begin( );	cpi != assembly . contigs . end( ); ++ cpi )    {      //-- Sort the tiled reads      sort ((*cpi) -> tiles . begin( ), (*cpi) -> tiles . end( ), TileCmp_t( ));      //-- Make the tiles begin at 0      if ( !(*cpi) -> tiles . empty( ) )	{	  adj = (*cpi) -> tiles . front( ) -> off;	  for ( tpi  = (*cpi) -> tiles . begin( );		tpi != (*cpi) -> tiles . end( ); ++ tpi )	    (*tpi) -> off -= adj;	}      //TODO - remove empty contigs    }}