use of com.hartwig.events.Analysis in project pipeline5 by hartwigmedical.
the class ResearchMetadataApiTest method publishesPipelineStagedEventOnCompletionSingleSampleFile.
@Test
public void publishesPipelineStagedEventOnCompletionSingleSampleFile() throws Exception {
ArgumentCaptor<PubsubMessage> pubsubMessageArgumentCaptor = pipelineCompleteWithFile("set/reference/aligner/reference.bam", TestOutput.builder().status(PipelineStatus.SUCCESS).build());
PipelineComplete result = ObjectMappers.get().readValue(pubsubMessageArgumentCaptor.getValue().getData().toByteArray(), PipelineComplete.class);
Analysis analysis = result.pipeline().analyses().get(0);
assertThat(analysis.molecule()).isEqualTo(Molecule.DNA);
AnalysisOutputBlob blobResult = analysis.output().get(0);
assertThat(blobResult.datatype()).isEmpty();
assertThat(blobResult.root()).isEqualTo("set");
assertThat(blobResult.sampleSubdir()).hasValue("reference");
assertThat(blobResult.namespace()).hasValue("aligner");
assertThat(blobResult.filename()).isEqualTo("reference.bam");
}
use of com.hartwig.events.Analysis in project pipeline5 by hartwigmedical.
the class ResearchMetadataApiTest method publishesPipelineStagedEventOnCompletionRootFile.
@Test
public void publishesPipelineStagedEventOnCompletionRootFile() throws Exception {
ArgumentCaptor<PubsubMessage> pubsubMessageArgumentCaptor = pipelineCompleteWithFile("set/run.log", TestOutput.builder().status(PipelineStatus.SUCCESS).build());
PipelineComplete result = ObjectMappers.get().readValue(pubsubMessageArgumentCaptor.getValue().getData().toByteArray(), PipelineComplete.class);
Analysis analysis = result.pipeline().analyses().get(1);
assertThat(analysis.molecule()).isEqualTo(Molecule.DNA);
AnalysisOutputBlob blobResult = analysis.output().get(0);
assertThat(blobResult.datatype()).isEmpty();
assertThat(blobResult.root()).isEqualTo("set");
assertThat(blobResult.sampleSubdir()).isEmpty();
assertThat(blobResult.namespace()).isEmpty();
assertThat(blobResult.filename()).isEqualTo("run.log");
}
use of com.hartwig.events.Analysis in project pipeline5 by hartwigmedical.
the class ResearchMetadataApiTest method publishesPipelineStagedEventOnCompletion.
@Test
public void publishesPipelineStagedEventOnCompletion() throws Exception {
ArgumentCaptor<PubsubMessage> pubsubMessageArgumentCaptor = pipelineCompleteWithFile("set/purple/tumor.purple.somatic.vcf.gz", TestOutput.builder().status(PipelineStatus.SUCCESS).build());
PipelineComplete result = ObjectMappers.get().readValue(pubsubMessageArgumentCaptor.getValue().getData().toByteArray(), PipelineComplete.class);
assertThat(result.pipeline().runId()).isEqualTo(1);
assertThat(result.pipeline().setId()).isEqualTo(SET_ID);
assertThat(result.pipeline().sample()).isEqualTo("tumor");
assertThat(result.pipeline().version()).isEqualTo(Versions.pipelineMajorMinorVersion());
Analysis analysis = result.pipeline().analyses().get(1);
assertThat(analysis.molecule()).isEqualTo(Molecule.DNA);
AnalysisOutputBlob blobResult = analysis.output().get(0);
assertThat(blobResult.barcode()).isEmpty();
assertThat(blobResult.bucket()).isEqualTo("bucket");
assertThat(blobResult.datatype()).isEmpty();
assertThat(blobResult.root()).isEqualTo("set");
assertThat(blobResult.sampleSubdir()).isEmpty();
assertThat(blobResult.namespace()).hasValue("purple");
assertThat(blobResult.filename()).isEqualTo("tumor.purple.somatic.vcf.gz");
}
Aggregations