use of com.hartwig.events.AnalysisOutputBlob in project pipeline5 by hartwigmedical.
the class StagedOutputPublisherTest method verifySecondaryAnalysis.
private void verifySecondaryAnalysis(final String extension, final String indexExtension, final String namespace) throws com.fasterxml.jackson.core.JsonProcessingException {
when(state.status()).thenReturn(PipelineStatus.SUCCESS);
Blob tumorBamBlob = withBucketAndMd5(blob(TestInputs.tumorSample() + "/" + namespace + "/" + TestInputs.tumorSample() + "." + extension));
Blob tumorBaiBlob = withBucketAndMd5(blob(TestInputs.tumorSample() + "/" + namespace + "/" + TestInputs.tumorSample() + "." + extension + "." + indexExtension));
Blob refBamBlob = withBucketAndMd5(blob(TestInputs.tumorSample() + "/" + namespace + "/" + TestInputs.referenceSample() + "." + extension));
Blob refBaiBlob = withBucketAndMd5(blob(TestInputs.tumorSample() + "/" + namespace + "/" + TestInputs.referenceSample() + "." + extension + "." + indexExtension));
Page<Blob> page = pageOf(tumorBamBlob, tumorBaiBlob, refBamBlob, refBaiBlob);
ArgumentCaptor<PubsubMessage> messageArgumentCaptor = publish(page, TestInputs.defaultSomaticRunMetadata());
PipelineComplete result = OBJECT_MAPPER.readValue(new String(messageArgumentCaptor.getValue().getData().toByteArray()), PipelineComplete.class);
assertThat(result.pipeline().context()).isEqualTo(Context.DIAGNOSTIC);
assertThat(result.pipeline().analyses().get(0).type()).isEqualTo(Type.ALIGNMENT);
assertThat(result.pipeline().analyses().get(0).output()).hasSize(4);
assertThat(result.pipeline().analyses().get(0).output()).extracting(AnalysisOutputBlob::filename).containsExactlyInAnyOrder(TestInputs.tumorSample() + "." + extension, TestInputs.tumorSample() + "." + extension + "." + indexExtension, TestInputs.referenceSample() + "." + extension, TestInputs.referenceSample() + "." + extension + "." + indexExtension);
}
use of com.hartwig.events.AnalysisOutputBlob in project pipeline5 by hartwigmedical.
the class StagedOutputPublisherTest method verifyGermline.
public void verifyGermline(final String filename, final String expectedFile, final String namespace) throws com.fasterxml.jackson.core.JsonProcessingException {
when(state.status()).thenReturn(PipelineStatus.SUCCESS);
Blob vcf = withBucketAndMd5(blob(namespace + TestInputs.referenceSample() + filename));
Page<Blob> page = pageOf(vcf);
ArgumentCaptor<PubsubMessage> messageArgumentCaptor = publish(page, TestInputs.defaultSomaticRunMetadata());
PipelineComplete result = OBJECT_MAPPER.readValue(new String(messageArgumentCaptor.getValue().getData().toByteArray()), PipelineComplete.class);
assertThat(result.pipeline().analyses().get(2).type()).isEqualTo(Type.GERMLINE);
assertThat(result.pipeline().analyses().get(2).output()).extracting(AnalysisOutputBlob::filename).containsExactlyInAnyOrder(expectedFile);
}
Aggregations