logger.info(buffer.toString());
setStatus(TaskStatus.ERROR);
return;
}
MascotDatfile mdf = null;
String resultString = parameters.getMascotInstallUrlString()
+ "x-cgi/ms-status.exe?Autorefresh=false&Show=RESULTFILE&DateDir="
+ lDate + "&ResJob=" + lDatfileFilename;
logger.info(resultString);
try {
URL lDatfileLocation = new URL(resultString);
URLConnection lURLConnection = lDatfileLocation
.openConnection();
BufferedReader br = new BufferedReader(new InputStreamReader(
lURLConnection.getInputStream()));
mdf = new MascotDatfile(br);
} catch (MalformedURLException e) {
e.printStackTrace();
} catch (IOException ioe) {
ioe.printStackTrace();
}
assert mdf != null;
QueryToPeptideMap queryPeptideMap = mdf.getQueryToPeptideMap();
int numberOfQueries = mdf.getNumberOfQueries();
for (int i = 1; i <= numberOfQueries; i++) {
PeptideHit pepHit = queryPeptideMap.getPeptideHitOfOneQuery(i);
if (pepHit != null) {
Query q = mdf.getQuery(i);
String title = q.getTitle();
String[] tokens = title.split(" ");
int rowId = Integer.parseInt(tokens[1]);
MascotPeakIdentity mpid = new MascotPeakIdentity(pepHit);
pp.getRows()[rowId].addPeakIdentity(mpid, true);