Search in sources :

Example 1 with PatientCancerTypes

use of com.hartwig.hmftools.common.ecrf.projections.PatientCancerTypes in project hmftools by hartwigmedical.

the class PatientReporterApplication method buildBaseReporterData.

@NotNull
private static BaseReporterData buildBaseReporterData(@NotNull final CommandLine cmd) throws IOException {
    LOGGER.info(" Loading ECRF CSV dump...");
    final List<PatientCancerTypes> patientsCancerTypes = PatientCancerTypes.readRecords(cmd.getOptionValue(CANCER_TYPES_CSV));
    LOGGER.info("  Loaded data for {} patients.", patientsCancerTypes.size());
    LOGGER.info(" Loading LIMS database...");
    final Lims lims = LimsFactory.fromLimsJson(cmd.getOptionValue(LIMS_JSON));
    LOGGER.info("  Loaded data for {} samples.", lims.sampleCount());
    final CenterModel centerModel = Center.readFromCSV(cmd.getOptionValue(CENTER_CSV));
    return ImmutableBaseReporterData.of(patientsCancerTypes, lims, centerModel, cmd.getOptionValue(SIGNATURE));
}
Also used : Lims(com.hartwig.hmftools.common.lims.Lims) CenterModel(com.hartwig.hmftools.common.center.CenterModel) PatientCancerTypes(com.hartwig.hmftools.common.ecrf.projections.PatientCancerTypes) NotNull(org.jetbrains.annotations.NotNull)

Example 2 with PatientCancerTypes

use of com.hartwig.hmftools.common.ecrf.projections.PatientCancerTypes in project hmftools by hartwigmedical.

the class PatientReporterTestUtil method testBaseReporterData.

@NotNull
public static BaseReporterData testBaseReporterData() throws IOException {
    final String centerPath = Resources.getResource("center").getPath() + File.separator + "centers.csv";
    final List<PatientCancerTypes> patientsCancerTypes = Lists.newArrayList();
    final Lims lims = LimsFactory.empty();
    final CenterModel centerModel = Center.readFromCSV(centerPath);
    return ImmutableBaseReporterData.of(patientsCancerTypes, lims, centerModel, SIGNATURE_PATH);
}
Also used : Lims(com.hartwig.hmftools.common.lims.Lims) CenterModel(com.hartwig.hmftools.common.center.CenterModel) PatientCancerTypes(com.hartwig.hmftools.common.ecrf.projections.PatientCancerTypes) NotNull(org.jetbrains.annotations.NotNull)

Aggregations

CenterModel (com.hartwig.hmftools.common.center.CenterModel)2 PatientCancerTypes (com.hartwig.hmftools.common.ecrf.projections.PatientCancerTypes)2 Lims (com.hartwig.hmftools.common.lims.Lims)2 NotNull (org.jetbrains.annotations.NotNull)2