use of com.hartwig.hmftools.common.context.RunContext in project hmftools by hartwigmedical.
the class LoadClinicalData method readSamplesPerPatient.
@NotNull
private static Map<String, List<SampleData>> readSamplesPerPatient(@NotNull Lims lims, @NotNull List<RunContext> runContexts) {
LimsSampleReader sampleReader = new LimsSampleReader(lims);
final Set<String> sequencedPatientIdentifiers = Utils.sequencedPatientIds(runContexts).stream().filter(identifier -> identifier.startsWith("CPCT") || identifier.startsWith("DRUP")).collect(Collectors.toSet());
Map<String, List<SampleData>> samplesPerPatient = Maps.newHashMap();
for (String patientIdentifier : sequencedPatientIdentifiers) {
List<String> sampleIds = getTumorSamplesForPatient(patientIdentifier, runContexts);
samplesPerPatient.put(patientIdentifier, sampleReader.read(sampleIds));
}
return samplesPerPatient;
}
Aggregations