Search in sources :

Example 1 with EntireOutputComponent

use of com.hartwig.pipeline.report.EntireOutputComponent in project pipeline5 by hartwigmedical.

the class LinxGermline method output.

@Override
public LinxGermlineOutput output(final SomaticRunMetadata metadata, final PipelineStatus jobStatus, final RuntimeBucket bucket, final ResultsDirectory resultsDirectory) {
    String disruptionsTsv = metadata.sampleName() + GERMLINE_DISRUPTION_TSV;
    String driverCatalogTsv = metadata.sampleName() + GERMLINE_DRIVER_CATALOG_TSV;
    return LinxGermlineOutput.builder().status(jobStatus).maybeLinxGermlineOutputLocations(LinxGermlineOutputLocations.builder().disruptions(GoogleStorageLocation.of(bucket.name(), resultsDirectory.path(disruptionsTsv))).driverCatalog(GoogleStorageLocation.of(bucket.name(), resultsDirectory.path(driverCatalogTsv))).outputDirectory(GoogleStorageLocation.of(bucket.name(), resultsDirectory.path(), true)).build()).addFailedLogLocations(GoogleStorageLocation.of(bucket.name(), RunLogComponent.LOG_FILE)).addReportComponents(new EntireOutputComponent(bucket, Folder.root(), NAMESPACE, resultsDirectory)).addDatatypes(new AddDatatype(DataType.LINX_GERMLINE_DISRUPTIONS, metadata.barcode(), new ArchivePath(Folder.root(), namespace(), disruptionsTsv))).addDatatypes(new AddDatatype(DataType.LINX_GERMLINE_DRIVER_CATALOG, metadata.barcode(), new ArchivePath(Folder.root(), namespace(), driverCatalogTsv))).build();
}
Also used : ArchivePath(com.hartwig.pipeline.metadata.ArchivePath) EntireOutputComponent(com.hartwig.pipeline.report.EntireOutputComponent) AddDatatype(com.hartwig.pipeline.metadata.AddDatatype)

Example 2 with EntireOutputComponent

use of com.hartwig.pipeline.report.EntireOutputComponent in project pipeline5 by hartwigmedical.

the class Orange method output.

@Override
public OrangeOutput output(final SomaticRunMetadata metadata, final PipelineStatus jobStatus, final RuntimeBucket bucket, final ResultsDirectory resultsDirectory) {
    final String orangePdf = metadata.tumor().sampleName() + ORANGE_OUTPUT_PDF;
    final String orangeJson = metadata.tumor().sampleName() + ORANGE_OUTPUT_JSON;
    return OrangeOutput.builder().status(jobStatus).addFailedLogLocations(GoogleStorageLocation.of(bucket.name(), RunLogComponent.LOG_FILE)).addReportComponents(new EntireOutputComponent(bucket, Folder.root(), namespace(), resultsDirectory)).addDatatypes(new AddDatatype(DataType.ORANGE_OUTPUT_JSON, metadata.barcode(), new ArchivePath(Folder.root(), namespace(), orangeJson)), new AddDatatype(DataType.ORANGE_OUTPUT_PDF, metadata.barcode(), new ArchivePath(Folder.root(), namespace(), orangePdf))).build();
}
Also used : ArchivePath(com.hartwig.pipeline.metadata.ArchivePath) EntireOutputComponent(com.hartwig.pipeline.report.EntireOutputComponent) AddDatatype(com.hartwig.pipeline.metadata.AddDatatype)

Example 3 with EntireOutputComponent

use of com.hartwig.pipeline.report.EntireOutputComponent in project pipeline5 by hartwigmedical.

the class Cuppa method output.

