use of uk.ac.bbsrc.tgac.miso.core.util.IlluminaExperiment in project miso-lims by miso-lims.
the class ConstantsController method addIlluminaExperimentTypes.
private static void addIlluminaExperimentTypes(ObjectNode node) {
ArrayNode illuminaExperimentTypes = node.putArray("illuminaExperimentTypes");
for (IlluminaExperiment experiment : IlluminaExperiment.values()) {
ObjectNode dto = illuminaExperimentTypes.addObject();
dto.put("name", experiment.name());
dto.put("description", experiment.getDescription());
}
}
use of uk.ac.bbsrc.tgac.miso.core.util.IlluminaExperiment in project miso-lims by miso-lims.
the class PoolRestController method samplesheet.
@PostMapping(value = "/samplesheet")
@ResponseBody
public HttpEntity<byte[]> samplesheet(@RequestBody SampleSheetRequest request, HttpServletRequest httpRequest, HttpServletResponse response, UriComponentsBuilder uriBuilder) throws IOException {
IlluminaExperiment experiment = IlluminaExperiment.valueOf(request.getExperimentType());
SequencingParameters parameters = sequencingParametersService.get(request.getSequencingParametersId());
List<Pool> pools = request.getPoolIds().stream().map(WhineyFunction.rethrow(poolService::get)).collect(Collectors.toList());
response.setHeader("Content-Disposition", String.format("attachment; filename=%s-%s.csv", experiment.name(), pools.stream().map(Pool::getAlias).collect(Collectors.joining("-"))));
return new HttpEntity<>(experiment.makeSampleSheet(request.getGenomeFolder(), parameters, request.getCustomRead1Primer(), request.getCustomIndexPrimer(), request.getCustomRead2Primer(), pools).getBytes(StandardCharsets.UTF_8));
}
Aggregations