return JSONUtils.SimpleJSONError("Please supply a barcode to lookup.");
}
}
public JSONObject generateIlluminaDemultiplexCSV(HttpSession session, JSONObject json) throws IOException {
User user = securityManager.getUserByLoginName(SecurityContextHolder.getContext().getAuthentication().getName());
IlluminaRun r = (IlluminaRun) requestManager.getRunById(json.getLong("runId"));
SequencerPartitionContainer<SequencerPoolPartition> f = requestManager.getSequencerPartitionContainerById(json.getLong("containerId"));
if (r != null && f != null) {
String casavaVersion = "1.8.2";
if (json.has("casavaVersion") && !"".equals(json.getString("casavaVersion"))) {
casavaVersion = json.getString("casavaVersion");
}
String sheet = RunProcessingUtils.buildIlluminaDemultiplexCSV(r, f, casavaVersion, user.getFullName());
return JSONUtils.SimpleJSONResponse(sheet);
}
return JSONUtils.SimpleJSONError("No run or container found with that ID.");
}