use of com.hartwig.pipeline.transfer.staged.StagedOutputPublisher in project pipeline5 by hartwigmedical.
the class LocalSomaticMetadataTest method setUp.
@Before
public void setUp() throws Exception {
setId = "setId";
tumorName = "CORE123T";
refName = "CORE123R";
jsonSampleSource = mock(JsonSampleSource.class);
tumorSample = mock(Sample.class);
final Sample refSample = mock(Sample.class);
stagedOutputPublisher = mock(StagedOutputPublisher.class);
victim = new LocalSomaticMetadata(Arguments.testDefaultsBuilder().setId(setId).build(), jsonSampleSource, stagedOutputPublisher);
when(jsonSampleSource.sample(SampleType.REFERENCE)).thenReturn(Optional.of(refSample));
when(tumorSample.name()).thenReturn(tumorName);
when(refSample.name()).thenReturn(refName);
}
use of com.hartwig.pipeline.transfer.staged.StagedOutputPublisher in project pipeline5 by hartwigmedical.
the class SomaticMetadataApiProvider method createPublisher.
private StagedOutputPublisher createPublisher(final SetResolver setResolver, final Optional<Run> run, final Context context, final boolean useOnlyDBSets) {
Bucket sourceBucket = storage.get(arguments.outputBucket());
ObjectMapper objectMapper = ObjectMappers.get();
return new StagedOutputPublisher(setResolver, sourceBucket, publisher, objectMapper, run, context, arguments.outputCram(), useOnlyDBSets);
}
use of com.hartwig.pipeline.transfer.staged.StagedOutputPublisher in project pipeline5 by hartwigmedical.
the class ResearchMetadataApiTest method setUp.
@Before
public void setUp() throws Exception {
sampleApi = mock(SampleApi.class);
setApi = mock(SetApi.class);
bucket = mock(Bucket.class);
when(bucket.getName()).thenReturn("bucket");
runApi = mock(RunApi.class);
run = new Run().id(RUN_ID);
publisher = mock(Publisher.class);
ObjectMapper objectMapper = ObjectMappers.get();
setResolver = mock(SetResolver.class);
victim = new ResearchMetadataApi(sampleApi, setApi, runApi, Optional.of(run), BIOPSY, Arguments.testDefaults(), new StagedOutputPublisher(setResolver, bucket, publisher, objectMapper, Optional.of(run), Context.RESEARCH, false, true), new Anonymizer(Arguments.testDefaults()));
}
Aggregations