diff --git a/modules/pair/facets.cwl b/modules/pair/facets.cwl deleted file mode 100644 index 5a031f6..0000000 --- a/modules/pair/facets.cwl +++ /dev/null @@ -1,82 +0,0 @@ -#!/usr/bin/env cwl-runner -cwlVersion: v1.0 -class: Workflow -id: facets -requirements: - MultipleInputFeatureRequirement: {} - ScatterFeatureRequirement: {} - SubworkflowFeatureRequirement: {} - InlineJavascriptRequirement: {} - StepInputExpressionRequirement: {} - -inputs: - - normal_bam: File - tumor_bam: File - tumor_sample_name: string - genome: string - facets_pcval: int - facets_cval: int - facets_snps: File - -outputs: - - facets_png_output: - type: File[] - outputSource: facets/png_files - - facets_txt_output_purity: - type: File - outputSource: facets/txt_files_purity - - facets_txt_output_hisens: - type: File - outputSource: facets/txt_files_hisens - - facets_out_output: - type: File[] - outputSource: facets/out_files - - facets_rdata_output: - type: File[] - outputSource: facets/rdata_files - - facets_seg_output: - type: File[] - outputSource: facets/seg_files - - facets_counts_output: - type: File - outputSource: snp_pileup/out_file - -steps: - snp_pileup: - in: - vcf: facets_snps - output_file: - valueFrom: ${ return inputs.normal_bam.basename.replace(".bam", "") + "__" + inputs.tumor_bam.basename.replace(".bam", "") + ".dat.gz"; } - normal_bam: normal_bam - tumor_bam: tumor_bam - count_orphans: - valueFrom: ${ return true; } - gzip: - valueFrom: ${ return true; } - pseudo_snps: - default: "50" - out: [out_file] - run: ../../tools/htstools/0.1.1/snp-pileup.cwl - - facets: - in: - genome: - default: "hg19" - counts_file: snp_pileup/out_file - TAG: - valueFrom: ${ return inputs.counts_file.basename.replace(".dat.gz", ""); } - directory: - default: "." - purity_cval: facets_pcval - cval: facets_cval - tumor_id: tumor_sample_name - out: [png_files, txt_files_purity, txt_files_hisens, out_files, rdata_files, seg_files] - run: ../../tools/facets.doFacets/1.6.3/facets.doFacets.cwl diff --git a/modules/pair/variant-calling-pair.cwl b/modules/pair/variant-calling-pair.cwl index f583cde..029b5d9 100644 --- a/modules/pair/variant-calling-pair.cwl +++ b/modules/pair/variant-calling-pair.cwl @@ -12,7 +12,6 @@ requirements: inputs: tumor_bam: File normal_bam: File - genome: string bed: File normal_sample_name: string tumor_sample_name: string @@ -38,8 +37,6 @@ inputs: - .sa - .fai - ^.dict - facets_pcval: int - facets_cval: int facets_snps: File complex_nn: float complex_tn: float @@ -52,27 +49,9 @@ outputs: annotate_vcf: type: File outputSource: annotate/annotate_vcf_output_file - facets_png: - type: File[] - outputSource: call_variants/facets_png - facets_txt_hisens: + snp_pileup: type: File - outputSource: call_variants/facets_txt_hisens - facets_txt_purity: - type: File - outputSource: call_variants/facets_txt_purity - facets_out: - type: File[] - outputSource: call_variants/facets_out - facets_rdata: - type: File[] - outputSource: call_variants/facets_rdata - facets_seg: - type: File[] - outputSource: call_variants/facets_seg - facets_counts: - type: File - outputSource: call_variants/facets_counts + outputSource: call_variants/snp_pileup mutect_vcf: type: File outputSource: call_variants/mutect_vcf @@ -107,7 +86,6 @@ steps: in: tumor_bam: tumor_index/bam_indexed normal_bam: normal_index/bam_indexed - genome: genome ref_fasta: ref_fasta normal_sample_name: normal_sample_name tumor_sample_name: tumor_sample_name @@ -117,17 +95,14 @@ steps: mutect_rf: mutect_rf bed: bed refseq: refseq - facets_pcval: facets_pcval - facets_cval: facets_cval facets_snps: facets_snps - out: [ vardict_vcf, mutect_vcf, mutect_callstats, facets_png, facets_txt_hisens, facets_txt_purity, facets_out, facets_rdata, facets_seg, facets_counts] + out: [ vardict_vcf, mutect_vcf, mutect_callstats, snp_pileup] run: class: Workflow id: call-variants inputs: - tumor_bam: File - genome: string normal_bam: File + tumor_bam: File ref_fasta: File normal_sample_name: string tumor_sample_name: string @@ -137,8 +112,6 @@ steps: mutect_rf: string[] bed: File refseq: File #file of refseq genes... - facets_pcval: int - facets_cval: int facets_snps: File outputs: mutect_vcf: @@ -150,39 +123,25 @@ steps: vardict_vcf: type: File outputSource: vardict/output - facets_png: - type: File[] - outputSource: facets/facets_png_output - facets_txt_hisens: - type: File - outputSource: facets/facets_txt_output_hisens - facets_txt_purity: - type: File - outputSource: facets/facets_txt_output_purity - facets_out: - type: File[] - outputSource: facets/facets_out_output - facets_rdata: - type: File[] - outputSource: facets/facets_rdata_output - facets_seg: - type: File[] - outputSource: facets/facets_seg_output - facets_counts: + snp_pileup: type: File - outputSource: facets/facets_counts_output + outputSource: snp_pileup/out_file steps: - facets: - run: facets.cwl + snp_pileup: + run: ../../tools/htstools/0.1.1/snp-pileup.cwl in: normal_bam: normal_bam tumor_bam: tumor_bam - tumor_sample_name: tumor_sample_name - genome: genome - facets_pcval: facets_pcval - facets_cval: facets_cval - facets_snps: facets_snps - out: [facets_png_output, facets_txt_output_hisens, facets_txt_output_purity, facets_out_output, facets_rdata_output, facets_seg_output, facets_counts_output] + vcf: facets_snps + output_file: + valueFrom: ${ return inputs.normal_bam.basename.replace(".bam", "") + "__" + inputs.tumor_bam.basename.replace(".bam", "") + ".dat.gz"; } + count_orphans: + valueFrom: ${ return true; } + gzip: + valueFrom: ${ return true; } + pseudo_snps: + default: "50" + out: [out_file] vardict: run: ../../tools/vardict/1.5.1/vardict.cwl in: diff --git a/project-workflow-sv.cwl b/project-workflow-sv.cwl index 7203bcd..54b81a4 100644 --- a/project-workflow-sv.cwl +++ b/project-workflow-sv.cwl @@ -214,50 +214,10 @@ outputs: outputSource: pair_process/mutect_norm_vcf secondaryFiles: - .tbi - # facets - facets_png: - type: - type: array - items: - type: array - items: File - outputSource: pair_process/facets_png - facets_txt_hisens: - type: - type: array - items: File - outputSource: pair_process/facets_txt_hisens - facets_txt_purity: - type: - type: array - items: File - outputSource: pair_process/facets_txt_purity - facets_out: - type: - type: array - items: - type: array - items: File - outputSource: pair_process/facets_out - facets_rdata: - type: - type: array - items: - type: array - items: File - outputSource: pair_process/facets_rdata - facets_seg: - type: - type: array - items: - type: array - items: File - outputSource: pair_process/facets_seg - facets_counts: - type: - type: array - items: File - outputSource: pair_process/facets_counts + # snp_pileup + snp_pileup: + type: File[] + outputSource: pair_process/snp_pileup # structural variants merged_file_unfiltered: type: File[] @@ -300,7 +260,7 @@ steps: pair: pairs ref_fasta: ref_fasta mouse_fasta: mouse_fasta - out: [normal_bam,tumor_bam,clstats1,clstats2,md_metrics,as_metrics,hs_metrics,insert_metrics,insert_pdf,per_target_coverage,qual_metrics,qual_pdf,doc_basecounts,gcbias_pdf,gcbias_metrics,gcbias_summary,conpair_pileups,mutect_vcf,mutect_callstats,vardict_vcf,combine_vcf,annotate_vcf,vardict_norm_vcf,mutect_norm_vcf,facets_png,facets_txt_hisens,facets_txt_purity,facets_out,facets_rdata,facets_seg,facets_counts,merged_file_unfiltered,merged_file,maf_file,portal_file,maf,genome,assay,pi,pi_email,project_prefix,normal_sample_name,tumor_sample_name] + out: [normal_bam,tumor_bam,clstats1,clstats2,md_metrics,as_metrics,hs_metrics,insert_metrics,insert_pdf,per_target_coverage,qual_metrics,qual_pdf,doc_basecounts,gcbias_pdf,gcbias_metrics,gcbias_summary,conpair_pileups,mutect_vcf,mutect_callstats,vardict_vcf,combine_vcf,annotate_vcf,vardict_norm_vcf,mutect_norm_vcf,snp_pileup,merged_file_unfiltered,merged_file,maf_file,portal_file,maf,genome,assay,pi,pi_email,project_prefix,normal_sample_name,tumor_sample_name] scatter: [pair] scatterMethod: dotproduct diff --git a/project-workflow.cwl b/project-workflow.cwl index 7824bb8..b788d0f 100644 --- a/project-workflow.cwl +++ b/project-workflow.cwl @@ -213,56 +213,14 @@ outputs: outputSource: pair_process/mutect_norm_vcf secondaryFiles: - .tbi - # facets - facets_png: - type: - type: array - items: - type: array - items: File - outputSource: pair_process/facets_png - facets_txt_hisens: - type: - type: array - items: File - outputSource: pair_process/facets_txt_hisens - facets_txt_purity: - type: - type: array - items: File - outputSource: pair_process/facets_txt_purity - facets_out: - type: - type: array - items: - type: array - items: File - outputSource: pair_process/facets_out - facets_rdata: - type: - type: array - items: - type: array - items: File - outputSource: pair_process/facets_rdata - facets_seg: - type: - type: array - items: - type: array - items: File - outputSource: pair_process/facets_seg - facets_counts: - type: - type: array - items: File - outputSource: pair_process/facets_counts - + # snp_pileup + snp_pileup: + type: File[] + outputSource: pair_process/snp_pileup # maf maf: type: File[] outputSource: pair_process/maf - # qc qc_pdf: type: File @@ -288,7 +246,7 @@ steps: pair: pairs ref_fasta: ref_fasta mouse_fasta: mouse_fasta - out: [normal_bam,tumor_bam,clstats1,clstats2,md_metrics,as_metrics,hs_metrics,insert_metrics,insert_pdf,per_target_coverage,qual_metrics,qual_pdf,doc_basecounts,gcbias_pdf,gcbias_metrics,gcbias_summary,conpair_pileups,mutect_vcf,mutect_callstats,vardict_vcf,combine_vcf,annotate_vcf,vardict_norm_vcf,mutect_norm_vcf,facets_png,facets_txt_hisens,facets_txt_purity,facets_out,facets_rdata,facets_seg,facets_counts,maf,genome,assay,pi,pi_email,project_prefix,normal_sample_name,tumor_sample_name] + out: [normal_bam,tumor_bam,clstats1,clstats2,md_metrics,as_metrics,hs_metrics,insert_metrics,insert_pdf,per_target_coverage,qual_metrics,qual_pdf,doc_basecounts,gcbias_pdf,gcbias_metrics,gcbias_summary,conpair_pileups,mutect_vcf,mutect_callstats,vardict_vcf,combine_vcf,annotate_vcf,vardict_norm_vcf,mutect_norm_vcf,snp_pileup,maf,genome,assay,pi,pi_email,project_prefix,normal_sample_name,tumor_sample_name] scatter: [pair] scatterMethod: dotproduct diff --git a/test/copy_outputs.yaml b/test/copy_outputs.yaml index 67ee2ba..9e8a712 100644 --- a/test/copy_outputs.yaml +++ b/test/copy_outputs.yaml @@ -13,21 +13,6 @@ maf: path: /juno/work/ci/argos-test/data/PairWorkflowPair0/PairWorkflow/foo_tumor.foo_normal.muts.maf - class: File path: /juno/work/ci/argos-test/data/PairWorkflowPair1/PairWorkflow/bar_tumor.bar_normal.muts.maf -facets: -- normal_id: foo_normal - tumor_id: foo_tumor - files: - - class: File - path: /juno/work/ci/argos-test/data/PairWorkflowPair0/PairWorkflow/foo_normal.rg.md.abra.printreads__foo_tumor.rg.md.abra.printreads_hisens.CNCF.png - - class: File - path: /juno/work/ci/argos-test/data/PairWorkflowPair0/PairWorkflow/foo_normal.rg.md.abra.printreads__foo_tumor.rg.md.abra.printreads_purity.CNCF.png -- normal_id: bar_normal - tumor_id: bar_tumor - files: - - class: File - path: /juno/work/ci/argos-test/data/PairWorkflowPair1/PairWorkflow/bar_normal.rg.md.abra.printreads__bar_tumor.rg.md.abra.printreads_hisens.CNCF.png - - class: File - path: /juno/work/ci/argos-test/data/PairWorkflowPair1/PairWorkflow/bar_normal.rg.md.abra.printreads__bar_tumor.rg.md.abra.printreads_purity.CNCF.png meta: - class: File path: /juno/work/ci/argos-test/data/fastq/DU874145-N/SampleSheet.csv diff --git a/test/copy_outputs_without_meta.yaml b/test/copy_outputs_without_meta.yaml index 7492375..83a428d 100644 --- a/test/copy_outputs_without_meta.yaml +++ b/test/copy_outputs_without_meta.yaml @@ -12,19 +12,4 @@ maf: - class: File path: /juno/work/ci/argos-test/data/PairWorkflowPair0/PairWorkflow/foo_tumor.foo_normal.muts.maf - class: File - path: /juno/work/ci/argos-test/data/PairWorkflowPair1/PairWorkflow/bar_tumor.bar_normal.muts.maf -facets: -- normal_id: foo_normal - tumor_id: foo_tumor - files: - - class: File - path: /juno/work/ci/argos-test/data/PairWorkflowPair0/PairWorkflow/foo_normal.rg.md.abra.printreads__foo_tumor.rg.md.abra.printreads_hisens.CNCF.png - - class: File - path: /juno/work/ci/argos-test/data/PairWorkflowPair0/PairWorkflow/foo_normal.rg.md.abra.printreads__foo_tumor.rg.md.abra.printreads_purity.CNCF.png -- normal_id: bar_normal - tumor_id: bar_tumor - files: - - class: File - path: /juno/work/ci/argos-test/data/PairWorkflowPair1/PairWorkflow/bar_normal.rg.md.abra.printreads__bar_tumor.rg.md.abra.printreads_hisens.CNCF.png - - class: File - path: /juno/work/ci/argos-test/data/PairWorkflowPair1/PairWorkflow/bar_normal.rg.md.abra.printreads__bar_tumor.rg.md.abra.printreads_purity.CNCF.png \ No newline at end of file + path: /juno/work/ci/argos-test/data/PairWorkflowPair1/PairWorkflow/bar_tumor.bar_normal.muts.maf \ No newline at end of file diff --git a/tools/extras/file_passthrough.cwl b/tools/extras/file_passthrough.cwl new file mode 100644 index 0000000..9a5458d --- /dev/null +++ b/tools/extras/file_passthrough.cwl @@ -0,0 +1,29 @@ +cwlVersion: v1.0 +class: ExpressionTool +id: file-passthrough +requirements: + InlineJavascriptRequirement: {} + +inputs: + files: + type: + type: array + items: File + + +outputs: + output_files: + type: + type: array + items: File + +expression: | + ${ var output_files = []; + var input_files = inputs.files; + for (var i = 0; i < input_files.length; i++) { + output_files.push(input_files[i]); + } + return { + 'output_files': output_files + }; + } diff --git a/workflows/copy_outputs.cwl b/workflows/copy_outputs.cwl index ce4eb13..5875219 100644 --- a/workflows/copy_outputs.cwl +++ b/workflows/copy_outputs.cwl @@ -18,15 +18,6 @@ inputs: meta: type: File[] default: [] - facets: - type: - type: array - items: - type: record - fields: - normal_id: string - tumor_id: string - files: File[] outputs: @@ -42,9 +33,6 @@ outputs: meta_files: type: File[] outputSource: meta - facets: - type: Directory - outputSource: collect_facets/directory steps: @@ -69,15 +57,4 @@ steps: output_directory_name: valueFrom: ${ return "maf"; } out: [directory] - collect_facets: - run: ../modules/project/consolidate_pairs.cwl - in: - pairs: facets - output_directory_name: - valueFrom: ${ return "facets"; } - flatten_directories: - valueFrom: ${ return false; } - out: [directory] - - - + diff --git a/workflows/pair-workflow-sv.cwl b/workflows/pair-workflow-sv.cwl index d9115c0..5ce4db0 100644 --- a/workflows/pair-workflow-sv.cwl +++ b/workflows/pair-workflow-sv.cwl @@ -101,8 +101,6 @@ inputs: pi: string pi_email: string opt_dup_pix_dist: string - facets_pcval: int - facets_cval: int abra_ram_min: int gatk_jar_path: string pair: @@ -222,28 +220,10 @@ outputs: outputSource: variant_calling/mutect_norm_vcf secondaryFiles: - .tbi - # facets - facets_png: - type: File[] - outputSource: variant_calling/facets_png - facets_txt_hisens: - type: File - outputSource: variant_calling/facets_txt_hisens - facets_txt_purity: - type: File - outputSource: variant_calling/facets_txt_purity - facets_out: - type: File[] - outputSource: variant_calling/facets_out - facets_rdata: - type: File[] - outputSource: variant_calling/facets_rdata - facets_seg: - type: File[] - outputSource: variant_calling/facets_seg - facets_counts: + # snp_pileup + snp_pileup: type: File - outputSource: variant_calling/facets_counts + outputSource: variant_calling/snp_pileup # structural variants merged_file_unfiltered: type: File @@ -335,8 +315,6 @@ steps: valueFrom: ${ return inputs.bams[1]; } tumor_bam: valueFrom: ${ return inputs.bams[0]; } - genome: - valueFrom: ${ return inputs.runparams.genome } bed: alignment/bed normal_sample_name: valueFrom: ${ return inputs.pair[1].ID; } @@ -353,17 +331,13 @@ steps: hotspot_vcf: valueFrom: ${ return inputs.db_files.hotspot_vcf } ref_fasta: ref_fasta - facets_pcval: - valueFrom: ${ return inputs.runparams.facets_pcval } - facets_cval: - valueFrom: ${ return inputs.runparams.facets_cval } facets_snps: valueFrom: ${ return inputs.db_files.facets_snps } complex_tn: valueFrom: ${ return inputs.runparams.complex_tn; } complex_nn: valueFrom: ${ return inputs.runparams.complex_nn; } - out: [combine_vcf, annotate_vcf, facets_png, facets_txt_hisens, facets_txt_purity, facets_out, facets_rdata, facets_seg, mutect_vcf, mutect_callstats, vardict_vcf, facets_counts, vardict_norm_vcf, mutect_norm_vcf] + out: [combine_vcf, annotate_vcf, snp_pileup, mutect_vcf, mutect_callstats, vardict_vcf, vardict_norm_vcf, mutect_norm_vcf] structural_variants: run: ../modules/pair/structural-variants-pair.cwl diff --git a/workflows/pair-workflow.cwl b/workflows/pair-workflow.cwl index 7eda56a..c744808 100644 --- a/workflows/pair-workflow.cwl +++ b/workflows/pair-workflow.cwl @@ -100,8 +100,6 @@ inputs: pi: string pi_email: string opt_dup_pix_dist: string - facets_pcval: int - facets_cval: int abra_ram_min: int gatk_jar_path: string pair: @@ -221,33 +219,14 @@ outputs: outputSource: variant_calling/mutect_norm_vcf secondaryFiles: - .tbi - # facets - facets_png: - type: File[] - outputSource: variant_calling/facets_png - facets_txt_hisens: - type: File - outputSource: variant_calling/facets_txt_hisens - facets_txt_purity: + # snp_pileup + snp_pileup: type: File - outputSource: variant_calling/facets_txt_purity - facets_out: - type: File[] - outputSource: variant_calling/facets_out - facets_rdata: - type: File[] - outputSource: variant_calling/facets_rdata - facets_seg: - type: File[] - outputSource: variant_calling/facets_seg - facets_counts: - type: File - outputSource: variant_calling/facets_counts + outputSource: variant_calling/snp_pileup # maf maf: type: File outputSource: maf_processing/maf - # info genome: type: string @@ -319,8 +298,6 @@ steps: valueFrom: ${ return inputs.bams[1]; } tumor_bam: valueFrom: ${ return inputs.bams[0]; } - genome: - valueFrom: ${ return inputs.runparams.genome } bed: alignment/bed normal_sample_name: valueFrom: ${ return inputs.pair[1].ID; } @@ -337,17 +314,13 @@ steps: hotspot_vcf: valueFrom: ${ return inputs.db_files.hotspot_vcf } ref_fasta: ref_fasta - facets_pcval: - valueFrom: ${ return inputs.runparams.facets_pcval } - facets_cval: - valueFrom: ${ return inputs.runparams.facets_cval } facets_snps: valueFrom: ${ return inputs.db_files.facets_snps } complex_tn: valueFrom: ${ return inputs.runparams.complex_tn; } complex_nn: valueFrom: ${ return inputs.runparams.complex_nn; } - out: [combine_vcf, annotate_vcf, facets_png, facets_txt_hisens, facets_txt_purity, facets_out, facets_rdata, facets_seg, mutect_vcf, mutect_callstats, vardict_vcf, facets_counts, vardict_norm_vcf, mutect_norm_vcf] + out: [combine_vcf, annotate_vcf, snp_pileup, mutect_vcf, mutect_callstats, vardict_vcf, vardict_norm_vcf, mutect_norm_vcf] maf_processing: run: ../modules/pair/maf-processing-pair.cwl in: