use of com.hartwig.pipeline.report.StartupScriptComponent in project pipeline5 by hartwigmedical.
the class SageCaller method outputBuilder.
protected ImmutableSageOutput.Builder outputBuilder(final SomaticRunMetadata metadata, final PipelineStatus jobStatus, final RuntimeBucket bucket, final ResultsDirectory resultsDirectory) {
final String filteredOutputFile = sageConfiguration.filteredTemplate().apply(metadata);
final String unfilteredOutputFile = sageConfiguration.unfilteredTemplate().apply(metadata);
final String geneCoverageFile = sageConfiguration.geneCoverageTemplate().apply(metadata);
final Optional<String> somaticRefSampleBqrPlot = referenceSampleBqrPlot(metadata);
final Optional<String> somaticTumorSampleBqrPlot = tumorSampleBqrPlot(metadata);
final ImmutableSageOutput.Builder builder = SageOutput.builder(namespace()).status(jobStatus);
somaticRefSampleBqrPlot.ifPresent(s -> builder.maybeSomaticRefSampleBqrPlot(GoogleStorageLocation.of(bucket.name(), resultsDirectory.path(s))).addReportComponents(bqrComponent("png", bucket, resultsDirectory, metadata.reference().sampleName())).addReportComponents(bqrComponent("tsv", bucket, resultsDirectory, metadata.reference().sampleName())));
somaticTumorSampleBqrPlot.ifPresent(s -> builder.maybeSomaticTumorSampleBqrPlot(GoogleStorageLocation.of(bucket.name(), resultsDirectory.path(s))).addReportComponents(bqrComponent("png", bucket, resultsDirectory, metadata.tumor().sampleName())).addReportComponents(bqrComponent("tsv", bucket, resultsDirectory, metadata.tumor().sampleName())));
return builder.addFailedLogLocations(GoogleStorageLocation.of(bucket.name(), RunLogComponent.LOG_FILE)).maybeGermlineGeneCoverage(GoogleStorageLocation.of(bucket.name(), resultsDirectory.path(geneCoverageFile))).maybeSomaticTumorSampleBqrPlot(somaticTumorSampleBqrPlot.map(t -> GoogleStorageLocation.of(bucket.name(), resultsDirectory.path(t)))).maybeVariants(GoogleStorageLocation.of(bucket.name(), resultsDirectory.path(filteredOutputFile))).addReportComponents(bqrComponent("png", bucket, resultsDirectory, metadata.sampleName())).addReportComponents(bqrComponent("tsv", bucket, resultsDirectory, metadata.sampleName())).addReportComponents(vcfComponent(unfilteredOutputFile, bucket, resultsDirectory)).addReportComponents(vcfComponent(filteredOutputFile, bucket, resultsDirectory)).addReportComponents(singleFileComponent(geneCoverageFile, bucket, resultsDirectory)).addReportComponents(new RunLogComponent(bucket, namespace(), Folder.root(), resultsDirectory)).addReportComponents(new StartupScriptComponent(bucket, namespace(), Folder.root())).addDatatypes(new AddDatatype(sageConfiguration.vcfDatatype(), metadata.barcode(), new ArchivePath(Folder.root(), namespace(), filteredOutputFile))).addDatatypes(new AddDatatype(sageConfiguration.geneCoverageDatatype(), metadata.barcode(), new ArchivePath(Folder.root(), namespace(), geneCoverageFile))).addAllDatatypes(somaticRefSampleBqrPlot.stream().map(r -> new AddDatatype(sageConfiguration.tumorSampleBqrPlot(), metadata.barcode(), new ArchivePath(Folder.root(), namespace(), r))).collect(Collectors.toList())).addAllDatatypes(somaticTumorSampleBqrPlot.stream().map(t -> new AddDatatype(sageConfiguration.refSampleBqrPlot(), metadata.barcode(), new ArchivePath(Folder.root(), namespace(), t))).collect(Collectors.toList()));
}
use of com.hartwig.pipeline.report.StartupScriptComponent in project pipeline5 by hartwigmedical.
the class Gripss method output.
@Override
public GripssOutput output(final SomaticRunMetadata metadata, final PipelineStatus jobStatus, final RuntimeBucket bucket, final ResultsDirectory resultsDirectory) {
String filteredVcfFile = filteredVcf(metadata);
String unfilteredVcfFile = unfilteredVcf(metadata);
return GripssOutput.builder(namespace()).status(jobStatus).maybeFilteredVariants(GoogleStorageLocation.of(bucket.name(), resultsDirectory.path(basename(filteredVcfFile)))).maybeUnfilteredVariants(GoogleStorageLocation.of(bucket.name(), resultsDirectory.path(basename(unfilteredVcfFile)))).addFailedLogLocations(GoogleStorageLocation.of(bucket.name(), RunLogComponent.LOG_FILE)).addReportComponents(new ZippedVcfAndIndexComponent(bucket, namespace(), Folder.root(), basename(unfilteredVcfFile), basename(unfilteredVcfFile), resultsDirectory)).addReportComponents(new ZippedVcfAndIndexComponent(bucket, namespace(), Folder.root(), basename(filteredVcfFile), basename(filteredVcfFile), resultsDirectory)).addReportComponents(new RunLogComponent(bucket, namespace(), Folder.root(), resultsDirectory)).addReportComponents(new StartupScriptComponent(bucket, namespace(), Folder.root())).addDatatypes(new AddDatatype(unfilteredDatatype(), metadata.barcode(), new ArchivePath(Folder.root(), namespace(), basename(unfilteredVcfFile))), new AddDatatype(filteredDatatype(), metadata.barcode(), new ArchivePath(Folder.root(), namespace(), basename(filteredVcfFile)))).build();
}
use of com.hartwig.pipeline.report.StartupScriptComponent in project pipeline5 by hartwigmedical.
the class CramConversion method output.
@Override
public CramOutput output(final SingleSampleRunMetadata metadata, final PipelineStatus jobStatus, final RuntimeBucket bucket, final ResultsDirectory resultsDirectory) {
String cram = new File(outputCram).getName();
String crai = FileTypes.crai(cram);
Folder folder = Folder.from(metadata);
return CramOutput.builder().status(jobStatus).addFailedLogLocations(GoogleStorageLocation.of(bucket.name(), RunLogComponent.LOG_FILE)).addReportComponents(new RunLogComponent(bucket, NAMESPACE, folder, resultsDirectory), new StartupScriptComponent(bucket, NAMESPACE, folder), new SingleFileComponent(bucket, NAMESPACE, folder, cram, cram, resultsDirectory), new SingleFileComponent(bucket, NAMESPACE, folder, crai, crai, resultsDirectory)).addDatatypes(new AddDatatype(DataType.ALIGNED_READS, metadata.barcode(), new ArchivePath(Folder.from(metadata), namespace(), cram)), new AddDatatype(DataType.ALIGNED_READS_INDEX, metadata.barcode(), new ArchivePath(Folder.from(metadata), namespace(), crai))).build();
}
Aggregations