+ if ( id.length() < 2 ) {
+ ForesterUtil.fatalError( PRG_NAME, "row " + r + " id is empty" );
+ }
+ String id_str = id.toString().trim();
+ if ( id_str.startsWith( ">" ) ) {
+ id_str = id_str.substring( 1 );
+ }
+ if ( ForesterUtil.isEmpty( seq ) ) {
+ seq = t.getValue( position - 1, r );
+ if ( ForesterUtil.isEmpty( seq ) ) {
+ ForesterUtil.fatalError( PRG_NAME, "row " + r + " seq is empty" );
+ }
+ }
+ MolecularSequence s = null;
+ try {
+ s = BasicSequence.createAaSequence( id_str, seq );
+ }
+ catch ( final Exception e ) {
+ ForesterUtil.fatalError( PRG_NAME, e.getMessage() );
+ }
+ if ( s != null ) {
+ seqs.add( s );
+ }