@Override
public CuppaOutput output(final SomaticRunMetadata metadata, final PipelineStatus jobStatus, final RuntimeBucket bucket, final ResultsDirectory resultsDirectory) {
    final String cuppaConclusionChart = cuppaConclusionChart(metadata);
    final String conclusionTxt = cuppaConclusionTxt(metadata);
    final String cuppaSummaryChartPng = cupReportSummaryPng(metadata);
    final String resultsCsv = cupDataCsv(metadata);
    final String featurePlot = cuppaFeaturePlot(metadata);
    return CuppaOutput.builder().status(jobStatus).maybeCuppaOutputLocations(CuppaOutputLocations.builder().conclusionTxt(GoogleStorageLocation.of(bucket.name(), resultsDirectory.path(conclusionTxt))).summaryChartPng(GoogleStorageLocation.of(bucket.name(), resultsDirectory.path(cuppaSummaryChartPng))).featurePlot(GoogleStorageLocation.of(bucket.name(), resultsDirectory.path(featurePlot))).resultCsv(GoogleStorageLocation.of(bucket.name(), resultsDirectory.path(resultsCsv))).build()).addFailedLogLocations(GoogleStorageLocation.of(bucket.name(), RunLogComponent.LOG_FILE)).addReportComponents(new EntireOutputComponent(bucket, Folder.root(), namespace(), resultsDirectory)).addDatatypes(new AddDatatype(DataType.CUPPA_CHART, metadata.barcode(), new ArchivePath(Folder.root(), namespace(), cuppaConclusionChart))).addDatatypes(new AddDatatype(DataType.CUPPA_SUMMARY_CHART, metadata.barcode(), new ArchivePath(Folder.root(), namespace(), cuppaSummaryChartPng))).addDatatypes(new AddDatatype(DataType.CUPPA_CONCLUSION, metadata.barcode(), new ArchivePath(Folder.root(), namespace(), conclusionTxt))).addDatatypes(new AddDatatype(DataType.CUPPA_RESULTS, metadata.barcode(), new ArchivePath(Folder.root(), namespace(), resultsCsv))).addDatatypes(new AddDatatype(DataType.CUPPA_FEATURE_PLOT, metadata.barcode(), new ArchivePath(Folder.root(), namespace(), featurePlot))).build();
}
Also used : ArchivePath(com.hartwig.pipeline.metadata.ArchivePath) EntireOutputComponent(com.hartwig.pipeline.report.EntireOutputComponent) AddDatatype(com.hartwig.pipeline.metadata.AddDatatype)

Example 4 with EntireOutputComponent

use of com.hartwig.pipeline.report.EntireOutputComponent in project pipeline5 by hartwigmedical.

the class LinxSomatic method output.

