use of ca.corefacility.bioinformatics.irida.model.assembly.GenomeAssemblyFromAnalysis in project irida by phac-nml.
the class AssemblySampleUpdater method update.
/**
* {@inheritDoc}
*/
@Override
public void update(Collection<Sample> samples, AnalysisSubmission analysis) {
checkArgument(samples.size() == 1, "Error: expected only 1 sample, but got " + samples.size() + " samples");
Sample sample = samples.iterator().next();
GenomeAssembly genomeAssembly = genomeAssemblyRepository.save(new GenomeAssemblyFromAnalysis(analysis));
SampleGenomeAssemblyJoin sampleGenomeAssemblyJoin = new SampleGenomeAssemblyJoin(sample, genomeAssembly);
logger.trace("Saving join for sample [" + sample.getId() + "] to analysis submission [" + analysis.getId() + "]");
sampleGenomeAssemblyJoinRepository.save(sampleGenomeAssemblyJoin);
}
Aggregations