Search in sources :

Example 1 with ArchivePath

use of com.hartwig.pipeline.metadata.ArchivePath 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 ArchivePath

use of com.hartwig.pipeline.metadata.ArchivePath 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 ArchivePath

use of com.hartwig.pipeline.metadata.ArchivePath in project pipeline5 by hartwigmedical.

the class Cuppa method persistedOutput.

@Override
public CuppaOutput persistedOutput(final SomaticRunMetadata metadata) {
    final String cuppaConclusionChart = cuppaConclusionChart(metadata);
    final String conclusionTxt = cuppaConclusionTxt(metadata);
    final String cuppaChart = cupReportSummaryPng(metadata);
    final String resultsCsv = cupDataCsv(metadata);
    final String featurePlot = cuppaFeaturePlot(metadata);
    return CuppaOutput.builder().status(PipelineStatus.PERSISTED).maybeCuppaOutputLocations(CuppaOutputLocations.builder().conclusionTxt(persistedDataset.path(metadata.tumor().sampleName(), DataType.CUPPA_CONCLUSION).orElse(GoogleStorageLocation.of(metadata.bucket(), PersistedLocations.blobForSet(metadata.set(), namespace(), conclusionTxt)))).summaryChartPng(persistedDataset.path(metadata.tumor().sampleName(), DataType.CUPPA_SUMMARY_CHART).orElse(GoogleStorageLocation.of(metadata.bucket(), PersistedLocations.blobForSet(metadata.set(), namespace(), cuppaChart)))).resultCsv(persistedDataset.path(metadata.tumor().sampleName(), DataType.CUPPA_RESULTS).orElse(GoogleStorageLocation.of(metadata.bucket(), PersistedLocations.blobForSet(metadata.set(), namespace(), resultsCsv)))).featurePlot(persistedDataset.path(metadata.tumor().sampleName(), DataType.CUPPA_FEATURE_PLOT).orElse(GoogleStorageLocation.of(metadata.bucket(), PersistedLocations.blobForSet(metadata.set(), namespace(), featurePlot)))).build()).addDatatypes(new AddDatatype(DataType.CUPPA_CHART, metadata.barcode(), new ArchivePath(Folder.root(), namespace(), cuppaConclusionChart))).addDatatypes(new AddDatatype(DataType.CUPPA_CONCLUSION, metadata.barcode(), new ArchivePath(Folder.root(), namespace(), conclusionTxt))).addDatatypes(new AddDatatype(DataType.CUPPA_CHART, metadata.barcode(), new ArchivePath(Folder.root(), namespace(), cuppaChart))).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) AddDatatype(com.hartwig.pipeline.metadata.AddDatatype)

Example 4 with ArchivePath

use of com.hartwig.pipeline.metadata.ArchivePath 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 5 with ArchivePath

use of com.hartwig.pipeline.metadata.ArchivePath in project pipeline5 by hartwigmedical.

the class VirusAnalysis method persistedOutput.

@Override
public VirusOutput persistedOutput(final SomaticRunMetadata metadata) {
    String vcf = vcf(metadata);
    String summary = summary(metadata);
    String annotated = annotatedVirusTsv(metadata);
    return VirusOutput.builder().status(PipelineStatus.PERSISTED).maybeAnnotatedVirusFile(persistedDataset.path(metadata.tumor().sampleName(), DataType.VIRUS_INTERPRETATION).orElse(GoogleStorageLocation.of(metadata.bucket(), PersistedLocations.blobForSet(metadata.set(), namespace(), annotated)))).addDatatypes(new AddDatatype(DataType.VIRUSBREAKEND_SUMMARY, metadata.barcode(), new ArchivePath(Folder.root(), namespace(), summary))).addDatatypes(new AddDatatype(DataType.VIRUS_INTERPRETATION, metadata.barcode(), new ArchivePath(Folder.root(), namespace(), annotated))).addDatatypes(new AddDatatype(DataType.VIRUSBREAKEND_VARIANTS, metadata.barcode(), new ArchivePath(Folder.root(), namespace(), vcf))).build();
}
Also used : ArchivePath(com.hartwig.pipeline.metadata.ArchivePath) AddDatatype(com.hartwig.pipeline.metadata.AddDatatype)

Aggregations

AddDatatype (com.hartwig.pipeline.metadata.AddDatatype)13 ArchivePath (com.hartwig.pipeline.metadata.ArchivePath)13 EntireOutputComponent (com.hartwig.pipeline.report.EntireOutputComponent)5 RunLogComponent (com.hartwig.pipeline.report.RunLogComponent)5 SingleFileComponent (com.hartwig.pipeline.report.SingleFileComponent)4 Folder (com.hartwig.pipeline.report.Folder)3 StartupScriptComponent (com.hartwig.pipeline.report.StartupScriptComponent)3 ResultsDirectory (com.hartwig.pipeline.ResultsDirectory)2 PipelineStatus (com.hartwig.pipeline.execution.PipelineStatus)2 BashStartupScript (com.hartwig.pipeline.execution.vm.BashStartupScript)2 VirtualMachineJobDefinition (com.hartwig.pipeline.execution.vm.VirtualMachineJobDefinition)2 ReportComponent (com.hartwig.pipeline.report.ReportComponent)2 ZippedVcfAndIndexComponent (com.hartwig.pipeline.report.ZippedVcfAndIndexComponent)2 SubStageInputOutput (com.hartwig.pipeline.stages.SubStageInputOutput)2 GoogleStorageLocation (com.hartwig.pipeline.storage.GoogleStorageLocation)2 RuntimeBucket (com.hartwig.pipeline.storage.RuntimeBucket)2 String.format (java.lang.String.format)2 List (java.util.List)2 Collectors (java.util.stream.Collectors)2 Blob (com.google.cloud.storage.Blob)1