header = false;
continue;
}
StringTokenizer tok = new StringTokenizer(line,"\t");
if( tok.countTokens() != 9 && tok.countTokens() != 12 )
throw new FileFormatException("Gene summary export (.se) file in line "+in.getLineNumber()+ " wrong number of fields");
if (numTokens == -1) {
numTokens = tok.countTokens();
} else {
if (tok.countTokens() != numTokens) {
throw new FileFormatException("Gene summary export (.se) file in line "+in.getLineNumber()+ " number of fields has changed");
}
}
int groupID = 0,
nTotal = 0,
nUnder = 0,
nOver = 0,
nChange = 0;
double pUnder = 1.0,
pOver = 1.0,
pChange = 1.0,
fdrUnder = -777.0,
fdrOver = -888.0,
fdrChange = -999.0;
String term = null;
try
{
String tmp = tok.nextToken().trim();
if( tmp.equalsIgnoreCase("null") )
continue;
if( tmp.equalsIgnoreCase("all") )
groupID = 0;
else
groupID = Integer.parseInt(tmp);
nTotal = Integer.parseInt(tok.nextToken().trim());
nUnder = Integer.parseInt(tok.nextToken().trim());
nOver = Integer.parseInt(tok.nextToken().trim());
nChange = Integer.parseInt(tok.nextToken().trim());
pUnder = Double.parseDouble(tok.nextToken().trim().replace(',','.'));
pOver = Double.parseDouble(tok.nextToken().trim().replace(',','.'));
pChange = Double.parseDouble(tok.nextToken().trim().replace(',','.'));
if (numTokens == 12) {
fdrUnder = Double.parseDouble(tok.nextToken().trim().replace(',','.'));
fdrOver = Double.parseDouble(tok.nextToken().trim().replace(',','.'));
fdrChange = Double.parseDouble(tok.nextToken().trim().replace(',','.'));
}
term = tok.nextToken().trim();
}
catch( NumberFormatException e )
{
System.err.println( e.getStackTrace() );
throw new FileFormatException("Gene summary export (.se) file in line "+in.getLineNumber());
}
// double pValue = 1.0;
// if( pUnder < pValue ) {
// pValue = pUnder;
// }