From 8d093dcb2a103e160550ff2e33bb3eba73367380 Mon Sep 17 00:00:00 2001 From: modupe adetunji Date: Wed, 24 Jun 2020 16:28:18 -0500 Subject: [PATCH] dx-cwl from main seaseq --- LSFconfig.json | 47 ---- README.md | 27 +- cwl/ame.cwl | 13 +- cwl/bamtobed.cwl | 13 +- cwl/bamtogff-scatter.cwl | 9 +- cwl/bamtogff.cwl | 9 +- cwl/basicfastqstats.cwl | 4 +- cwl/bedfasta.cwl | 16 -- cwl/blacklist.cwl | 11 +- cwl/bowtie.cwl | 17 -- cwl/dev-motifs.cwl | 74 ++++++ ...q_pipeline.cwl => dev-seaseq_pipeline.cwl} | 144 +++++----- cwl/fastqc.cwl | 4 + cwl/flankbed.cwl | 10 +- cwl/igvtdf.cwl | 11 +- cwl/intersectbed.cwl | 11 +- cwl/macs1call.cwl | 8 +- cwl/macs1nm.cwl | 8 +- cwl/meme-chip.cwl | 13 +- cwl/motifs.cwl | 12 +- cwl/movealloutput.cwl | 3 +- cwl/normalize.cwl | 6 +- cwl/roseNC-scatter.cwl | 4 + cwl/roseNC.cwl | 4 + cwl/runSPP.cwl | 4 + cwl/samtools-flagstat.cwl | 11 +- cwl/samtools-index.cwl | 6 +- cwl/samtools-mkdupr.cwl | 6 +- cwl/samtools-sort.cwl | 7 +- cwl/samtools-view.cwl | 8 +- cwl/seaseq-mapping.cwl | 198 -------------- cwl/seaseq_pipeline.cwl | 11 +- cwl/seaseq_pipeline_scatter.cwl | 12 +- cwl/sicer.cwl | 11 +- cwl/sicerRB.cwl | 125 --------- cwl/sortbed.cwl | 11 +- cwl/summarystats.cwl | 7 +- cwl/taglength.cwl | 2 + cwl/testinglist.cwl | 251 ------------------ cwl/visualization.cwl | 3 +- cwl/wigtobigwig.cwl | 5 +- exec-seaseq_wrap.sh | 106 -------- seaseq_wrap.sh | 112 -------- seaseq_wrap_scatter.sh | 107 -------- sjhpc_modules.ml | 22 -- test/cmd_seaseq.sh | 13 + test/cmd_seaseq_mapping.sh | 12 - test/exec-run_seaseqtest.sh | 1 - test/inputyml.yml | 5 +- test/inputymlscatter.yml | 60 ----- test/run_seaseq_scatter_test.sh | 1 - test/run_seaseq_test.sh | 2 - test/tool-run_seaseqtest.sh | 1 - tool-seaseq_wrap.sh | 109 -------- 54 files changed, 331 insertions(+), 1376 deletions(-) delete mode 100755 LSFconfig.json create mode 100755 cwl/dev-motifs.cwl rename cwl/{v1seaseq_pipeline.cwl => dev-seaseq_pipeline.cwl} (81%) delete mode 100755 cwl/seaseq-mapping.cwl delete mode 100755 cwl/sicerRB.cwl delete mode 100755 cwl/testinglist.cwl delete mode 100755 exec-seaseq_wrap.sh delete mode 100755 seaseq_wrap.sh delete mode 100755 seaseq_wrap_scatter.sh delete mode 100755 sjhpc_modules.ml create mode 100755 test/cmd_seaseq.sh delete mode 100755 test/cmd_seaseq_mapping.sh delete mode 100755 test/exec-run_seaseqtest.sh delete mode 100755 test/inputymlscatter.yml delete mode 100755 test/run_seaseq_scatter_test.sh delete mode 100755 test/run_seaseq_test.sh delete mode 100755 test/tool-run_seaseqtest.sh delete mode 100755 tool-seaseq_wrap.sh diff --git a/LSFconfig.json b/LSFconfig.json deleted file mode 100755 index 941234b..0000000 --- a/LSFconfig.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "queue": "standard", - "project": "ChiPpipeline", - "res_req": "span[hosts=1] select[rhel7]", - "steps": { - "Bowtie": { - "processors" : "20", - "res_req": "rusage[mem=10000]", - }, - "MACS-Auto": { - "res_req": "rusage[mem=10000]", - }, - "MACS-All": { - "res_req": "rusage[mem=10000]", - }, - "MACS-NM": { - "res_req": "rusage[mem=10000]", - }, - "SICER": { - "res_req": "rusage[mem=10000]", - }, - "PeaksQC": { - "res_req": "rusage[mem=10000]", - }, - "BasicMetrics": { - "res_req": "rusage[mem=20000]", - }, - "ROSE": { - "res_req": "rusage[mem=20000]", - }, - "MOTIFS/AME": { - "res_req": "rusage[mem=10000]", - }, - "SummitMOTIFS/AME": { - "res_req": "rusage[mem=10000]", - }, - "SortBed": { - "res_req": "rusage[mem=10000]", - }, - "runSPP": { - "res_req": "rusage[mem=10000]", - }, - "CountIntersectBed": { - "res_req": "rusage[mem=10000]", - }, - }, -} diff --git a/README.md b/README.md index d61c129..6401457 100755 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # (S)ingle (E)nd (A)ntibody (SEQ)uencing pipeline +### DX-CWL COMPATIBLE + Chromatin Single-End analysis pipeline The SEASEQ Pipeline is a complete analysis pipeline for CHiP @@ -20,14 +22,16 @@ and about 30GB of supplemental data. ## PROGRAMS & VERSIONS +Programs and versions used to build and test the pipeline. + * bowtie v. 1.2.2 * fastqc v. 0.11.5 * samtools v. 1.9 * R v. 3.6.1 * macs v. 041014 -* SICER2 v. 1.0.1 +* SICER2 v. 1.0.2 * meme v. 4.11.2 -* phantompeakqualtools v. 1.2.1.1 +* spp v. 1.16.0 * bedtools/2.25.0 * python v. 3.7.0 * java v. 1.8.0_60 @@ -39,9 +43,13 @@ and about 30GB of supplemental data. * BAM2GFF v. 1.1.0 -## REQUIREMENTS +## REQUIREMENT + +* INPUT -INPUT YML +**inputyml.yml** file + +Example of an **inputyml.yml** file. ``` reference: @@ -49,8 +57,8 @@ reference: location: /path/to/genome_reference+index fastqfile: - - { class: File, path: /path/to/fastqfile1 } - - { class: File, path: /path/to/fastqfile2 } + class: File + path: /path/to/fastqfile keep_dup: all @@ -71,10 +79,11 @@ motifdatabases: - { class: File, path: /path/to/meme_motif2 } ``` +* OUTPUTS -## EXAMPLE +All outputfiles will be saved in current working directory -We provided example instructions for running under [Toil] -(https://toil.readthedocs.io/en/latest/) on our St. Jude HPC LSF cluster. +## EXAMPLE SYNTAX using CWLTOOL +cwltool /path/to/folder/cwl/seaseq_pipeline.cwl inputyml.yml diff --git a/cwl/ame.cwl b/cwl/ame.cwl index c30c471..fa811c7 100755 --- a/cwl/ame.cwl +++ b/cwl/ame.cwl @@ -2,14 +2,15 @@ cwlVersion: v1.0 baseCommand: ame class: CommandLineTool +label: AME - Analysis of Motif Enrichment +doc: | + ame + hints: DockerRequirement: - dockerPull: madetunj/memesuite:v5.1.1 + dockerPull: madetunj/memesuite:v5.1.1 -label: AME - Analysis of Motif Enrichment -doc: | - ame requirements: - class: InlineJavascriptRequirement @@ -18,6 +19,7 @@ requirements: return 'bklist'+inputs.convertfasta.nameroot.split('bklist').slice(-1)+'-ame_out'; }; + inputs: convertfasta: label: "BED converted FASTA file" @@ -48,8 +50,7 @@ inputs: } } default: "" - - + outputs: outDir: diff --git a/cwl/bamtobed.cwl b/cwl/bamtobed.cwl index d7d1d64..3a836e6 100755 --- a/cwl/bamtobed.cwl +++ b/cwl/bamtobed.cwl @@ -2,19 +2,19 @@ cwlVersion: v1.0 baseCommand: [bamToBed] class: CommandLineTool +label: convert bam to bed +doc: | + bamToBed -i > + hints: DockerRequirement: - dockerPull: madetunj/bedtools:v2.25.0 + dockerPull: madetunj/bedtools:v2.25.0 -label: convert bam to bed -doc: | - bamToBed -i > requirements: - class: ShellCommandRequirement - class: InlineJavascriptRequirement - expressionLib: - var var_output_name = function() { if (inputs.infile != null) { @@ -22,6 +22,7 @@ requirements: } }; + inputs: infile: label: "BAM file" @@ -35,6 +36,7 @@ inputs: label: "Output BED file name" default: "" + stdout: | ${ if (inputs.outputfile == "") { @@ -44,6 +46,7 @@ stdout: | } } + outputs: outfile: type: stdout diff --git a/cwl/bamtogff-scatter.cwl b/cwl/bamtogff-scatter.cwl index 86cc3b7..fad5ed2 100755 --- a/cwl/bamtogff-scatter.cwl +++ b/cwl/bamtogff-scatter.cwl @@ -3,13 +3,14 @@ cwlVersion: v1.0 baseCommand: [BAM2GFF-local.sh] class: CommandLineTool label: BAM to GFF for MetaGenes calculation v1 on bam file for all metagenes +doc: | + BAM2GFF_call.sh + hints: DockerRequirement: - dockerPull: madetunj/bam2gff:v1.1.0 + dockerPull: madetunj/bam2gff:v1.1.0 -doc: | - BAM2GFF_call.sh requirements: - class: ShellCommandRequirement @@ -21,6 +22,7 @@ requirements: } }; + inputs: bamfile: label: "BAM file" @@ -83,6 +85,7 @@ inputs: prefix: '" && mkdir -p $nameoffolder && mv matrix *png *pdf $nameoffolder' default: true + outputs: metagenesDir: type: Directory diff --git a/cwl/bamtogff.cwl b/cwl/bamtogff.cwl index fb6127a..79d2ae3 100755 --- a/cwl/bamtogff.cwl +++ b/cwl/bamtogff.cwl @@ -3,13 +3,14 @@ cwlVersion: v1.0 baseCommand: [BAM2GFF-local.sh] class: CommandLineTool label: BAM to GFF for MetaGenes calculation v1 on bam file for all metagenes +doc: | + BAM2GFF_call.sh + hints: DockerRequirement: - dockerPull: madetunj/bam2gff:v1.1.0 + dockerPull: madetunj/bam2gff:v1.1.0 -doc: | - BAM2GFF_call.sh requirements: - class: ShellCommandRequirement @@ -21,6 +22,7 @@ requirements: } }; + inputs: bamfile: label: "BAM file" @@ -83,6 +85,7 @@ inputs: prefix: '" && mkdir -p $nameoffolder && mv matrix *png *pdf $nameoffolder' default: true + outputs: metagenesDir: type: Directory diff --git a/cwl/basicfastqstats.cwl b/cwl/basicfastqstats.cwl index 1c77a04..5f52481 100755 --- a/cwl/basicfastqstats.cwl +++ b/cwl/basicfastqstats.cwl @@ -3,13 +3,14 @@ cwlVersion: v1.0 baseCommand: [basicfastqstats.sh] class: CommandLineTool + hints: DockerRequirement: dockerPull: madetunj/seaseq:v0.0.1 + requirements: - class: InlineJavascriptRequirement - expressionLib: - var var_output_name = function() { if (inputs.fastqfile != null) { @@ -17,6 +18,7 @@ requirements: } }; + inputs: fastqfile: type: File diff --git a/cwl/bedfasta.cwl b/cwl/bedfasta.cwl index dbd80e5..b07bbbb 100755 --- a/cwl/bedfasta.cwl +++ b/cwl/bedfasta.cwl @@ -26,22 +26,6 @@ requirements: listing: [ $(inputs.ref_fasta), $(inputs.ref_fasta_index) ] inputs: - reference: - label: "Genome reference directory" - type: Directory? - inputBinding: - prefix: -fi - position: 1 - valueFrom: | - ${ - for (var i = 0; i < self.listing.length; i++) { - if (self.listing[i].path.split('.').slice(-1) == 'fa') { - return self.listing[i].path; - } - } - return null; - } - ref_fasta: type: File? inputBinding: diff --git a/cwl/blacklist.cwl b/cwl/blacklist.cwl index e42e063..e3e0cb5 100755 --- a/cwl/blacklist.cwl +++ b/cwl/blacklist.cwl @@ -2,19 +2,19 @@ cwlVersion: v1.0 baseCommand: [intersectBed, -v] class: CommandLineTool +label: bedtools intersect, to remove blacklist +doc: | + intersectBed -v -a KOPTK1_DMSO.rmdup.bam -b ~/.genomes/hg19/hg19-blacklist.v2.bed > ooo + hints: DockerRequirement: dockerPull: madetunj/bedtools:v2.25.0 -label: bedtools intersect, to remove blacklist -doc: | - intersectBed -v -a KOPTK1_DMSO.rmdup.bam -b ~/.genomes/hg19/hg19-blacklist.v2.bed > ooo requirements: - class: ShellCommandRequirement - class: InlineJavascriptRequirement - expressionLib: - var var_output_name = function() { if (inputs.infile != null) { @@ -22,6 +22,7 @@ requirements: } }; + inputs: infile: type: File @@ -43,6 +44,7 @@ inputs: label: "Output file name" default: "" + stdout: | ${ if (inputs.outputfile == "") { @@ -52,6 +54,7 @@ stdout: | } } + outputs: outfile: type: stdout diff --git a/cwl/bowtie.cwl b/cwl/bowtie.cwl index 3445881..14491a3 100755 --- a/cwl/bowtie.cwl +++ b/cwl/bowtie.cwl @@ -99,23 +99,6 @@ inputs: prefix: --best position: 5 - reference: - type: Directory? - label: "Genome reference directory" - inputBinding: - position: 6 - valueFrom: | - ${ - for (var i = 0; i < self.listing.length; i++) { - if (self.listing[i].path.split('.').slice(-3).join('.') == 'rev.1.ebwt') { - return self.listing[i].path.split('.').slice(0,-3).join('.'); - } - } - return null; - } - doc: | - Folder with Bowtie indices - bowtieindex_1: type: File? diff --git a/cwl/dev-motifs.cwl b/cwl/dev-motifs.cwl new file mode 100755 index 0000000..1028639 --- /dev/null +++ b/cwl/dev-motifs.cwl @@ -0,0 +1,74 @@ +#!/usr/bin/env cwl-runner +cwlVersion: v1.0 +class: Workflow + + +requirements: + - class: StepInputExpressionRequirement + - class: InlineJavascriptRequirement + + +inputs: + ref_fasta: + type: File? + label: "Genome reference fasta" + + ref_fasta_index: + type: File? + label: "Genome reference fasta fai index" + + bedfile: + type: File + label: "peaks bed file" + + motifdatabases: + type: File[] + label: "MEME motif databases to identify motif enrichment" + + +outputs: + memechipdir: + type: Directory + outputSource: MEMECHIP/outDir + label: "MEMECHIP output directory" + + amedir: + type: Directory + outputSource: AME/outDir + label: "AME output directory" + + bedfasta: + type: File + outputSource: BEDfasta/outfile + label: "BED converted FASTA file" + + +steps: + MEMECHIP: + run: meme-chip.cwl + in: + convertfasta: BEDfasta/outfile + out: [outDir] + + AME: + requirements: + ResourceRequirement: + #ramMax: 10000 + coresMin: 1 + run: ame.cwl + in: + convertfasta: BEDfasta/outfile + motifdatabases: motifdatabases + out: [outDir] + + BEDfasta: + in: + ref_fasta: ref_fasta + ref_fasta_index: ref_fasta_index + bedfile: bedfile + out: [outfile] + run: bedfasta.cwl + + +doc: | + Workflow calls MOTIFS both enriched and discovered using the MEME-suite (AME & MEME-chip). diff --git a/cwl/v1seaseq_pipeline.cwl b/cwl/dev-seaseq_pipeline.cwl similarity index 81% rename from cwl/v1seaseq_pipeline.cwl rename to cwl/dev-seaseq_pipeline.cwl index cea8999..0dd0a89 100755 --- a/cwl/v1seaseq_pipeline.cwl +++ b/cwl/dev-seaseq_pipeline.cwl @@ -9,15 +9,25 @@ doc: | enhancers & super-enhancers using ROSE, bam density plots using BAM2GFF. + requirements: - class: SubworkflowFeatureRequirement - - class: ScatterFeatureRequirement + inputs: # main files & directorys - reference: Directory + #reference + individual indexes + bowtieindex_1: File? + bowtieindex_2: File? + bowtieindex_3: File? + bowtieindex_4: File? + bowtieindex_rev_1: File? + bowtieindex_rev_2: File? + ref_fasta: File? + ref_fasta_index: File? + gtffile: File - fastqfile: File[] + fastqfile: File chromsizes: File blacklistfile: File motifdatabases: File[] @@ -53,144 +63,146 @@ inputs: # ROSE feature: string? + outputs: sam_sort: outputSource: SamSort/outfile - type: File[] + type: File fastq_metrics: outputSource: BasicMetrics/metrics_out - type: File[] + type: File rmdup_bam: outputSource: SamIndex/outfile - type: File[] + type: File bklist_bam: outputSource: BkIndex/outfile - type: File[] + type: File bamqc_html: outputSource: BamQC/htmlfile - type: File[] + type: File bamqc_zip: outputSource: BamQC/zipfile - type: File[] + type: File readqc_zip: outputSource: ReadQC/zipfile - type: File[] + type: File readqc_html: outputSource: ReadQC/htmlfile - type: File[] + type: File # MACS-AUTO macsDir: - type: Directory[] + type: Directory outputSource: MACS-Auto/macsDir # MACS-ALL allmacsDir: - type: Directory[] + type: Directory outputSource: MACS-All/macsDir # MACS-NM nmmacsDir: - type: Directory[] + type: Directory outputSource: MACS-NM/macsDir #VISUAL rpmwig: - type: File[] + type: File outputSource: WIG-Auto/rpmwig outBW: outputSource: WIG-Auto/outBW - type: File[] + type: File outtdf: outputSource: WIG-Auto/outtdf - type: File[] + type: File allrpmwig: - type: File[] + type: File outputSource: WIG-All/rpmwig alloutBW: outputSource: WIG-All/outBW - type: File[] + type: File allouttdf: outputSource: WIG-All/outtdf - type: File[] + type: File nmrpmwig: - type: File[] + type: File outputSource: WIG-NM/rpmwig nmoutBW: outputSource: WIG-NM/outBW - type: File[] + type: File nmouttdf: outputSource: WIG-NM/outtdf - type: File[] + type: File # MOTIFs & Summits output bedfasta: - type: File[] + type: File outputSource: MOTIFS/bedfasta flankbed: - type: File[] + type: File outputSource: FlankBED/outfile memechipdir: - type: Directory[] + type: Directory outputSource: MOTIFS/memechipdir summitmemechipdir: - type: Directory[] + type: Directory outputSource: SummitMOTIFS/memechipdir amedir: - type: Directory[] + type: Directory outputSource: MOTIFS/amedir summitamedir: - type: Directory[] + type: Directory outputSource: SummitMOTIFS/amedir # METAGENE output metagenesDir: - type: Directory[] + type: Directory outputSource: MetaGene/metagenesDir # SICER output sicerDir: - type: Directory[] + type: Directory outputSource: SICER/sicerDir # ROSE output roseoutput: - type: Directory[] + type: Directory outputSource: ROSE/RoseDir # QC Control & Statistics output statsfile: - type: File[] + type: File outputSource: PeaksQC/statsfile htmlfile: - type: File[] + type: File outputSource: PeaksQC/htmlfile textfile: - type: File[] + type: File outputSource: PeaksQC/textfile + steps: BasicMetrics: requirements: @@ -201,27 +213,24 @@ steps: fastqfile: fastqfile out: [metrics_out] run: basicfastqstats.cwl - scatter: fastqfile TagLen: in: datafile: BasicMetrics/metrics_out out: [tagLength] run: taglength.cwl - scatter: datafile ReadQC: in: infile: fastqfile out: [htmlfile, zipfile] run: fastqc.cwl - scatter: infile Bowtie: requirements: ResourceRequirement: #ramMax: 10000 - coresMin: 2 + coresMin: 1 run: bowtie.cwl in: readLengthFile: TagLen/tagLength @@ -230,31 +239,31 @@ steps: fastqfile: fastqfile limit_alignments: limit_alignments processors: processors - reference: reference + bowtieindex_1: bowtieindex_1 + bowtieindex_2: bowtieindex_2 + bowtieindex_3: bowtieindex_3 + bowtieindex_4: bowtieindex_4 + bowtieindex_rev_1: bowtieindex_rev_1 + bowtieindex_rev_2: bowtieindex_rev_2 out: [samfile] - scatter: [readLengthFile, fastqfile] - scatterMethod: dotproduct SamView: in: infile: Bowtie/samfile out: [outfile] run: samtools-view.cwl - scatter: infile BamQC: in: infile: SamView/outfile out: [htmlfile, zipfile] run: fastqc.cwl - scatter: infile SamSort: in: infile: SamView/outfile out: [outfile] run: samtools-sort.cwl - scatter: infile BkList: in: @@ -262,49 +271,42 @@ steps: blacklistfile: blacklistfile out: [outfile] run: blacklist.cwl - scatter: infile BkIndex: in: infile: BkList/outfile out: [outfile] run: samtools-index.cwl - scatter: infile SamRMDup: in: infile: BkList/outfile out: [outfile] run: samtools-mkdupr.cwl - scatter: infile SamIndex: in: infile: SamRMDup/outfile out: [outfile] run: samtools-index.cwl - scatter: infile STATbam: in: infile: SamView/outfile out: [outfile] run: samtools-flagstat.cwl - scatter: infile STATrmdup: in: infile: SamRMDup/outfile out: [outfile] run: samtools-flagstat.cwl - scatter: infile STATbk: in: infile: BkList/outfile out: [outfile] run: samtools-flagstat.cwl - scatter: infile # PEAK CALLING & VISUALS MACS-Auto: @@ -320,7 +322,6 @@ steps: single_profile: single_profile out: [ peaksbedfile, peaksxlsfile, summitsfile, wigfile, macsDir ] run: macs1call.cwl - scatter: treatmentfile WIG-Auto: in: @@ -329,8 +330,6 @@ steps: chromsizes: chromsizes out: [ rpmwig, outBW, outtdf ] run: visualization.cwl - scatter: [wigfile, peaksxls] - scatterMethod: dotproduct MACS-All: requirements: @@ -346,7 +345,6 @@ steps: single_profile: single_profile out: [ peaksbedfile, peaksxlsfile, summitsfile, wigfile, macsDir ] run: macs1call.cwl - scatter: treatmentfile WIG-All: in: @@ -355,8 +353,6 @@ steps: chromsizes: chromsizes out: [ rpmwig, outBW, outtdf ] run: visualization.cwl - scatter: [wigfile, peaksxls] - scatterMethod: dotproduct MACS-NM: requirements: @@ -370,7 +366,6 @@ steps: single_profile: single_profile out: [ peaksbedfile, peaksxlsfile, summitsfile, wigfile, macsDir ] run: macs1nm.cwl - scatter: treatmentfile WIG-NM: in: @@ -379,18 +374,16 @@ steps: chromsizes: chromsizes out: [ rpmwig, outBW, outtdf ] run: visualization.cwl - scatter: [wigfile, peaksxls] - scatterMethod: dotproduct # MOTIF analysis MOTIFS: in: - reference: reference + ref_fasta: ref_fasta + ref_fasta_index: ref_fasta_index bedfile: MACS-Auto/peaksbedfile motifdatabases: motifdatabases out: [memechipdir, amedir, bedfasta] - run: motifs.cwl - scatter: bedfile + run: dev-motifs.cwl #SUMMIT-MOTIF analysis FlankBED: @@ -399,16 +392,15 @@ steps: flank: flank out: [outfile] run: flankbed.cwl - scatter: bedfile SummitMOTIFS: in: - reference: reference + ref_fasta: ref_fasta + ref_fasta_index: ref_fasta_index bedfile: FlankBED/outfile motifdatabases: motifdatabases out: [memechipdir, amedir, bedfasta] - run: motifs.cwl - scatter: bedfile + run: dev-motifs.cwl # METAGENE analysis MetaGene: @@ -417,8 +409,7 @@ steps: gtffile: gtffile chromsizes: chromsizes out: [ metagenesDir ] - run: bamtogff.cwl - scatter: bamfile + run: bamtogff-scatter.cwl # SICER broad peaks caller B2Bed: @@ -426,7 +417,6 @@ steps: infile: SamIndex/outfile out: [ outfile ] run: bamtobed.cwl - scatter: infile SICER: requirements: @@ -444,7 +434,6 @@ steps: treatmentbedfile: B2Bed/outfile run: sicer.cwl out: [ sicerDir ] - scatter: treatmentbedfile # ROSE enhancer caller ROSE: @@ -460,9 +449,7 @@ steps: fileA: MACS-All/peaksbedfile fileB: MACS-Auto/peaksbedfile out: [ RoseDir ] - run: roseNC.cwl - scatter: [bamfile, fileA, fileB] - scatterMethod: dotproduct + run: roseNC-scatter.cwl # Quality Control & Statistics Bklist2Bed: @@ -470,7 +457,6 @@ steps: infile: BkIndex/outfile out: [ outfile ] run: bamtobed.cwl - scatter: infile SortBed: requirements: @@ -481,7 +467,6 @@ steps: infile: Bklist2Bed/outfile out: [outfile] run: sortbed.cwl - scatter: infile runSPP: requirements: @@ -492,7 +477,6 @@ steps: infile: BkIndex/outfile out: [spp_out] run: runSPP.cwl - scatter: infile CountIntersectBed: requirements: @@ -504,8 +488,6 @@ steps: bamtobed: SortBed/outfile out: [outfile] run: intersectbed.cwl - scatter: [peaksbed, bamtobed] - scatterMethod: dotproduct PeaksQC: requirements: @@ -525,5 +507,3 @@ steps: rosedir: ROSE/RoseDir out: [ statsfile, htmlfile, textfile ] run: summarystats.cwl - scatter: [fastqmetrics, fastqczip, sppfile, bambed, countsfile, peaksxls, bamflag, rmdupflag, bkflag, rosedir] - scatterMethod: dotproduct diff --git a/cwl/fastqc.cwl b/cwl/fastqc.cwl index 383b11c..bd59338 100755 --- a/cwl/fastqc.cwl +++ b/cwl/fastqc.cwl @@ -4,14 +4,17 @@ baseCommand: [fastqc] class: CommandLineTool label: QC on reads or bam file + hints: DockerRequirement: dockerPull: madetunj/fastqc:v0.11.9 + requirements: - class: InitialWorkDirRequirement listing: [ $(inputs.infile) ] + inputs: infile: type: File @@ -27,6 +30,7 @@ inputs: prefix: '-o' default: './' + outputs: htmlfile: type: File diff --git a/cwl/flankbed.cwl b/cwl/flankbed.cwl index be40207..8e116b5 100755 --- a/cwl/flankbed.cwl +++ b/cwl/flankbed.cwl @@ -2,19 +2,18 @@ cwlVersion: v1.0 baseCommand: [ flanking.pl ] class: CommandLineTool +doc: | + flanking.pl summits.bed 50 > summits-flank50.bed + hints: DockerRequirement: dockerPull: madetunj/seaseq:v0.0.1 -doc: | - flanking.pl summits.bed 50 > summits-flank50.bed - requirements: - class: ShellCommandRequirement - class: InlineJavascriptRequirement - expressionLib: - var var_output_name = function() { if (inputs.bedfile != null) { @@ -22,6 +21,7 @@ requirements: } }; + inputs: flank: type: int? @@ -41,6 +41,7 @@ inputs: label: "Output file name" default: "" + stdout: | ${ if (inputs.outputfile == "") { @@ -50,6 +51,7 @@ stdout: | } } + outputs: outfile: type: stdout diff --git a/cwl/igvtdf.cwl b/cwl/igvtdf.cwl index 5390065..d1c9390 100755 --- a/cwl/igvtdf.cwl +++ b/cwl/igvtdf.cwl @@ -3,20 +3,20 @@ cwlVersion: v1.0 baseCommand: [igvtools, toTDF] #[java, -jar, /research/rgs01/project_space/abrahgrp/Software_Dev_Sandbox/common/madetunj/software/igvtools/igvtools_2.3.2.jar, toTDF] class: CommandLineTool +label: IGVTOOLS - convert to TDF +doc: | + java -jar igvtools/igvtools_2.3.2.jar toTDF hg19 + igvtools toTDF hg19 + hints: DockerRequirement: dockerPull: madetunj/igvtools:v2.8.2 -label: IGVTOOLS - convert to TDF -doc: | - java -jar igvtools/igvtools_2.3.2.jar toTDF hg19 - igvtools toTDF hg19 requirements: - class: ShellCommandRequirement - class: InlineJavascriptRequirement - expressionLib: - var var_output_name = function() { if (inputs.wigfile != null) { @@ -24,6 +24,7 @@ requirements: } }; + inputs: wigfile: label: "Wig file" diff --git a/cwl/intersectbed.cwl b/cwl/intersectbed.cwl index f59c19f..879ede4 100755 --- a/cwl/intersectbed.cwl +++ b/cwl/intersectbed.cwl @@ -2,19 +2,19 @@ cwlVersion: v1.0 baseCommand: [intersectBed] class: CommandLineTool +label: number of overlap of A with B +doc: | + intersectBed -sorted -a -b -c > + hints: DockerRequirement: dockerPull: madetunj/bedtools:v2.25.0 -label: number of overlap of A with B -doc: | - intersectBed -sorted -a -b -c > requirements: - class: ShellCommandRequirement - class: InlineJavascriptRequirement - expressionLib: - var var_output_name = function() { if (inputs.peaksbed != null) { @@ -22,6 +22,7 @@ requirements: } }; + inputs: peaksbed: type: File @@ -58,6 +59,7 @@ inputs: label: "Output file name" default: "" + stdout: | ${ if (inputs.outputfile == "") { @@ -67,6 +69,7 @@ stdout: | } } + outputs: outfile: type: stdout diff --git a/cwl/macs1call.cwl b/cwl/macs1call.cwl index 7724f59..ed4f4ef 100755 --- a/cwl/macs1call.cwl +++ b/cwl/macs1call.cwl @@ -2,14 +2,15 @@ cwlVersion: v1.0 baseCommand: [macs14] class: CommandLineTool +label: MACS1 - Model based Analysis from ChiP-Seq +doc: | + macs14 -t $file.bam -w -S --space=50 -p 1e-9 --keep-dup=auto -n $file\_p9_kd-auto + hints: DockerRequirement: dockerPull: madetunj/macs:v1.4.2 -label: MACS1 - Model based Analysis from ChiP-Seq -doc: | - macs14 -t $file.bam -w -S --space=50 -p 1e-9 --keep-dup=auto -n $file\_p9_kd-auto requirements: - class: ShellCommandRequirement @@ -146,6 +147,7 @@ inputs: } default: "" + outputs: peaksbedfile: type: File diff --git a/cwl/macs1nm.cwl b/cwl/macs1nm.cwl index bc8c97e..1ba6ca0 100755 --- a/cwl/macs1nm.cwl +++ b/cwl/macs1nm.cwl @@ -2,14 +2,15 @@ cwlVersion: v1.0 baseCommand: [macs14] class: CommandLineTool +label: MACS1 - NoModel +doc: | + macs14 -t $file.bam -w -S --shiftsize=100 --space=50 --nomodel -n $file\_nm + hints: DockerRequirement: dockerPull: madetunj/macs:v1.4.2 -label: MACS1 - NoModel -doc: | - macs14 -t $file.bam -w -S --shiftsize=100 --space=50 --nomodel -n $file\_nm requirements: - class: ShellCommandRequirement @@ -39,6 +40,7 @@ requirements: } } }; + inputs: treatmentfile: diff --git a/cwl/meme-chip.cwl b/cwl/meme-chip.cwl index 0169513..a386d72 100755 --- a/cwl/meme-chip.cwl +++ b/cwl/meme-chip.cwl @@ -2,15 +2,16 @@ cwlVersion: v1.0 baseCommand: meme-chip class: CommandLineTool - -hints: - DockerRequirement: - dockerPull: madetunj/memesuite:v5.1.1 - label: MEME-ChIP performs comprehensive motif analysis (including motif discovery) doc: | meme-chip + +hints: + DockerRequirement: + dockerPull: madetunj/memesuite:v5.1.1 + + requirements: - class: InlineJavascriptRequirement expressionLib: @@ -18,6 +19,7 @@ requirements: return 'bklist'+inputs.convertfasta.nameroot.split('bklist').slice(-1)+'-memechip_out'; }; + inputs: convertfasta: label: "BED converted FASTA file" @@ -57,6 +59,7 @@ inputs: } default: "" + outputs: outDir: label: "Output directory" diff --git a/cwl/motifs.cwl b/cwl/motifs.cwl index 2f816cc..8eaea8e 100755 --- a/cwl/motifs.cwl +++ b/cwl/motifs.cwl @@ -2,20 +2,20 @@ cwlVersion: v1.0 class: Workflow + requirements: - class: StepInputExpressionRequirement - class: InlineJavascriptRequirement -inputs: - reference: - type: Directory? - label: "Genome reference directory" +inputs: ref_fasta: type: File? + label: "Genome reference fasta" ref_fasta_index: - type: File? + type: File? + label: "Genome reference fasta fai index" bedfile: type: File @@ -53,6 +53,7 @@ steps: AME: requirements: ResourceRequirement: + ramMax: 10000 coresMin: 1 run: ame.cwl in: @@ -62,7 +63,6 @@ steps: BEDfasta: in: - reference: reference ref_fasta: ref_fasta ref_fasta_index: ref_fasta_index bedfile: bedfile diff --git a/cwl/movealloutput.cwl b/cwl/movealloutput.cwl index 3eb6de8..add0cfc 100755 --- a/cwl/movealloutput.cwl +++ b/cwl/movealloutput.cwl @@ -2,13 +2,14 @@ cwlVersion: v1.0 baseCommand: [ mkdir, -p ] class: CommandLineTool - label: move files + hints: DockerRequirement: dockerPull: madetunj/seaseq:v0.0.1 + requirements: - class: ShellCommandRequirement - class: InlineJavascriptRequirement diff --git a/cwl/normalize.cwl b/cwl/normalize.cwl index 616e966..a81f226 100755 --- a/cwl/normalize.cwl +++ b/cwl/normalize.cwl @@ -2,14 +2,14 @@ cwlVersion: v1.0 class: CommandLineTool baseCommand: [ normalize_WIG_to_RPM.pl ] +doc: | + Normalize peaks wig score per million + hints: DockerRequirement: dockerPull: madetunj/seaseq:v0.0.1 -doc: | - Normalize peaks wig score per million - inputs: wigfile: diff --git a/cwl/roseNC-scatter.cwl b/cwl/roseNC-scatter.cwl index 95a5bdf..413e69d 100755 --- a/cwl/roseNC-scatter.cwl +++ b/cwl/roseNC-scatter.cwl @@ -6,13 +6,16 @@ label: ROSE - calling Enhancers and Super-enhancers doc: | ROSE_call.sh ROSE_out genes hg19 + hints: DockerRequirement: dockerPull: madetunj/rose:v1.2.0 + requirements: - class: InlineJavascriptRequirement + inputs: gtffile: type: File @@ -61,6 +64,7 @@ inputs: inputBinding: position: 7 + outputs: RoseDir: type: Directory diff --git a/cwl/roseNC.cwl b/cwl/roseNC.cwl index ea47457..6c2af89 100755 --- a/cwl/roseNC.cwl +++ b/cwl/roseNC.cwl @@ -6,13 +6,16 @@ label: ROSE - calling Enhancers and Super-enhancers doc: | ROSE_call.sh ROSE_out genes hg19 + hints: DockerRequirement: dockerPull: madetunj/rose:v1.2.0 + requirements: - class: InlineJavascriptRequirement + inputs: gtffile: type: File @@ -61,6 +64,7 @@ inputs: inputBinding: position: 7 + outputs: RoseDir: type: Directory diff --git a/cwl/runSPP.cwl b/cwl/runSPP.cwl index 8b1ee37..02fa0fe 100755 --- a/cwl/runSPP.cwl +++ b/cwl/runSPP.cwl @@ -6,10 +6,12 @@ label: Quality metrics using PhantomPeaksQual tool doc: | run_spp.R -c= -savp -out= + hints: DockerRequirement: dockerPull: madetunj/spp:v1.16.0 + requirements: - class: InlineJavascriptRequirement expressionLib: @@ -19,6 +21,7 @@ requirements: - class: InitialWorkDirRequirement listing: [ $(inputs.infile) ] + inputs: infile: type: File @@ -53,6 +56,7 @@ inputs: } } + outputs: spp_out: type: File diff --git a/cwl/samtools-flagstat.cwl b/cwl/samtools-flagstat.cwl index 0f72caf..2b6cd3d 100755 --- a/cwl/samtools-flagstat.cwl +++ b/cwl/samtools-flagstat.cwl @@ -2,24 +2,25 @@ cwlVersion: v1.0 baseCommand: [samtools, flagstat] class: CommandLineTool +label: SamTools flagstat +doc: | + samtools flagstat $BAM > flagstat.txt + hints: DockerRequirement: dockerPull: madetunj/samtools:v1.9 -label: SamTools flagstat -doc: | - samtools flagstat $BAM > flagstat.txt requirements: - class: ShellCommandRequirement - class: InlineJavascriptRequirement - expressionLib: - var var_output_name = function() { return inputs.infile.nameroot+'-flagstat.txt'; }; + inputs: infile: type: File @@ -32,6 +33,7 @@ inputs: label: "Output file name" default: "" + stdout: | ${ if (inputs.outputfile == "") { @@ -41,6 +43,7 @@ stdout: | } } + outputs: outfile: type: stdout diff --git a/cwl/samtools-index.cwl b/cwl/samtools-index.cwl index 46666a3..956260d 100755 --- a/cwl/samtools-index.cwl +++ b/cwl/samtools-index.cwl @@ -4,14 +4,17 @@ baseCommand: [samtools, index] class: CommandLineTool label: index bam file + hints: DockerRequirement: - dockerPull: madetunj/samtools:v1.9 + dockerPull: madetunj/samtools:v1.9 + requirements: InitialWorkDirRequirement: listing: [ $(inputs.infile) ] + inputs: infile: type: File @@ -20,6 +23,7 @@ inputs: position: 1 valueFrom: $(self.basename) + outputs: outfile: type: File diff --git a/cwl/samtools-mkdupr.cwl b/cwl/samtools-mkdupr.cwl index 128ad1d..79db542 100755 --- a/cwl/samtools-mkdupr.cwl +++ b/cwl/samtools-mkdupr.cwl @@ -4,14 +4,15 @@ baseCommand: [samtools, markdup, -r] class: CommandLineTool label: mark and remove duplicates from bam file + hints: DockerRequirement: - dockerPull: madetunj/samtools:v1.9 + dockerPull: madetunj/samtools:v1.9 + requirements: - class: ShellCommandRequirement - class: InlineJavascriptRequirement - expressionLib: - var var_output_name = function() { if (inputs.infile != null) { @@ -19,6 +20,7 @@ requirements: } }; + inputs: infile: type: File diff --git a/cwl/samtools-sort.cwl b/cwl/samtools-sort.cwl index b63b1b3..6fa98ff 100755 --- a/cwl/samtools-sort.cwl +++ b/cwl/samtools-sort.cwl @@ -4,14 +4,15 @@ baseCommand: [samtools, sort] class: CommandLineTool label: sort bam file + hints: DockerRequirement: - dockerPull: madetunj/samtools:v1.9 + dockerPull: madetunj/samtools:v1.9 + requirements: - class: ShellCommandRequirement - class: InlineJavascriptRequirement - expressionLib: - var var_output_name = function() { if (inputs.infile != null) { @@ -19,6 +20,7 @@ requirements: } }; + inputs: infile: label: "BAM file" @@ -41,6 +43,7 @@ inputs: } default: "" + outputs: outfile: type: File diff --git a/cwl/samtools-view.cwl b/cwl/samtools-view.cwl index 34e186a..1693867 100755 --- a/cwl/samtools-view.cwl +++ b/cwl/samtools-view.cwl @@ -4,14 +4,15 @@ baseCommand: [samtools, view] class: CommandLineTool label: convert sam to bam file + hints: DockerRequirement: - dockerPull: madetunj/samtools:v1.9 + dockerPull: madetunj/samtools:v1.9 + requirements: - class: ShellCommandRequirement - class: InlineJavascriptRequirement - expressionLib: - var var_output_name = function() { if (inputs.infile != null) { @@ -19,6 +20,7 @@ requirements: } }; + inputs: infile: type: File @@ -31,6 +33,7 @@ inputs: type: string? default: "" + stdout: | ${ if (inputs.outputfile == "") { @@ -40,6 +43,7 @@ stdout: | } } + outputs: outfile: type: stdout diff --git a/cwl/seaseq-mapping.cwl b/cwl/seaseq-mapping.cwl deleted file mode 100755 index cfd332e..0000000 --- a/cwl/seaseq-mapping.cwl +++ /dev/null @@ -1,198 +0,0 @@ -#!/usr/bin/env cwl-runner -cwlVersion: v1.0 -class: Workflow - -requirements: - - class: ScatterFeatureRequirement - - class: SubworkflowFeatureRequirement - -inputs: - reference: Directory? - - #individual indexes - bowtieindex_1: File? - bowtieindex_2: File? - bowtieindex_3: File? - bowtieindex_4: File? - bowtieindex_rev_1: File? - bowtieindex_rev_2: File? - ref_fasta: File? - ref_fasta_index: File? - - - fastqfile: File[] - chromsizes: File - blacklistfile: File - best_alignments: boolean? - good_alignments: int? - limit_alignments: int? - processors: int? - -outputs: - sam_sort: - outputSource: SamSort/outfile - type: File[] - - fastq_metrics: - outputSource: BasicMetrics/metrics_out - type: File[] - - rmdup_bam: - outputSource: SamIndex/outfile - type: File[] - - bklist_bam: - outputSource: BkIndex/outfile - type: File[] - - bamqc_html: - outputSource: BamQC/htmlfile - type: File[] - - bamqc_zip: - outputSource: BamQC/zipfile - type: File[] - - readqc_zip: - outputSource: ReadQC/zipfile - type: File[] - - readqc_html: - outputSource: ReadQC/htmlfile - type: File[] - - stat_bk: - outputSource: STATbk/outfile - type: File[] - - stat_bam: - outputSource: STATbam/outfile - type: File[] - - stat_rmdup: - outputSource: STATrmdup/outfile - type: File[] - - -steps: - BasicMetrics: - requirements: - ResourceRequirement: - coresMin: 1 - in: - fastqfile: fastqfile - out: [metrics_out] - run: basicfastqstats.cwl - scatter: fastqfile - - TagLen: - in: - datafile: BasicMetrics/metrics_out - out: [tagLength] - run: taglength.cwl - scatter: datafile - - ReadQC: - in: - infile: fastqfile - out: [htmlfile, zipfile] - run: fastqc.cwl - scatter: infile - - Bowtie: - requirements: - ResourceRequirement: - coresMin: 2 - run: bowtie.cwl - in: - readLengthFile: TagLen/tagLength - best_alignments: best_alignments - good_alignments: good_alignments - fastqfile: fastqfile - limit_alignments: limit_alignments - processors: processors - reference: reference - bowtieindex_1: bowtieindex_1 - bowtieindex_2: bowtieindex_2 - bowtieindex_3: bowtieindex_3 - bowtieindex_4: bowtieindex_4 - bowtieindex_rev_1: bowtieindex_rev_1 - bowtieindex_rev_2: bowtieindex_rev_2 - out: [samfile] - scatter: [readLengthFile, fastqfile] - scatterMethod: dotproduct - - SamView: - in: - infile: Bowtie/samfile - out: [outfile] - run: samtools-view.cwl - scatter: infile - - BamQC: - in: - infile: SamView/outfile - out: [htmlfile, zipfile] - run: fastqc.cwl - scatter: infile - - SamSort: - in: - infile: SamView/outfile - out: [outfile] - run: samtools-sort.cwl - scatter: infile - - BkList: - in: - infile: SamSort/outfile - blacklistfile: blacklistfile - out: [outfile] - run: blacklist.cwl - scatter: infile - - BkIndex: - in: - infile: BkList/outfile - out: [outfile] - run: samtools-index.cwl - scatter: infile - - SamRMDup: - in: - infile: BkList/outfile - out: [outfile] - run: samtools-mkdupr.cwl - scatter: infile - - SamIndex: - in: - infile: SamRMDup/outfile - out: [outfile] - run: samtools-index.cwl - scatter: infile - - STATbam: - in: - infile: SamView/outfile - out: [outfile] - run: samtools-flagstat.cwl - scatter: infile - - STATrmdup: - in: - infile: SamRMDup/outfile - out: [outfile] - run: samtools-flagstat.cwl - scatter: infile - - STATbk: - in: - infile: BkList/outfile - out: [outfile] - run: samtools-flagstat.cwl - scatter: infile - - -doc: | - Runs ChIP-Seq SE Mapping FastQ SE files to generate BAM file for step 2 in ChIP-Seq Pipeline. diff --git a/cwl/seaseq_pipeline.cwl b/cwl/seaseq_pipeline.cwl index 7f608c7..313568a 100755 --- a/cwl/seaseq_pipeline.cwl +++ b/cwl/seaseq_pipeline.cwl @@ -9,14 +9,14 @@ doc: | enhancers & super-enhancers using ROSE, bam density plots using BAM2GFF. + requirements: - class: SubworkflowFeatureRequirement + inputs: # main files & directorys - reference: Directory? - - #individual indexes + #reference + individual indexes bowtieindex_1: File? bowtieindex_2: File? bowtieindex_3: File? @@ -63,6 +63,7 @@ inputs: # ROSE feature: string? + outputs: sam_sort: outputSource: SamSort/outfile @@ -201,6 +202,7 @@ outputs: type: File outputSource: PeaksQC/textfile + steps: BasicMetrics: requirements: @@ -237,7 +239,6 @@ steps: fastqfile: fastqfile limit_alignments: limit_alignments processors: processors - reference: reference bowtieindex_1: bowtieindex_1 bowtieindex_2: bowtieindex_2 bowtieindex_3: bowtieindex_3 @@ -377,7 +378,6 @@ steps: # MOTIF analysis MOTIFS: in: - reference: reference ref_fasta: ref_fasta ref_fasta_index: ref_fasta_index bedfile: MACS-Auto/peaksbedfile @@ -395,7 +395,6 @@ steps: SummitMOTIFS: in: - reference: reference ref_fasta: ref_fasta ref_fasta_index: ref_fasta_index bedfile: FlankBED/outfile diff --git a/cwl/seaseq_pipeline_scatter.cwl b/cwl/seaseq_pipeline_scatter.cwl index d39a748..b77997a 100755 --- a/cwl/seaseq_pipeline_scatter.cwl +++ b/cwl/seaseq_pipeline_scatter.cwl @@ -9,15 +9,15 @@ doc: | enhancers & super-enhancers using ROSE, bam density plots using BAM2GFF. + requirements: - class: SubworkflowFeatureRequirement - class: ScatterFeatureRequirement + inputs: # main files & directorys - reference: Directory? - - #individual indexes + #reference + individual indexes bowtieindex_1: File? bowtieindex_2: File? bowtieindex_3: File? @@ -26,7 +26,6 @@ inputs: bowtieindex_rev_2: File? ref_fasta: File? ref_fasta_index: File? - gtffile: File fastqfile: File[] chromsizes: File @@ -64,12 +63,14 @@ inputs: # ROSE feature: string? + outputs: finalDir: type: Directory[] label: "output directory of the analysis result for each fastqfile" outputSource: MoveFiles/finalDir + steps: BasicMetrics: requirements: @@ -109,7 +110,6 @@ steps: fastqfile: fastqfile limit_alignments: limit_alignments processors: processors - reference: reference bowtieindex_1: bowtieindex_1 bowtieindex_2: bowtieindex_2 bowtieindex_3: bowtieindex_3 @@ -270,7 +270,6 @@ steps: # MOTIF analysis MOTIFS: in: - reference: reference ref_fasta: ref_fasta ref_fasta_index: ref_fasta_index bedfile: MACS-Auto/peaksbedfile @@ -290,7 +289,6 @@ steps: SummitMOTIFS: in: - reference: reference ref_fasta: ref_fasta ref_fasta_index: ref_fasta_index bedfile: FlankBED/outfile diff --git a/cwl/sicer.cwl b/cwl/sicer.cwl index fda89fa..21a8287 100755 --- a/cwl/sicer.cwl +++ b/cwl/sicer.cwl @@ -2,14 +2,15 @@ cwlVersion: v1.0 baseCommand: [ sicer ] class: CommandLineTool +label: SICER new version - Broad Peaks +doc: | + sicer -t 20190628_KOPTK1-DMSO-MYBL2_AD7124_S12.sorted.bklist.rmdup.bam2bed.bed -s hg19 -egf 0.86 -g 200 -e 100 + hints: DockerRequirement: - dockerPull: madetunj/sicer:v1.0.2 + dockerPull: madetunj/sicer:v1.0.2 -label: SICER new version - Broad Peaks -doc: | - sicer -t 20190628_KOPTK1-DMSO-MYBL2_AD7124_S12.sorted.bklist.rmdup.bam2bed.bed -s hg19 -egf 0.86 -g 200 -e 100 requirements: - class: ShellCommandRequirement @@ -17,6 +18,7 @@ requirements: - class: InitialWorkDirRequirement listing: [ $(inputs.treatmentbedfile) ] + inputs: treatmentbedfile: type: File @@ -117,6 +119,7 @@ inputs: prefix: '" && mkdir -p $nameoffolder && mv *W200* $nameoffolder' default: true + outputs: sicerDir: type: Directory diff --git a/cwl/sicerRB.cwl b/cwl/sicerRB.cwl deleted file mode 100755 index 6e35aa5..0000000 --- a/cwl/sicerRB.cwl +++ /dev/null @@ -1,125 +0,0 @@ -#!/usr/bin/env cwl-runner -cwlVersion: v1.0 -baseCommand: [SICER-rb_custom.sh] -class: CommandLineTool - -label: SICER - Broad Peaks -doc: | - bsub -K -R \"select[rhel7]\" ~/.software/SICER_V1.1/SICER/SICER-rb.sh ./ sicer hg19 1 200 150 0.86 0 100 >> $outfile - [InputDir] [bed file] [OutputDir] [species] [redundancy threshold] [window size (bp)] [fragment size] [effective genome fraction] [gap size (bp)] [E-value] - mkdir sicer5; ~/.software/SICER_V1.1/SICER/SICER-rb.sh ./ KOPTK1_DMSO.bam2bed.bed sicer5 hg19 1 200 150 0.86 200 100 - -requirements: -- class: ShellCommandRequirement -- class: InlineJavascriptRequirement -- class: InitialWorkDirRequirement - listing: [ $(inputs.treatmentbedfile) ] - -inputs: - inputdir: - type: string? - label: "input files directory" - default: "./" - inputBinding: - position: 1 - - treatmentbedfile: - type: File - label: "BED file" - inputBinding: - position: 2 - valueFrom: $(self.basename) - - outputdir: - type: string? - label: "Output directory" - default: "./" - inputBinding: - position: 3 - - species: - type: string? - label: "Genome name" - default: "hg19" - inputBinding: - position: 4 - - redundancy: - type: int? - label: "Number of identical reads allowed" - default: 1 - inputBinding: - position: 5 - - window: - type: int? - label: "Resolution of SICER" - default: 200 - inputBinding: - position: 6 - - fragment_size: - type: int? - label: "Fragment shift size" - default: 150 - inputBinding: - position: 7 - - genome_fraction: - type: double? - label: "Effective Genome Fraction" - default: 0.86 - inputBinding: - position: 8 - - gapsize: - type: int? - label: "Gap size" - default: 200 - inputBinding: - position: 9 - - evalue: - type: int? - label: "E-value" - default: 100 - inputBinding: - position: 10 - - gzip_graph: - type: boolean? - label: "GZIP wig files" - inputBinding: - position: 998 - shellQuote: false - prefix: '&& gzip *graph' - default: true - - outputfolder: - type: string? - label: "Output directory name" - inputBinding: - position: 999 - shellQuote: false - separate: false - prefix: ' && nameoffolder="' - default: "SICER_out" - - verifymove: - type: boolean? - label: "Move files to new directory" - inputBinding: - position: 1000 - shellQuote: false - prefix: '" && mkdir -p $nameoffolder && mv *W200* $nameoffolder' - default: true - -outputs: - sicerDir: - type: Directory - label: "Output directory" - outputBinding: - glob: | - ${ - return inputs.outputfolder; - } diff --git a/cwl/sortbed.cwl b/cwl/sortbed.cwl index 43cecf5..f09085e 100755 --- a/cwl/sortbed.cwl +++ b/cwl/sortbed.cwl @@ -2,19 +2,19 @@ cwlVersion: v1.0 baseCommand: [sort-bed] class: CommandLineTool +label: Using bedops to sort bed file +doc: | + sort-bed > + hints: DockerRequirement: dockerPull: madetunj/bedops:v2.4.37 -label: Using bedops to sort bed file -doc: | - sort-bed > requirements: - class: ShellCommandRequirement - class: InlineJavascriptRequirement - expressionLib: - var var_output_name = function() { if (inputs.infile != null) { @@ -22,6 +22,7 @@ requirements: } }; + inputs: infile: type: File @@ -34,6 +35,7 @@ inputs: label: "sorted BED output file name" default: "" + stdout: | ${ if (inputs.outputfile == "") { @@ -43,6 +45,7 @@ stdout: | } } + outputs: outfile: type: stdout diff --git a/cwl/summarystats.cwl b/cwl/summarystats.cwl index e58fd77..44fb28f 100755 --- a/cwl/summarystats.cwl +++ b/cwl/summarystats.cwl @@ -2,20 +2,19 @@ cwlVersion: v1.0 baseCommand: [ summaryfacts.pl ] class: CommandLineTool +label: QC on the peaks file +doc: | + perl summaryfacts.pl -b -p -bamflag -rmdupflag -bkflag -fqc -outfile hints: DockerRequirement: dockerPull: madetunj/seaseq:v0.0.1 -label: QC on the peaks file -doc: | - perl summaryfacts.pl -b -p -bamflag -rmdupflag -bkflag -fqc -outfile requirements: - class: ShellCommandRequirement - class: InlineJavascriptRequirement - expressionLib: - var var_output_name = function() { if (inputs.outfile == ""){ diff --git a/cwl/taglength.cwl b/cwl/taglength.cwl index ed31cc5..1487016 100755 --- a/cwl/taglength.cwl +++ b/cwl/taglength.cwl @@ -3,6 +3,7 @@ cwlVersion: v1.0 baseCommand: [tagLength.sh] class: CommandLineTool + hints: DockerRequirement: dockerPull: madetunj/seaseq:v0.0.1 @@ -14,6 +15,7 @@ inputs: inputBinding: position: 1 + outputs: tagLength: type: File diff --git a/cwl/testinglist.cwl b/cwl/testinglist.cwl deleted file mode 100755 index d5f8f13..0000000 --- a/cwl/testinglist.cwl +++ /dev/null @@ -1,251 +0,0 @@ -#!/usr/bin/env cwl-runner -cwlVersion: v1.0 -class: Workflow - -requirements: - - class: ScatterFeatureRequirement - - class: SubworkflowFeatureRequirement - -inputs: - reference: Directory? - - #individual indexes - bowtieindex_1: File? - bowtieindex_2: File? - bowtieindex_3: File? - bowtieindex_4: File? - bowtieindex_rev_1: File? - bowtieindex_rev_2: File? - ref_fasta: File? - ref_fasta_index: File? - - - gtffile: File - fastqfile: File[] - chromsizes: File - blacklistfile: File - motifdatabases: File[] - - best_alignments: boolean? - good_alignments: int? - limit_alignments: int? - processors: int? - - # MACS - nomodel: boolean? - wiggle: boolean? - single_profile: boolean? - shiftsize: int? - space: int? - pvalue: string? - keep_dup: string? - flank: int? - -outputs: - sam_sort: - outputSource: SamSort/outfile - type: File[] - - fastq_metrics: - outputSource: BasicMetrics/metrics_out - type: File[] - - rmdup_bam: - outputSource: SamIndex/outfile - type: File[] - - bklist_bam: - outputSource: BkIndex/outfile - type: File[] - - bamqc_html: - outputSource: BamQC/htmlfile - type: File[] - - bamqc_zip: - outputSource: BamQC/zipfile - type: File[] - - readqc_zip: - outputSource: ReadQC/zipfile - type: File[] - - readqc_html: - outputSource: ReadQC/htmlfile - type: File[] - - stat_bk: - outputSource: STATbk/outfile - type: File[] - - stat_bam: - outputSource: STATbam/outfile - type: File[] - - stat_rmdup: - outputSource: STATrmdup/outfile - type: File[] - -# MACS-AUTO - macsDir: - type: Directory[] - outputSource: MACS-Auto/macsDir - -# MOTIFs & Summits output - bedfasta: - type: File[] - outputSource: MOTIFS/bedfasta - - memechipdir: - type: Directory[] - outputSource: MOTIFS/memechipdir - - amedir: - type: Directory[] - outputSource: MOTIFS/amedir - -steps: - BasicMetrics: - requirements: - ResourceRequirement: - coresMin: 1 - in: - fastqfile: fastqfile - out: [metrics_out] - run: basicfastqstats.cwl - scatter: fastqfile - - TagLen: - in: - datafile: BasicMetrics/metrics_out - out: [tagLength] - run: taglength.cwl - scatter: datafile - - ReadQC: - in: - infile: fastqfile - out: [htmlfile, zipfile] - run: fastqc.cwl - scatter: infile - - Bowtie: - requirements: - ResourceRequirement: - coresMin: 2 - run: bowtie.cwl - in: - readLengthFile: TagLen/tagLength - best_alignments: best_alignments - good_alignments: good_alignments - fastqfile: fastqfile - limit_alignments: limit_alignments - processors: processors - reference: reference - bowtieindex_1: bowtieindex_1 - bowtieindex_2: bowtieindex_2 - bowtieindex_3: bowtieindex_3 - bowtieindex_4: bowtieindex_4 - bowtieindex_rev_1: bowtieindex_rev_1 - bowtieindex_rev_2: bowtieindex_rev_2 - out: [samfile] - scatter: [readLengthFile, fastqfile] - scatterMethod: dotproduct - - SamView: - in: - infile: Bowtie/samfile - out: [outfile] - run: samtools-view.cwl - scatter: infile - - BamQC: - in: - infile: SamView/outfile - out: [htmlfile, zipfile] - run: fastqc.cwl - scatter: infile - - SamSort: - in: - infile: SamView/outfile - out: [outfile] - run: samtools-sort.cwl - scatter: infile - - BkList: - in: - infile: SamSort/outfile - blacklistfile: blacklistfile - out: [outfile] - run: blacklist.cwl - scatter: infile - - BkIndex: - in: - infile: BkList/outfile - out: [outfile] - run: samtools-index.cwl - scatter: infile - - SamRMDup: - in: - infile: BkList/outfile - out: [outfile] - run: samtools-mkdupr.cwl - scatter: infile - - SamIndex: - in: - infile: SamRMDup/outfile - out: [outfile] - run: samtools-index.cwl - scatter: infile - - STATbam: - in: - infile: SamView/outfile - out: [outfile] - run: samtools-flagstat.cwl - scatter: infile - - STATrmdup: - in: - infile: SamRMDup/outfile - out: [outfile] - run: samtools-flagstat.cwl - scatter: infile - - STATbk: - in: - infile: BkList/outfile - out: [outfile] - run: samtools-flagstat.cwl - scatter: infile - -# PEAK CALLING & VISUALS - MACS-Auto: - requirements: - ResourceRequirement: - coresMin: 1 - in: - treatmentfile: BkIndex/outfile - space: space - pvalue: pvalue - wiggle: wiggle - single_profile: single_profile - out: [ peaksbedfile, peaksxlsfile, summitsfile, wigfile, macsDir ] - run: macs1call.cwl - scatter: treatmentfile - -# MOTIF analysis - MOTIFS: - in: - reference: reference - ref_fasta: ref_fasta - ref_fasta_index: ref_fasta_index - bedfile: MACS-Auto/peaksbedfile - motifdatabases: motifdatabases - out: [memechipdir, amedir, bedfasta] - run: motifs.cwl - scatter: bedfile diff --git a/cwl/visualization.cwl b/cwl/visualization.cwl index 8f92a16..6f71076 100755 --- a/cwl/visualization.cwl +++ b/cwl/visualization.cwl @@ -1,13 +1,14 @@ #!/usr/bin/env cwl-runner cwlVersion: v1.0 class: Workflow - doc: | Create visualization files: TDF for IGV and BigWig for UCSC + requirements: - class: SubworkflowFeatureRequirement + inputs: chromsizes: type: File diff --git a/cwl/wigtobigwig.cwl b/cwl/wigtobigwig.cwl index 893475f..1281728 100755 --- a/cwl/wigtobigwig.cwl +++ b/cwl/wigtobigwig.cwl @@ -4,14 +4,15 @@ baseCommand: [wigToBigWig, -clip] class: CommandLineTool label: convert ascii format wig file to binary big wig format + hints: DockerRequirement: dockerPull: madetunj/wigtobigwig:v4 + requirements: - class: ShellCommandRequirement - class: InlineJavascriptRequirement - expressionLib: - var var_output_name = function() { if (inputs.infile != null) { @@ -19,6 +20,7 @@ requirements: } }; + inputs: infile: type: File @@ -47,6 +49,7 @@ inputs: } default: "" + outputs: outfile: type: File diff --git a/exec-seaseq_wrap.sh b/exec-seaseq_wrap.sh deleted file mode 100755 index 9365cbf..0000000 --- a/exec-seaseq_wrap.sh +++ /dev/null @@ -1,106 +0,0 @@ -#!/usr/bin/bash -echo 'CWLEXEC does not have the no-docker option' -exit; -# seaseq_wrap.sh -# ====== README -# This is the seaseq wrapper script written for -# St. Jude, Abraham's Lab. -# This script works with St. Jude, HPC LSF cluster. -# ------ -# To Run on St. Jude LSF. -# bsub -P watcher -q compbio -J ss-Exec -o ss-Exec-out -e ss-Exec-err -N ./seaseq_wrap.sh -# bsub -P watcher -q compbio -J ss-Exec -o ss-Exec-out -e ss-Exec-err -N ./seaseq_wrap.sh inputparameters.yml OUTPUTFOLDER -# ------ -# Programs and versions used -# bowtie v. 1.2.2 -# fastqc v. 0.11.5 -# samtools v. 1.9 -# R v. 3.6.1 -# macs v. 041014 -# SICER2 v. 1.0.2 -# meme v. 4.11.2 -# spp v. 1.16.0 -# bedtools/2.25.0 -# python v. 3.7.0 -# java v. 1.8.0_60 -# perl v. 5.10.1 -# wigToBigWig v. 4 -# bedops v. 2.4.2 -# igvtools v. 2.3.2 -# ROSE v. 1.1.0 -# BAM2GFF v. 1.1.0 -# ------ -# Args: -# seaseqroot : PATH to workflow location -# inputyml : input yaml containing all required variables -# outputfolder : final output directory -# ====== - -# ====== VARIABLES -# Required Args -# ------ -if [ $# -lt 2 ]; then - echo "" - echo 1>&2 Usage: $0 ["YML"] ["OUTPUT FOLDER"] - echo "" - exit 1 -fi -actualpath=$(realpath $0) -seaseqroot=${actualpath%/*} -inputyml=$1 -outputfolder=$2 -# ------ -# Permanent Args -# ------ -seaseqworkflow="$seaseqroot/cwl/seaseq_pipeline.cwl" -NEW_UUID=${NEW_UUID:=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 5 | head -n 1)"_"`date +%s`} #temporary file for the 2nd step - -out="$(pwd)/seaseq-"$NEW_UUID"-outdir" -tmp="$(pwd)/seaseq-"$NEW_UUID"-tmpdir" -jobstore="seaseq-"$NEW_UUID"-jobstore" -logtxt="seaseq-"$NEW_UUID"-log.txt" -logout="seaseq-"$NEW_UUID"-log_out" -logerr="seaseq-"$NEW_UUID"-log_err" - -export PATH=$PATH:$seaseqroot/bin -# ------ -# Loading St. Jude HPC cluster programs -# ------ -source $seaseqroot/sjhpc_modules.ml - -# ====== - -# ====== WORKFLOW EXECUTION -# CWLEXEC Workflow Execution on St. Jude HPC Cluster -# ------ -echo "STATUS: Temporary files named with $NEW_UUID" - -mkdir -p $tmp $out -rm -rf $jobstore $logtxt - -config="$seaseqroot/LSFconfig.json" -cwlexec -p -w $tmp -o $out -c $config -p $seaseqworkflow $inputyml 1>$logout 2>$logerr - -# ------ -# Extract and Clean Up output files. -# Relevant files are moved to indicated "$outputfolder" -# Remove all temporary files. -# ------ -if [ -s $logout ] -then - - ##extracting relevant files from 1st step to the next step & to outputfolder - OUTPUTFOLDER=$(chromatinSEreadjson.pl -i $logout -s 1) - chromatinSEreadjson.pl -i $logout -s 2 -f $OUTPUTFOLDER - - #rm -rf *$NEW_UUID* - mkdir -p $outputfolder - mv $OUTPUTFOLDER $outputfolder - - echo "STATUS: Cleaned Up All files with $NEW_UUID" - echo "SUCCESS: CHIPSEQ - SE Pipeline Completed" -else - echo "ERROR: ChipSeq-ALL workflow terminated with errors" -fi - -# ====== diff --git a/seaseq_wrap.sh b/seaseq_wrap.sh deleted file mode 100755 index 63cb376..0000000 --- a/seaseq_wrap.sh +++ /dev/null @@ -1,112 +0,0 @@ -#!/usr/bin/bash -# seaseq_wrap.sh -# ====== README -# This is the seaseq wrapper script written for -# St. Jude, Abraham's Lab. -# This script works with St. Jude, HPC LSF cluster. -# ------ -# To Run on St. Jude LSF. -# bsub -P watcher -q compbio -J seaseq -o seaseq-out -e seaseq-err -N ./seaseq_wrap.sh -# bsub -P watcher -q compbio -J seaseq -o seaseq-out -e seaseq-err -N ./seaseq_wrap.sh inputparameters.yml OUTPUTFOLDER -# ------ -# Programs and versions used -# bowtie v. 1.2.2 -# fastqc v. 0.11.5 -# samtools v. 1.9 -# R v. 3.6.1 -# macs v. 041014 -# SICER2 v. 1.0.2 -# meme v. 4.11.2 -# spp v. 1.16.0 -# bedtools/2.25.0 -# python v. 3.7.0 -# java v. 1.8.0_60 -# perl v. 5.10.1 -# wigToBigWig v. 4 -# bedops v. 2.4.2 -# igvtools v. 2.3.2 -# ROSE v. 1.1.0 -# BAM2GFF v. 1.1.0 -# ------ -# Args: -# seaseqroot : PATH to workflow location -# inputyml : input yaml containing all required variables -# outputfolder : final output directory -# ====== - -# ====== VARIABLES -# Required Args -# ------ -if [ $# -lt 2 ]; then - echo "" - echo 1>&2 Usage: $0 ["YML"] ["OUTPUT FOLDER"] - echo "" - exit 1 -fi -actualpath=$(realpath $0) -seaseqroot=${actualpath%/*} -inputyml=$1 -outputfolder=$2 -# ------ -# Permanent Args -# ------ -seaseqworkflow="$seaseqroot/cwl/seaseq_pipeline.cwl" -NEW_UUID=${NEW_UUID:=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 5 | head -n 1)"_"`date +%s`} #temporary file for the 2nd step - -out="$(pwd)/seaseq-"$NEW_UUID"-outdir" -tmp="$(pwd)/seaseq-"$NEW_UUID"-tmpdir" -jobstore="seaseq-"$NEW_UUID"-jobstore" -logtxt="seaseq-"$NEW_UUID"-log.txt" -logout="seaseq-"$NEW_UUID"-log_out" -logerr="seaseq-"$NEW_UUID"-log_err" - -export PATH=$PATH:$seaseqroot/bin -# ------ -# Loading St. Jude HPC cluster programs -# ------ -source $seaseqroot/sjhpc_modules.ml - -# ====== - -# ====== WORKFLOW EXECUTION -# Toil Workflow Execution on St. Jude HPC Cluster -# ------ -echo "STATUS: Temporary files named with $NEW_UUID" - -mkdir -p $tmp $out -rm -rf $jobstore $logtxt - -toil-cwl-runner --batchSystem=lsf \ ---no-container \ ---preserve-entire-environment \ ---disableCaching \ ---logFile $logtxt \ ---jobStore $jobstore \ ---clean never \ ---workDir $tmp \ ---cleanWorkDir never \ ---outdir $out \ -$seaseqworkflow $inputyml 1>$logout 2>$logerr -# ------ -# Extract and Clean Up output files. -# Relevant files are moved to indicated "$outputfolder" -# Remove all temporary files. -# ------ -if [ -s $logout ] -then - - ##extracting relevant files from 1st step to the next step & to outputfolder - OUTPUTFOLDER=$(chromatinSEreadjson.pl -i $logout -s 1 -toil) - chromatinSEreadjson.pl -i $logout -s 2 -f $OUTPUTFOLDER -toil - - #rm -rf *$NEW_UUID* - mkdir -p $outputfolder - mv $OUTPUTFOLDER $outputfolder - - echo "STATUS: Cleaned Up All files with $NEW_UUID" - echo "SUCCESS: CHIPSEQ - SE Pipeline Completed" -else - echo "ERROR: ChipSeq-ALL workflow terminated with errors" -fi - -# ====== diff --git a/seaseq_wrap_scatter.sh b/seaseq_wrap_scatter.sh deleted file mode 100755 index 56f527f..0000000 --- a/seaseq_wrap_scatter.sh +++ /dev/null @@ -1,107 +0,0 @@ -#!/usr/bin/bash -# seaseq_wrap.sh - -# ====== README -# This is the seaseq wrapper script written for -# St. Jude, Abraham's Lab. -# This script works with St. Jude, HPC LSF cluster. -# ------ -# To Run on St. Jude LSF. -# bsub -P watcher -q compbio -J seaseq -o seaseq-out -e seaseq-err -N ./seaseq_wrap.sh -# bsub -P watcher -q compbio -J seaseq -o seaseq-out -e seaseq-err -N ./seaseq_wrap.sh inputparameters.yml OUTPUTFOLDER -# ------ -# Programs and versions used -# bowtie v. 1.2.2 -# fastqc v. 0.11.5 -# samtools v. 1.9 -# R v. 3.6.1 -# macs v. 041014 -# SICER2 v. 1.0.2 -# meme v. 4.11.2 -# spp v. 1.16.0 -# bedtools/2.25.0 -# python v. 3.7.0 -# java v. 1.8.0_60 -# perl v. 5.10.1 -# wigToBigWig v. 4 -# bedops v. 2.4.2 -# igvtools v. 2.3.2 -# ROSE v. 1.1.0 -# BAM2GFF v. 1.1.0 -# ------ -# Args: -# seaseqroot : PATH to workflow location -# inputyml : input yaml containing all required variables -# outputfolder : final output directory -# ====== - -# ====== VARIABLES -# Required Args -# ------ -if [ $# -lt 2 ]; then - echo "" - echo 1>&2 Usage: $0 ["YML"] ["OUTPUT FOLDER"] - echo "" - exit 1 -fi - -actualpath=$(realpath $0) -seaseqroot=${actualpath%/*} -inputyml=$1 -outputfolder=$2 -# ------ -# Permanent Args -# ------ -seaseqworkflow="$seaseqroot/cwl/seaseq_pipeline_scatter.cwl" -NEW_UUID=${NEW_UUID:=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 5 | head -n 1)"_"`date +%s`} #temporary file for the 2nd step - -out="$(pwd)/seaseq-"$NEW_UUID"-outdir" -tmp="$(pwd)/seaseq-"$NEW_UUID"-tmpdir" -jobstore="seaseq-"$NEW_UUID"-jobstore" -logtxt="seaseq-"$NEW_UUID"-log.txt" -logout="seaseq-"$NEW_UUID"-log_out" -logerr="seaseq-"$NEW_UUID"-log_err" - -export PATH=$PATH:$seaseqroot/bin -# ------ -# Loading St. Jude HPC cluster programs -# ------ -source $seaseqroot/sjhpc_modules.ml - -# ====== - -# ====== WORKFLOW EXECUTION -# Toil Workflow Execution on St. Jude HPC Cluster -# ------ -echo "STATUS: Temporary files named with $NEW_UUID" - -mkdir -p $tmp $out -rm -rf $jobstore $logtxt - -toil-cwl-runner --batchSystem=lsf \ ---no-container \ ---preserve-entire-environment \ ---disableCaching \ ---logFile $logtxt \ ---jobStore $jobstore \ ---clean never \ ---workDir $tmp \ ---cleanWorkDir never \ ---outdir $out \ -$seaseqworkflow $inputyml 1>$logout 2>$logerr -# ------ -# Extract and Clean Up output files. -# Relevant files are moved to indicated "$outputfolder" -# Remove all temporary files. -# ------ -if [ -s $logout ] -then - reorganize.sh $out $outputfolder - echo "STATUS: Results stored in $outputfolder" -# rm -rf *$NEW_UUID* - echo "STATUS: Cleaned Up All files with $NEW_UUID" - echo "SUCCESS: CHIPSEQ - SE Pipeline Completed" -else - echo "ERROR: ChipSeq-ALL workflow terminated with errors" -fi -# ====== diff --git a/sjhpc_modules.ml b/sjhpc_modules.ml deleted file mode 100755 index 7d38431..0000000 --- a/sjhpc_modules.ml +++ /dev/null @@ -1,22 +0,0 @@ -# ====== -# Needed Modules on St. Jude HPC LSF cluster -# ------ - -module load node -module load toil #spack -module load igvtools/2.3.2 -module load fastqc/0.11.5 -module load bowtie/1.2.2 -module load macs/041014 -module load ucsc/041619 -module load bedtools/2.25.0 -module load meme/4.11.2 -module load bedops/2.4.2 -module load java/1.8.0_60 -module load BAM2GFF/1.1.0 #spack -module load ROSE/1.1.0 #spack -module load SICER2/1.0.1 #spack -module load samtools/1.9 -module load R/3.6.1 - -# ====== diff --git a/test/cmd_seaseq.sh b/test/cmd_seaseq.sh new file mode 100755 index 0000000..c516447 --- /dev/null +++ b/test/cmd_seaseq.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +tmp="$(pwd)/tmpdir" +out="$(pwd)/outdir" + +#mkdir -p $tmp $out + +cwltool \ +--parallel \ +--preserve-entire-environment \ +--copy-outputs \ +--outdir $out \ +../cwl/dev-seaseq_pipeline.cwl inputyml.yml diff --git a/test/cmd_seaseq_mapping.sh b/test/cmd_seaseq_mapping.sh deleted file mode 100755 index 8991eab..0000000 --- a/test/cmd_seaseq_mapping.sh +++ /dev/null @@ -1,12 +0,0 @@ -seaseqworkflow="../cwl/seaseq-mapping.cwl" -out="$(pwd)/seaseq-outdir" -tmp="$(pwd)/seaseq-tmpdir" -jobstore="seaseq-jobstore" -logtxt="seaseq-log.txt" -logout="seaseq-log_out" -logerr="seaseq-log_err" -inputyml="inputyml.yml" - -cwltool \ -$seaseqworkflow $inputyml -#1>$logout 2>$logerr diff --git a/test/exec-run_seaseqtest.sh b/test/exec-run_seaseqtest.sh deleted file mode 100755 index 1229e3a..0000000 --- a/test/exec-run_seaseqtest.sh +++ /dev/null @@ -1 +0,0 @@ -bsub -P watcher -q compbio -J seaseqexec -o seaseqexec-out -e seaseqexec-err -N ../exec-seaseq_wrap.sh inputyml.yml EXECSEASEQ diff --git a/test/inputyml.yml b/test/inputyml.yml index 1cc1189..b16022c 100755 --- a/test/inputyml.yml +++ b/test/inputyml.yml @@ -1,10 +1,6 @@ #Files and Directories #not scatter -#reference: -# class: Directory -# location: ./hg19/CHR21INDEX - bowtieindex_1: class: File location: ./hg19/CHR21INDEX/hg19_chr21.1.ebwt @@ -59,3 +55,4 @@ motifdatabases: - { class: File, path: ./hg19/motifs/JASPAR2018_CORE_vertebrates_redundant.meme } - { class: File, path: ./hg19/motifs/CIS-BP.Homo_sapiens.meme } + diff --git a/test/inputymlscatter.yml b/test/inputymlscatter.yml deleted file mode 100755 index 6aea902..0000000 --- a/test/inputymlscatter.yml +++ /dev/null @@ -1,60 +0,0 @@ -#Files and Directories - -#reference: -# class: Directory -# location: ./hg19/CHR21INDEX - -bowtieindex_1: - class: File - location: ./hg19/CHR21INDEX/hg19_chr21.1.ebwt - -bowtieindex_2: - class: File - location: ./hg19/CHR21INDEX/hg19_chr21.2.ebwt - -bowtieindex_3: - class: File - location: ./hg19/CHR21INDEX/hg19_chr21.3.ebwt - -bowtieindex_4: - class: File - location: ./hg19/CHR21INDEX/hg19_chr21.4.ebwt - -bowtieindex_rev_1: - class: File - location: ./hg19/CHR21INDEX/hg19_chr21.rev.1.ebwt - -bowtieindex_rev_2: - class: File - location: ./hg19/CHR21INDEX/hg19_chr21.rev.2.ebwt - -ref_fasta: - class: File - location: ./hg19/CHR21INDEX/hg19_chr21.fa - -ref_fasta_index: - class: File - location: ./hg19/CHR21INDEX/hg19_chr21.fa.fai - -fastqfile: - - { class: File, path: ./fastqfiles/H3K27Ac-AB5_R1_001.fastq.gz } - - { class: File, path: ./fastqfiles/H3K27me3-AB4_R1_001.fastq.gz } - -keep_dup: all - -chromsizes: - class: File - path: ./hg19/UCSC_hg19_chromInfo_chr21.tab - -blacklistfile: - class: File - path: ./hg19/hg19-blacklist.v2_chr21.bed - -gtffile: - class: File - path: ./hg19/GRCh37_latest_genomic_chr21.gtf - -motifdatabases: - - { class: File, path: ./hg19/motifs/JASPAR2018_CORE_vertebrates_redundant.meme } - - { class: File, path: ./hg19/motifs/CIS-BP.Homo_sapiens.meme } - diff --git a/test/run_seaseq_scatter_test.sh b/test/run_seaseq_scatter_test.sh deleted file mode 100755 index 234063f..0000000 --- a/test/run_seaseq_scatter_test.sh +++ /dev/null @@ -1 +0,0 @@ -bsub -P watcher -q compbio -J seaseqscat -o seaseqscat-out -e seaseqscat-err -N ../seaseq_wrap_scatter.sh inputymlscatter.yml SEASEQSCATTER diff --git a/test/run_seaseq_test.sh b/test/run_seaseq_test.sh deleted file mode 100755 index 71b70db..0000000 --- a/test/run_seaseq_test.sh +++ /dev/null @@ -1,2 +0,0 @@ -bsub -P watcher -q compbio -J seaseq -o seaseq-out -e seaseq-err -N ../seaseq_wrap.sh inputyml.yml SEASEQ - diff --git a/test/tool-run_seaseqtest.sh b/test/tool-run_seaseqtest.sh deleted file mode 100755 index 9207d50..0000000 --- a/test/tool-run_seaseqtest.sh +++ /dev/null @@ -1 +0,0 @@ -bsub -P watcher -q compbio -J seaseqtool -o seaseqtool-out -e seaseqtool-err -N ../tool-seaseq_wrap.sh inputyml.yml TOOLSEASEQ diff --git a/tool-seaseq_wrap.sh b/tool-seaseq_wrap.sh deleted file mode 100755 index bff2ac2..0000000 --- a/tool-seaseq_wrap.sh +++ /dev/null @@ -1,109 +0,0 @@ -#!/usr/bin/bash -# seaseq_wrap.sh -# ====== README -# This is the seaseq wrapper script written for -# St. Jude, Abraham's Lab. -# This script works with St. Jude, HPC LSF cluster. -# ------ -# To Run on St. Jude LSF. -# bsub -P watcher -q compbio -J seaseq -o seaseq-out -e seaseq-err -N ./seaseq_wrap.sh -# bsub -P watcher -q compbio -J seaseq -o seaseq-out -e seaseq-err -N ./seaseq_wrap.sh inputparameters.yml OUTPUTFOLDER -# ------ -# Programs and versions used -# bowtie v. 1.2.2 -# fastqc v. 0.11.5 -# samtools v. 1.9 -# R v. 3.6.1 -# macs v. 041014 -# SICER2 v. 1.0.2 -# meme v. 4.11.2 -# spp v. 1.16.0 -# bedtools/2.25.0 -# python v. 3.7.0 -# java v. 1.8.0_60 -# perl v. 5.10.1 -# wigToBigWig v. 4 -# bedops v. 2.4.2 -# igvtools v. 2.3.2 -# ROSE v. 1.1.0 -# BAM2GFF v. 1.1.0 -# ------ -# Args: -# seaseqroot : PATH to workflow location -# inputyml : input yaml containing all required variables -# outputfolder : final output directory -# ====== - -# ====== VARIABLES -# Required Args -# ------ -if [ $# -lt 2 ]; then - echo "" - echo 1>&2 Usage: $0 ["YML"] ["OUTPUT FOLDER"] - echo "" - exit 1 -fi -actualpath=$(realpath $0) -seaseqroot=${actualpath%/*} -inputyml=$1 -outputfolder=$2 -# ------ -# Permanent Args -# ------ -seaseqworkflow="$seaseqroot/cwl/seaseq_pipeline.cwl" -NEW_UUID=${NEW_UUID:=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 5 | head -n 1)"_"`date +%s`} #temporary file for the 2nd step - -out="$(pwd)/seaseq-"$NEW_UUID"-outdir" -tmp="$(pwd)/seaseq-"$NEW_UUID"-tmpdir" -jobstore="seaseq-"$NEW_UUID"-jobstore" -logtxt="seaseq-"$NEW_UUID"-log.txt" -logout="seaseq-"$NEW_UUID"-log_out" -logerr="seaseq-"$NEW_UUID"-log_err" - -export PATH=$PATH:$seaseqroot/bin -# ------ -# Loading St. Jude HPC cluster programs -# ------ -source $seaseqroot/sjhpc_modules.ml - -# ====== - -# ====== WORKFLOW EXECUTION -# Toil Workflow Execution on St. Jude HPC Cluster -# ------ -echo "STATUS: Temporary files named with $NEW_UUID" - -mkdir -p $tmp $out -rm -rf $jobstore $logtxt - -cwltool \ ---no-container \ ---preserve-entire-environment \ ---copy-outputs \ ---leave-tmpdir \ ---tmpdir-prefix $tmp \ ---outdir $out \ -$seaseqworkflow $inputyml 1>$logout 2>$logerr -# ------ -# Extract and Clean Up output files. -# Relevant files are moved to indicated "$outputfolder" -# Remove all temporary files. -# ------ -if [ -s $logout ] -then - - ##extracting relevant files from 1st step to the next step & to outputfolder - OUTPUTFOLDER=$(chromatinSEreadjson.pl -i $logout -s 1) - chromatinSEreadjson.pl -i $logout -s 2 -f $OUTPUTFOLDER - - #rm -rf *$NEW_UUID* - mkdir -p $outputfolder - mv $OUTPUTFOLDER $outputfolder - - echo "STATUS: Cleaned Up All files with $NEW_UUID" - echo "SUCCESS: CHIPSEQ - SE Pipeline Completed" -else - echo "ERROR: ChipSeq-ALL workflow terminated with errors" -fi - -# ======