use of com.hartwig.patient.Sample in project pipeline5 by hartwigmedical.
the class SbpSampleReaderTest method handlesSubdirectories.
@Test
public void handlesSubdirectories() {
returnJson(FASTQ_JSON_SUBDIRECTORIES);
Sample sample = victim.read(EXISTS);
assertThat(sample.lanes()).hasSize(2);
assertThat(sample.name()).isEqualTo("CPCT02330029T");
}
use of com.hartwig.patient.Sample in project pipeline5 by hartwigmedical.
the class GoogleStorageSampleSourceTest method verifyFastq.
private void verifyFastq(final String firstOfPair, final String secondOfPair) {
Bucket bucket = mock(Bucket.class);
Blob firstBlob = TestBlobs.blob(firstOfPair);
Blob secondBlob = TestBlobs.blob(secondOfPair);
Page<Blob> page = TestBlobs.pageOf(firstBlob, secondBlob);
when(bucket.list(Storage.BlobListOption.prefix("aligner/samples/"))).thenReturn(page);
when(storage.get(Mockito.anyString())).thenReturn(bucket);
Sample sample = victim.sample(referenceRunMetadata());
assertThat(sample.name()).isEqualTo(TestInputs.referenceSample());
assertThat(sample.lanes()).hasSize(1);
Lane lane = sample.lanes().get(0);
assertThat(lane.firstOfPairPath()).isEqualTo(firstBlob.getName());
assertThat(lane.secondOfPairPath()).isEqualTo(secondBlob.getName());
}
Aggregations