public static boolean validateSamRg(CFlags flags){
  final String rg=(String)flags.getValue(SAM_RG);
  final File in=new File(rg);
  if (!in.exists() && rg.indexOf('\t') != -1) {
    flags.setParseMessage("given string \"" + rg + "\" for --"+ SAM_RG+ " contains literal tab characters, please use \\t instead");
    return false;
  }
 else   if (in.isDirectory()) {
    flags.setParseMessage("given input file \"" + in.getPath() + "\" for --"+ SAM_RG+ " is a directory, must be a file");
    return false;
  }
  return true;
}

public static boolean validateSamRg ( CFlags flags ) { final String rg = ( String ) flags . getValue ( SAM_RG ) ; final File in = new File ( rg ) ; if ( ! in . exists ( ) && rg . indexOf ( '\t' ) != - 1 ) { flags . setParseMessage ( "given string \"" + rg + "\" for --" + SAM_RG + " contains literal tab characters, please use \\t instead" ) ; return false ; } else if ( in . isDirectory ( ) ) { flags . setParseMessage ( "given input file \"" + in . getPath ( ) + "\" for --" + SAM_RG + " is a directory, must be a file" ) ; return false ; } return true ; }
validate sam read group flag
