public static String stripOfFinalUnderScore(final String identifier){
  final int finalUndescorePos=identifier.lastIndexOf('_');
  if (finalUndescorePos < 1) {
    throw new IllegalStateException("Appear to have a protein accession without _N appended to it!: " + identifier);
  }
  return identifier.substring(0,finalUndescorePos);
}

public static String stripOfFinalUnderScore ( final String identifier ) { final int finalUndescorePos = identifier . lastIndexOf ( '_' ) ; if ( finalUndescorePos < 1 ) { throw new IllegalStateException ( "Appear to have a protein accession without _N appended to it!: " + identifier ) ; } return identifier . substring ( 0 , finalUndescorePos ) ; }
strips identifiers from abc . 1_1 to abc . 1 or blob_1 to blob .
