Search in sources :

Example 1 with GenomeAssemblyFromAnalysis

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);
}
Also used : GenomeAssemblyFromAnalysis(ca.corefacility.bioinformatics.irida.model.assembly.GenomeAssemblyFromAnalysis) SampleGenomeAssemblyJoin(ca.corefacility.bioinformatics.irida.model.joins.impl.SampleGenomeAssemblyJoin) Sample(ca.corefacility.bioinformatics.irida.model.sample.Sample) GenomeAssembly(ca.corefacility.bioinformatics.irida.model.assembly.GenomeAssembly)

Aggregations

GenomeAssembly (ca.corefacility.bioinformatics.irida.model.assembly.GenomeAssembly)1 GenomeAssemblyFromAnalysis (ca.corefacility.bioinformatics.irida.model.assembly.GenomeAssemblyFromAnalysis)1 SampleGenomeAssemblyJoin (ca.corefacility.bioinformatics.irida.model.joins.impl.SampleGenomeAssemblyJoin)1 Sample (ca.corefacility.bioinformatics.irida.model.sample.Sample)1