@Override
public LinxSomaticOutput output(final SomaticRunMetadata metadata, final PipelineStatus jobStatus, final RuntimeBucket bucket, final ResultsDirectory resultsDirectory) {
    String breakendTsv = metadata.tumor().sampleName() + BREAKEND_TSV;
    String driverCatalogTsv = metadata.tumor().sampleName() + DRIVER_CATALOG_TSV;
    String fusionsTsv = metadata.tumor().sampleName() + FUSION_TSV;
    String driversTsv = metadata.tumor().sampleName() + DRIVERS_TSV;
    String clustersTsv = metadata.tumor().sampleName() + CLUSTERS_TSV;
    String svAnnotationsTsv = metadata.tumor().sampleName() + SV_ANNOTATIONS_TSV;
    return LinxSomaticOutput.builder().status(jobStatus).maybeLinxOutputLocations(LinxSomaticOutputLocations.builder().breakends(GoogleStorageLocation.of(bucket.name(), resultsDirectory.path(breakendTsv))).drivers(GoogleStorageLocation.of(bucket.name(), resultsDirectory.path(driversTsv))).driverCatalog(GoogleStorageLocation.of(bucket.name(), resultsDirectory.path(driverCatalogTsv))).fusions(GoogleStorageLocation.of(bucket.name(), resultsDirectory.path(fusionsTsv))).svAnnotations(GoogleStorageLocation.of(bucket.name(), resultsDirectory.path(svAnnotationsTsv))).clusters(GoogleStorageLocation.of(bucket.name(), resultsDirectory.path(clustersTsv))).outputDirectory(GoogleStorageLocation.of(bucket.name(), resultsDirectory.path(), true)).build()).addFailedLogLocations(GoogleStorageLocation.of(bucket.name(), RunLogComponent.LOG_FILE)).addReportComponents(new EntireOutputComponent(bucket, Folder.root(), NAMESPACE, resultsDirectory)).addDatatypes(new AddDatatype(DataType.LINX, metadata.barcode(), new ArchivePath(Folder.root(), namespace(), driversTsv))).addDatatypes(new AddDatatype(DataType.LINX_BREAKENDS, metadata.barcode(), new ArchivePath(Folder.root(), namespace(), breakendTsv))).addDatatypes(new AddDatatype(DataType.LINX_DRIVER_CATALOG, metadata.barcode(), new ArchivePath(Folder.root(), namespace(), driverCatalogTsv))).addDatatypes(new AddDatatype(DataType.LINX_DRIVERS, metadata.barcode(), new ArchivePath(Folder.root(), namespace(), driversTsv))).addDatatypes(new AddDatatype(DataType.LINX_FUSIONS, metadata.barcode(), new ArchivePath(Folder.root(), namespace(), fusionsTsv))).addDatatypes(new AddDatatype(DataType.LINX_CLUSTERS, metadata.barcode(), new ArchivePath(Folder.root(), namespace(), clustersTsv))).addDatatypes(new AddDatatype(DataType.LINX_SV_ANNOTATIONS, metadata.barcode(), new ArchivePath(Folder.root(), namespace(), svAnnotationsTsv))).build();
}
Also used : ArchivePath(com.hartwig.pipeline.metadata.ArchivePath) EntireOutputComponent(com.hartwig.pipeline.report.EntireOutputComponent) AddDatatype(com.hartwig.pipeline.metadata.AddDatatype)

Example 5 with EntireOutputComponent

use of com.hartwig.pipeline.report.EntireOutputComponent in project pipeline5 by hartwigmedical.

the class Purple method output.

@Override
public PurpleOutput output(final SomaticRunMetadata metadata, final PipelineStatus jobStatus, final RuntimeBucket bucket, final ResultsDirectory resultsDirectory) {
    String purityTsv = purityTsv(metadata.sampleName());
    String qcFile = purpleQC(metadata.sampleName());
    ImmutablePurpleOutputLocations.Builder outputLocationsBuilder = PurpleOutputLocations.builder().outputDirectory(GoogleStorageLocation.of(bucket.name(), resultsDirectory.path(), true)).purity(GoogleStorageLocation.of(bucket.name(), resultsDirectory.path(purityTsv))).qcFile(GoogleStorageLocation.of(bucket.name(), resultsDirectory.path(qcFile)));
    ImmutablePurpleOutput.Builder outputBuilder = PurpleOutput.builder().status(jobStatus).addFailedLogLocations(GoogleStorageLocation.of(bucket.name(), RunLogComponent.LOG_FILE)).addReportComponents(new EntireOutputComponent(bucket, Folder.root(), NAMESPACE, resultsDirectory)).addDatatypes(new AddDatatype(DataType.PURPLE_PURITY, metadata.barcode(), new ArchivePath(Folder.root(), namespace(), purityTsv))).addDatatypes(new AddDatatype(DataType.PURPLE_QC, metadata.barcode(), new ArchivePath(Folder.root(), namespace(), qcFile)));
    metadata.maybeTumor().ifPresent(tumor -> {
        final String tumorSampleName = tumor.sampleName();
        String somaticDriverCatalog = somaticDriverCatalog(tumorSampleName);
        String somaticVcf = somaticVcf(tumorSampleName);
        String svVcf = svVcf(tumorSampleName);
        String geneCopyNumberTsv = geneCopyNumberTsv(tumorSampleName);
        String somaticCopyNumberTsv = somaticCopyNumberTsv(tumorSampleName);
        outputLocationsBuilder.somaticVariants(GoogleStorageLocation.of(bucket.name(), resultsDirectory.path(somaticVcf))).structuralVariants(GoogleStorageLocation.of(bucket.name(), resultsDirectory.path(svVcf))).geneCopyNumber(GoogleStorageLocation.of(bucket.name(), resultsDirectory.path(geneCopyNumberTsv))).somaticCopyNumber(GoogleStorageLocation.of(bucket.name(), resultsDirectory.path(somaticCopyNumberTsv))).somaticDriverCatalog(GoogleStorageLocation.of(bucket.name(), resultsDirectory.path(somaticDriverCatalog))).circosPlot(GoogleStorageLocation.of(bucket.name(), resultsDirectory.path(circosPlot(metadata))));
        outputBuilder.addDatatypes(new AddDatatype(DataType.SOMATIC_VARIANTS_PURPLE, metadata.barcode(), new ArchivePath(Folder.root(), namespace(), somaticVcf))).addDatatypes(new AddDatatype(DataType.STRUCTURAL_VARIANTS_PURPLE, metadata.barcode(), new ArchivePath(Folder.root(), namespace(), svVcf))).addDatatypes(new AddDatatype(DataType.PURPLE_SOMATIC_DRIVER_CATALOG, metadata.barcode(), new ArchivePath(Folder.root(), namespace(), somaticDriverCatalog))).addDatatypes(new AddDatatype(DataType.PURPLE_SOMATIC_COPY_NUMBER, metadata.barcode(), new ArchivePath(Folder.root(), namespace(), somaticCopyNumberTsv))).addDatatypes(new AddDatatype(DataType.PURPLE_CIRCOS_PLOT, metadata.barcode(), new ArchivePath(Folder.root(), namespace(), circosPlot(metadata))));
    });
    metadata.maybeReference().ifPresent(reference -> {
        String germlineDriverCatalog = germlineDriverCatalog(metadata.sampleName());
        String germlineDeletionTsv = germlineDeletionTsv(metadata.sampleName());
        String germlineVcf = germlineVcf(metadata.sampleName());
        outputLocationsBuilder.germlineVariants(GoogleStorageLocation.of(bucket.name(), resultsDirectory.path(germlineVcf))).germlineDriverCatalog(GoogleStorageLocation.of(bucket.name(), resultsDirectory.path(germlineDriverCatalog(metadata.sampleName())))).germlineDeletions(GoogleStorageLocation.of(bucket.name(), resultsDirectory.path(germlineDeletionTsv)));
        outputBuilder.addDatatypes(new AddDatatype(DataType.GERMLINE_VARIANTS_PURPLE, metadata.barcode(), new ArchivePath(Folder.root(), namespace(), germlineVcf))).addDatatypes(new AddDatatype(DataType.PURPLE_GERMLINE_DRIVER_CATALOG, metadata.barcode(), new ArchivePath(Folder.root(), namespace(), germlineDriverCatalog))).addDatatypes(new AddDatatype(DataType.PURPLE_GERMLINE_DELETION, metadata.barcode(), new ArchivePath(Folder.root(), namespace(), germlineDeletionTsv)));
    });
    outputBuilder.maybeOutputLocations(outputLocationsBuilder.build());
    return outputBuilder.build();
}
Also used : ArchivePath(com.hartwig.pipeline.metadata.ArchivePath) EntireOutputComponent(com.hartwig.pipeline.report.EntireOutputComponent) AddDatatype(com.hartwig.pipeline.metadata.AddDatatype)

Aggregations

AddDatatype (com.hartwig.pipeline.metadata.AddDatatype)5 ArchivePath (com.hartwig.pipeline.metadata.ArchivePath)5 EntireOutputComponent (com.hartwig.pipeline.report.EntireOutputComponent)5