Debian Codegraph @

tests/cwl/formatted-atac-seq-pipeline.cwl

raw ◀ ▶
Source reconstructed at patch state 0 of 2 — not the installed (fully patched) source.
2 Debian patches touch this file
1 #!/usr/bin/env cwl-runner
2
3 cwlVersion: v1.0
4 class: Workflow
5 label: ATAC-seq-pipeline-se
6 doc: 'ATAC-seq pipeline - reads: SE'
7 $namespaces:
8 sbg: https://sevenbridges.com
9
10 requirements:
11 - class: ScatterFeatureRequirement
12 - class: SubworkflowFeatureRequirement
13 - class: StepInputExpressionRequirement
14
15 inputs:
16 as_narrowPeak_file:
17 doc: Definition narrowPeak file in AutoSql format (used in bedToBigBed)
18 type: File
19 default_adapters_file:
20 doc: Adapters file
21 type: File
22 genome_effective_size:
23 doc: |-
24 Effective genome size used by MACS2. It can be numeric or a shortcuts:'hs' for human (2.7e9), 'mm' for mouse (1.87e9), 'ce' for C. elegans (9e7) and 'dm' for fruitfly (1.2e8), Default:hs
25 type: string
26 default: hs
27 genome_ref_first_index_file:
28 doc: |-
29 "First index file of Bowtie reference genome with extension 1.ebwt. \ (Note: the rest of the index files MUST be in the same folder)"
30 type: File
31 secondaryFiles:
32 - ^^.2.ebwt
33 - ^^.3.ebwt
34 - ^^.4.ebwt
35 - ^^.rev.1.ebwt
36 - ^^.rev.2.ebwt
37 genome_sizes_file:
38 doc: Genome sizes tab-delimited file (used in samtools)
39 type: File
40 input_fastq_files:
41 type: File[]
42 nthreads_map:
43 doc: Number of threads required for the 03-map step
44 type: int
45 nthreads_peakcall:
46 doc: Number of threads required for the 04-peakcall step
47 type: int
48 nthreads_qc:
49 doc: Number of threads required for the 01-qc step
50 type: int
51 nthreads_quant:
52 doc: Number of threads required for the 05-quantification step
53 type: int
54 nthreads_trimm:
55 doc: Number of threads required for the 02-trim step
56 type: int
57 picard_jar_path:
58 doc: Picard Java jar file
59 type: string
60 picard_java_opts:
61 doc: |-
62 JVM arguments should be a quoted, space separated list (e.g. "-Xms128m -Xmx512m")
63 type: string?
64 trimmomatic_jar_path:
65 doc: Trimmomatic Java jar file
66 type: string
67 trimmomatic_java_opts:
68 doc: |-
69 JVM arguments should be a quoted, space separated list (e.g. "-Xms128m -Xmx512m")
70 type: string?
71
72 outputs:
73 map_bowtie_log_files:
74 doc: Bowtie log file with mapping stats
75 type: File[]
76 outputSource: map/output_bowtie_log
77 map_dedup_bam_files:
78 doc: Filtered BAM files (post-processing end point)
79 type: File[]
80 outputSource: map/output_data_sorted_dups_marked_bam_files
81 map_mark_duplicates_files:
82 doc: |-
83 Summary of duplicates removed with Picard tool MarkDuplicates (for multiple reads aligned to the same positions
84 type: File[]
85 outputSource: map/output_picard_mark_duplicates_files
86 map_pbc_files:
87 doc: PCR Bottleneck Coefficient files (used to flag samples when pbc<0.5)
88 type: File[]
89 outputSource: map/output_pbc_files
90 map_percent_mitochondrial_reads:
91 doc: Percentage of mitochondrial reads
92 type: File[]
93 outputSource: map/output_percent_mitochondrial_reads
94 map_preseq_c_curve_files:
95 doc: Preseq c_curve output files
96 type: File[]
97 outputSource: map/output_preseq_c_curve_files
98 map_preseq_percentage_uniq_reads:
99 doc: Preseq percentage of uniq reads
100 type: File[]
101 outputSource: map/output_percentage_uniq_reads
102 map_read_count_mapped:
103 doc: Read counts of the mapped BAM files
104 type: File[]
105 outputSource: map/output_read_count_mapped
106 peakcall_extended_peak_file:
107 doc: Extended fragment peaks in ENCODE Peak file format
108 type: File[]
109 outputSource: peak_call/output_extended_peak_file
110 peakcall_filtered_read_count_file:
111 doc: Filtered read count after peak calling
112 type: File[]
113 outputSource: peak_call/output_filtered_read_count_file
114 peakcall_peak_bigbed_file:
115 doc: Peaks in bigBed format
116 type: File[]
117 outputSource: peak_call/output_peak_bigbed_file
118 peakcall_peak_count_within_replicate:
119 doc: Peak counts within replicate
120 type: File[]
121 outputSource: peak_call/output_peak_count_within_replicate
122 peakcall_peak_file:
123 doc: Peaks in ENCODE Peak file format
124 type: File[]
125 outputSource: peak_call/output_peak_file
126 peakcall_peak_summits_file:
127 doc: Peaks summits in bedfile format
128 type: File[]
129 outputSource: peak_call/output_peak_summits_file
130 peakcall_peak_xls_file:
131 doc: Peak calling report file
132 type: File[]
133 outputSource: peak_call/output_peak_xls_file
134 peakcall_read_in_peak_count_within_replicate:
135 doc: Peak counts within replicate
136 type: File[]
137 outputSource: peak_call/output_read_in_peak_count_within_replicate
138 peakcall_spp_x_cross_corr:
139 doc: SPP strand cross correlation summary
140 type: File[]
141 outputSource: peak_call/output_spp_x_cross_corr
142 peakcall_spp_x_cross_corr_plot:
143 doc: SPP strand cross correlation plot
144 type: File[]
145 outputSource: peak_call/output_spp_cross_corr_plot
146 qc_count_raw_reads:
147 doc: Raw read counts of fastq files after QC
148 type: File[]
149 outputSource: qc/output_count_raw_reads
150 qc_diff_counts:
151 doc: Diff file between number of raw reads and number of reads counted by FASTQC,
152 type: File[]
153 outputSource: qc/output_diff_counts
154 qc_fastqc_data_files:
155 doc: FastQC data files
156 type: File[]
157 outputSource: qc/output_fastqc_data_files
158 qc_fastqc_report_files:
159 doc: FastQC reports in zip format
160 type: File[]
161 outputSource: qc/output_fastqc_report_files
162 quant_bigwig_norm_files:
163 doc: Normalized reads bigWig (signal) files
164 type: File[]
165 outputSource: quant/bigwig_norm_files
166 quant_bigwig_raw_files:
167 doc: Raw reads bigWig (signal) files
168 type: File[]
169 outputSource: quant/bigwig_raw_files
170 trimm_fastq_files:
171 doc: FASTQ files after trimming
172 type: File[]
173 outputSource: trimm/output_data_fastq_trimmed_files
174 trimm_raw_counts:
175 doc: Raw read counts of fastq files after trimming
176 type: File[]
177 outputSource: trimm/output_trimmed_fastq_read_count
178
179 steps:
180 map:
181 in:
182 genome_ref_first_index_file: genome_ref_first_index_file
183 genome_sizes_file: genome_sizes_file
184 input_fastq_files: trimm/output_data_fastq_trimmed_files
185 nthreads: nthreads_map
186 picard_jar_path: picard_jar_path
187 picard_java_opts: picard_java_opts
188 run:
189 cwlVersion: v1.0
190 class: Workflow
191 doc: 'ATAC-seq 03 mapping - reads: SE'
192
193 requirements:
194 - class: ScatterFeatureRequirement
195 - class: SubworkflowFeatureRequirement
196 - class: StepInputExpressionRequirement
197 - class: InlineJavascriptRequirement
198
199 inputs:
200 genome_ref_first_index_file:
201 doc: |-
202 Bowtie first index files for reference genome (e.g. *1.ebwt). The rest of the files should be in the same folder.
203 type: File
204 secondaryFiles:
205 - ^^.2.ebwt
206 - ^^.3.ebwt
207 - ^^.4.ebwt
208 - ^^.rev.1.ebwt
209 - ^^.rev.2.ebwt
210 genome_sizes_file:
211 doc: Genome sizes tab-delimited file (used in samtools)
212 type: File
213 input_fastq_files:
214 doc: Input fastq files
215 type: File[]
216 nthreads:
217 type: int
218 default: 1
219 picard_jar_path:
220 doc: Picard Java jar file
221 type: string
222 default: /usr/picard/picard.jar
223 picard_java_opts:
224 doc: |-
225 JVM arguments should be a quoted, space separated list (e.g. "-Xms128m -Xmx512m")
226 type: string?
227
228 outputs:
229 output_bowtie_log:
230 doc: Bowtie log file.
231 type: File[]
232 outputSource: bowtie-se/output_bowtie_log
233 output_data_sorted_dedup_bam_files:
234 doc: BAM files without duplicate reads.
235 type: File[]
236 outputSource: index_dedup_bams/indexed_file
237 output_data_sorted_dups_marked_bam_files:
238 doc: BAM files with marked duplicate reads.
239 type: File[]
240 outputSource: index_dups_marked_bams/indexed_file
241 output_pbc_files:
242 doc: PCR Bottleneck Coeficient files.
243 type: File[]
244 outputSource: execute_pcr_bottleneck_coef/pbc_file
245 output_percent_mitochondrial_reads:
246 doc: Percentage of mitochondrial reads.
247 type: File[]
248 outputSource: percent_mitochondrial_reads/percent_map
249 output_percentage_uniq_reads:
250 doc: Percentage of uniq reads from preseq c_curve output
251 type: File[]
252 outputSource: percent_uniq_reads/output
253 output_picard_mark_duplicates_files:
254 doc: Picard MarkDuplicates metrics files.
255 type: File[]
256 outputSource: mark_duplicates/output_metrics_file
257 output_preseq_c_curve_files:
258 doc: Preseq c_curve output files.
259 type: File[]
260 outputSource: preseq-c-curve/output_file
261 output_read_count_mapped:
262 doc: Read counts of the mapped BAM files
263 type: File[]
264 outputSource: mapped_reads_count/output
265 output_read_count_mapped_filtered:
266 doc: Read counts of the mapped and filtered BAM files
267 type: File[]
268 outputSource: mapped_filtered_reads_count/output_read_count
269
270 steps:
271 bam_idxstats:
272 in:
273 bam: index_bams/indexed_file
274 scatter: bam
275 run:
276 cwlVersion: v1.0
277 class: CommandLineTool
278
279 requirements:
280 InitialWorkDirRequirement:
281 listing:
282 - $(inputs.bam)
283 InlineJavascriptRequirement: {}
284
285 inputs:
286 bam:
287 doc: Bam file (it should be indexed)
288 type: File
289 secondaryFiles:
290 - .bai
291 inputBinding:
292 position: 1
293
294 outputs:
295 idxstats_file:
296 doc: |
297 Idxstats output file. TAB-delimited with each line consisting of reference
298 sequence name, sequence length, # mapped reads and # unmapped reads
299 type: File
300 outputBinding:
301 glob: $(inputs.bam.basename + ".idxstats")
302 stdout: $(inputs.bam.basename + ".idxstats")
303
304 baseCommand:
305 - samtools
306 - idxstats
307
308 hints:
309 DockerRequirement:
310 dockerPull: dukegcb/samtools:1.3
311 out:
312 - idxstats_file
313 bowtie-se:
314 in:
315 X:
316 valueFrom: ${return 2000}
317 genome_ref_first_index_file: genome_ref_first_index_file
318 input_fastq_file: input_fastq_files
319 nthreads: nthreads
320 output_filename: extract_basename_2/output_path
321 v:
322 valueFrom: ${return 2}
323 scatter:
324 - input_fastq_file
325 - output_filename
326 scatterMethod: dotproduct
327 run:
328 cwlVersion: v1.0
329 class: CommandLineTool
330
331 requirements:
332 InlineJavascriptRequirement: {}
333 ShellCommandRequirement: {}
334
335 inputs:
336 X:
337 doc: 'maximum insert size for paired-end alignment (default: 250)'
338 type: int?
339 inputBinding:
340 prefix: -X
341 position: 4
342 best:
343 doc: Hits guaranteed best stratum; ties broken by quality
344 type: boolean
345 default: true
346 inputBinding:
347 prefix: --best
348 position: 5
349 chunkmbs:
350 doc: |-
351 The number of megabytes of memory a given thread is given to store path descriptors in --best mode. (Default: 256)
352 type: int?
353 inputBinding:
354 prefix: --chunkmbs
355 position: 5
356 genome_ref_first_index_file:
357 doc: |-
358 First file (extension .1.ebwt) of the Bowtie index files generated for the reference genome (see http://bowtie-bio.sourceforge.net/tutorial.shtml#newi)
359 type: File
360 secondaryFiles:
361 - ^^.2.ebwt
362 - ^^.3.ebwt
363 - ^^.4.ebwt
364 - ^^.rev.1.ebwt
365 - ^^.rev.2.ebwt
366 inputBinding:
367 position: 9
368 valueFrom: $(self.path.split('.').splice(0,self.path.split('.').length-2).join("."))
369 input_fastq_file:
370 doc: Query input FASTQ file.
371 type: File
372 inputBinding:
373 position: 10
374 m:
375 doc: 'Suppress all alignments if > <int> exist (def: 1)'
376 type: int
377 default: 1
378 inputBinding:
379 prefix: -m
380 position: 7
381 nthreads:
382 doc: '<int> number of alignment threads to launch (default: 1)'
383 type: int
384 default: 1
385 inputBinding:
386 prefix: --threads
387 position: 8
388 output_filename:
389 type: string
390 sam:
391 doc: 'Write hits in SAM format (default: BAM)'
392 type: boolean
393 default: true
394 inputBinding:
395 prefix: --sam
396 position: 2
397 seedlen:
398 doc: 'seed length for -n (default: 28)'
399 type: int?
400 inputBinding:
401 prefix: --seedlen
402 position: 1
403 seedmms:
404 doc: 'max mismatches in seed (between [0, 3], default: 2)'
405 type: int?
406 inputBinding:
407 prefix: --seedmms
408 position: 1
409 strata:
410 doc: Hits in sub-optimal strata aren't reported (requires --best)
411 type: boolean
412 default: true
413 inputBinding:
414 prefix: --strata
415 position: 6
416 t:
417 doc: Print wall-clock time taken by search phases
418 type: boolean
419 default: true
420 inputBinding:
421 prefix: -t
422 position: 1
423 trim3:
424 doc: trim <int> bases from 3' (right) end of reads
425 type: int?
426 inputBinding:
427 prefix: --trim3
428 position: 1
429 trim5:
430 doc: trim <int> bases from 5' (left) end of reads
431 type: int?
432 inputBinding:
433 prefix: --trim5
434 position: 1
435 v:
436 doc: Report end-to-end hits w/ <=v mismatches; ignore qualities
437 type: int?
438 inputBinding:
439 prefix: -v
440 position: 3
441
442 outputs:
443 output_aligned_file:
444 doc: Aligned bowtie file in [SAM|BAM] format.
445 type: File
446 outputBinding:
447 glob: $(inputs.output_filename + '.sam')
448 output_bowtie_log:
449 type: File
450 outputBinding:
451 glob: $(inputs.output_filename + '.bowtie.log')
452 stderr: $(inputs.output_filename + '.bowtie.log')
453
454 baseCommand: bowtie
455 arguments:
456 - position: 11
457 valueFrom: $(inputs.output_filename + '.sam')
458
459 hints:
460 DockerRequirement:
461 dockerPull: dukegcb/bowtie
462 out:
463 - output_aligned_file
464 - output_bowtie_log
465 execute_pcr_bottleneck_coef:
466 in:
467 genome_sizes: genome_sizes_file
468 input_bam_files: filtered2sorted/sorted_file
469 input_output_filenames: extract_basename_2/output_path
470 run:
471 cwlVersion: v1.0
472 class: Workflow
473 doc: ChIP-seq - map - PCR Bottleneck Coefficients
474
475 requirements:
476 - class: ScatterFeatureRequirement
477
478 inputs:
479 genome_sizes:
480 type: File
481 input_bam_files:
482 type: File[]
483 input_output_filenames:
484 type: string[]
485
486 outputs:
487 pbc_file:
488 type: File[]
489 outputSource: compute_pbc/pbc
490
491 steps:
492 bedtools_genomecov:
493 in:
494 bg:
495 default: true
496 g: genome_sizes
497 ibam: input_bam_files
498 scatter: ibam
499 run:
500 cwlVersion: v1.0
501 class: CommandLineTool
502 doc: |-
503 Tool: bedtools genomecov (aka genomeCoverageBed)
504 Version: v2.25.0
505 Summary: Compute the coverage of a feature file among a genome.
506
507 Usage: bedtools genomecov [OPTIONS] -i <bed/gff/vcf> -g <genome>
508
509 Options:
510 -ibam The input file is in BAM format.
511 Note: BAM _must_ be sorted by position
512
513 -d Report the depth at each genome position (with one-based coordinates).
514 Default behavior is to report a histogram.
515
516 -dz Report the depth at each genome position (with zero-based coordinates).
517 Reports only non-zero positions.
518 Default behavior is to report a histogram.
519
520 -bg Report depth in BedGraph format. For details, see:
521 genome.ucsc.edu/goldenPath/help/bedgraph.html
522
523 -bga Report depth in BedGraph format, as above (-bg).
524 However with this option, regions with zero
525 coverage are also reported. This allows one to
526 quickly extract all regions of a genome with 0
527 coverage by applying: "grep -w 0$" to the output.
528
529 -split Treat "split" BAM or BED12 entries as distinct BED intervals.
530 when computing coverage.
531 For BAM files, this uses the CIGAR "N" and "D" operations
532 to infer the blocks for computing coverage.
533 For BED12 files, this uses the BlockCount, BlockStarts, and BlockEnds
534 fields (i.e., columns 10,11,12).
535
536 -strand Calculate coverage of intervals from a specific strand.
537 With BED files, requires at least 6 columns (strand is column 6).
538 - (STRING): can be + or -
539
540 -5 Calculate coverage of 5" positions (instead of entire interval).
541
542 -3 Calculate coverage of 3" positions (instead of entire interval).
543
544 -max Combine all positions with a depth >= max into
545 a single bin in the histogram. Irrelevant
546 for -d and -bedGraph
547 - (INTEGER)
548
549 -scale Scale the coverage by a constant factor.
550 Each coverage value is multiplied by this factor before being reported.
551 Useful for normalizing coverage by, e.g., reads per million (RPM).
552 - Default is 1.0; i.e., unscaled.
553 - (FLOAT)
554
555 -trackline Adds a UCSC/Genome-Browser track line definition in the first line of the output.
556 - See here for more details about track line definition:
557 http://genome.ucsc.edu/goldenPath/help/bedgraph.html
558 - NOTE: When adding a trackline definition, the output BedGraph can be easily
559 uploaded to the Genome Browser as a custom track,
560 BUT CAN NOT be converted into a BigWig file (w/o removing the first line).
561
562 -trackopts Writes additional track line definition parameters in the first line.
563 - Example:
564 -trackopts 'name="My Track" visibility=2 color=255,30,30'
565 Note the use of single-quotes if you have spaces in your parameters.
566 - (TEXT)
567
568 Notes:
569 (1) The genome file should tab delimited and structured as follows:
570 <chromName><TAB><chromSize>
571
572 For example, Human (hg19):
573 chr1 249250621
574 chr2 243199373
575 ...
576 chr18_gl000207_random 4262
577
578 (2) The input BED (-i) file must be grouped by chromosome.
579 A simple "sort -k 1,1 <BED> > <BED>.sorted" will suffice.
580
581 (3) The input BAM (-ibam) file must be sorted by position.
582 A "samtools sort <BAM>" should suffice.
583
584 Tips:
585 One can use the UCSC Genome Browser's MySQL database to extract
586 chromosome sizes. For example, H. sapiens:
587
588 mysql --user=genome --host=genome-mysql.cse.ucsc.edu -A -e \
589 "select chrom, size from hg19.chromInfo" > hg19.genome
590
591 requirements:
592 InlineJavascriptRequirement: {}
593 ShellCommandRequirement: {}
594
595 inputs:
596 '3':
597 doc: "\tCalculate coverage of 3\" positions (instead of entire\
598 \ interval).\n"
599 type: boolean?
600 inputBinding:
601 prefix: '-3'
602 position: 1
603 '5':
604 doc: "\tCalculate coverage of 5\" positions (instead of entire\
605 \ interval).\n"
606 type: boolean?
607 inputBinding:
608 prefix: '-5'
609 position: 1
610 bg:
611 doc: |
612 Report depth in BedGraph format. For details, see:
613 genome.ucsc.edu/goldenPath/help/bedgraph.html
614 type: boolean?
615 inputBinding:
616 prefix: -bg
617 position: 1
618 bga:
619 doc: |
620 Report depth in BedGraph format, as above (-bg).
621 However with this option, regions with zero
622 coverage are also reported. This allows one to
623 quickly extract all regions of a genome with 0
624 coverage by applying: "grep -w 0$" to the output.
625 type: boolean?
626 inputBinding:
627 prefix: -bga
628 position: 1
629 d:
630 doc: |
631 Report the depth at each genome position (with one-based coordinates).
632 Default behavior is to report a histogram.
633 type: boolean?
634 inputBinding:
635 prefix: -d
636 position: 1
637 dz:
638 doc: |
639 Report the depth at each genome position (with zero-based coordinates).
640 Reports only non-zero positions.
641 Default behavior is to report a histogram.
642 type: boolean?
643 inputBinding:
644 prefix: -dz
645 position: 1
646 g:
647 doc: <genome sizes>
648 type: File
649 inputBinding:
650 prefix: -g
651 position: 3
652 ibam:
653 doc: "\tThe input file is in BAM format.\nNote: BAM _must_ be\
654 \ sorted by position\n"
655 type: File
656 inputBinding:
657 prefix: -ibam
658 position: 2
659 max:
660 doc: |
661 Combine all positions with a depth >= max into
662 a single bin in the histogram. Irrelevant
663 for -d and -bedGraph
664 - (INTEGER)
665 type: int?
666 inputBinding:
667 prefix: -max
668 position: 1
669 scale:
670 doc: |
671 Scale the coverage by a constant factor.
672 Each coverage value is multiplied by this factor before being reported.
673 Useful for normalizing coverage by, e.g., reads per million (RPM).
674 - Default is 1.0; i.e., unscaled.
675 - (FLOAT)
676 type: float?
677 inputBinding:
678 prefix: -scale
679 position: 1
680 split:
681 doc: |
682 Treat "split" BAM or BED12 entries as distinct BED intervals.
683 when computing coverage.
684 For BAM files, this uses the CIGAR "N" and "D" operations
685 to infer the blocks for computing coverage.
686 For BED12 files, this uses the BlockCount, BlockStarts, and BlockEnds
687 fields (i.e., columns 10,11,12).
688 type: boolean?
689 inputBinding:
690 prefix: -split
691 position: 1
692 strand:
693 doc: |
694 Calculate coverage of intervals from a specific strand.
695 With BED files, requires at least 6 columns (strand is column 6).
696 - (STRING): can be + or -
697 type: string?
698 inputBinding:
699 prefix: -strand
700 position: 1
701 trackline:
702 doc: |
703 Adds a UCSC/Genome-Browser track line definition in the first line of the output.
704 - See here for more details about track line definition:
705 http://genome.ucsc.edu/goldenPath/help/bedgraph.html
706 - NOTE: When adding a trackline definition, the output BedGraph can be easily
707 uploaded to the Genome Browser as a custom track,
708 BUT CAN NOT be converted into a BigWig file (w/o removing the first line).
709 type: boolean?
710 inputBinding:
711 prefix: -trackline
712 position: 1
713 trackopts:
714 doc: |
715 Writes additional track line definition parameters in the first line.
716 - Example:
717 -trackopts 'name="My Track" visibility=2 color=255,30,30'
718 Note the use of single-quotes if you have spaces in your parameters.
719 - (TEXT)
720 type: string?
721 inputBinding:
722 prefix: -trackopts
723 position: 1
724
725 outputs:
726 output_bedfile:
727 type: File
728 outputBinding:
729 glob: $(inputs.ibam.path.replace(/^.*[\\\/]/, '').replace(/\.[^/.]+$/,
730 '') + '.bdg')
731 stdout: $(inputs.ibam.path.replace(/^.*[\\\/]/, '').replace(/\.[^/.]+$/,
732 '') + '.bdg')
733
734 baseCommand:
735 - bedtools
736 - genomecov
737
738 hints:
739 DockerRequirement:
740 dockerPull: dukegcb/bedtools
741 out:
742 - output_bedfile
743 compute_pbc:
744 in:
745 bedgraph_file: bedtools_genomecov/output_bedfile
746 output_filename: input_output_filenames
747 scatter:
748 - bedgraph_file
749 - output_filename
750 scatterMethod: dotproduct
751 run:
752 cwlVersion: v1.0
753 class: CommandLineTool
754 doc: Compute PCR Bottleneck Coeficient from BedGraph file.
755
756 inputs:
757 bedgraph_file:
758 type: File
759 inputBinding:
760 position: 1
761 output_filename:
762 type: string
763
764 outputs:
765 pbc:
766 type: File
767 outputBinding:
768 glob: $(inputs.output_filename + '.PBC.txt')
769 stdout: $(inputs.output_filename + '.PBC.txt')
770
771 baseCommand:
772 - awk
773 - $4==1 {N1 += $3 - $2}; $4>=1 {Nd += $3 - $2} END {print N1/Nd}
774 out:
775 - pbc
776 out:
777 - pbc_file
778 extract_basename_1:
779 in:
780 input_file: input_fastq_files
781 scatter: input_file
782 run:
783 cwlVersion: v1.0
784 class: CommandLineTool
785 doc: Extracts the base name of a file
786
787 requirements:
788 InlineJavascriptRequirement: {}
789
790 inputs:
791 input_file:
792 type: File
793 inputBinding:
794 position: 1
795
796 outputs:
797 output_basename:
798 type: string
799 outputBinding:
800 outputEval: |-
801 $(inputs.input_file.path.substr(inputs.input_file.path.lastIndexOf('/') + 1, inputs.input_file.path.lastIndexOf('.') - (inputs.input_file.path.lastIndexOf('/') + 1)))
802
803 baseCommand: echo
804
805 hints:
806 DockerRequirement:
807 dockerPull: reddylab/workflow-utils:ggr
808 out:
809 - output_basename
810 extract_basename_2:
811 in:
812 file_path: extract_basename_1/output_basename
813 scatter: file_path
814 run:
815 cwlVersion: v1.0
816 class: CommandLineTool
817 doc: Extracts the base name of a file
818
819 inputs:
820 file_path:
821 type: string
822 inputBinding:
823 position: 1
824
825 outputs:
826 output_path:
827 type: string
828 outputBinding:
829 outputEval: $(inputs.file_path.replace(/\.[^/.]+$/, ""))
830
831 baseCommand: echo
832
833 hints:
834 DockerRequirement:
835 dockerPull: reddylab/workflow-utils:ggr
836 out:
837 - output_path
838 filter-unmapped:
839 in:
840 input_file: sort_bams/sorted_file
841 output_filename: extract_basename_2/output_path
842 scatter:
843 - input_file
844 - output_filename
845 scatterMethod: dotproduct
846 run:
847 cwlVersion: v1.0
848 class: CommandLineTool
849
850 requirements:
851 InlineJavascriptRequirement: {}
852
853 inputs:
854 input_file:
855 doc: Aligned file to be sorted with samtools
856 type: File
857 inputBinding:
858 position: 1000
859 nthreads:
860 doc: Number of threads used in sorting
861 type: int
862 default: 1
863 inputBinding:
864 prefix: -@
865 position: 1
866 output_filename:
867 doc: Basename for the output file
868 type: string
869
870 outputs:
871 filtered_file:
872 doc: Filter unmapped reads in aligned file
873 type: File
874 outputBinding:
875 glob: $(inputs.output_filename + '.accepted_hits.bam')
876 stdout: $(inputs.output_filename + '.accepted_hits.bam')
877
878 baseCommand:
879 - samtools
880 - view
881 - -F
882 - '4'
883 - -b
884 - -h
885
886 hints:
887 DockerRequirement:
888 dockerPull: dukegcb/samtools:1.3
889 out:
890 - filtered_file
891 filtered2sorted:
892 in:
893 input_file: filter-unmapped/filtered_file
894 nthreads: nthreads
895 scatter:
896 - input_file
897 run:
898 cwlVersion: v1.0
899 class: CommandLineTool
900
901 requirements:
902 InlineJavascriptRequirement: {}
903
904 inputs:
905 input_file:
906 doc: Aligned file to be sorted with samtools
907 type: File
908 inputBinding:
909 position: 1000
910 n:
911 doc: Sort by read name
912 type: boolean
913 default: false
914 inputBinding:
915 prefix: -n
916 position: 1
917 nthreads:
918 doc: Number of threads used in sorting
919 type: int
920 default: 1
921 inputBinding:
922 prefix: -@
923 position: 1
924 suffix:
925 doc: suffix of the transformed SAM/BAM file (including extension,
926 e.g. .filtered.sam)
927 type: string
928 default: .sorted.bam
929
930 outputs:
931 sorted_file:
932 doc: Sorted aligned file
933 type: File
934 outputBinding:
935 glob: |-
936 $(inputs.input_file.path.replace(/^.*[\\\/]/, '').replace(/\.[^/.]+$/, '') + inputs.suffix)
937 stdout: |-
938 $(inputs.input_file.path.replace(/^.*[\\\/]/, '').replace(/\.[^/.]+$/, '') + inputs.suffix)
939
940 baseCommand:
941 - samtools
942 - sort
943
944 hints:
945 DockerRequirement:
946 dockerPull: dukegcb/samtools:1.3
947 out:
948 - sorted_file
949 index_bams:
950 in:
951 input_file: sort_bams/sorted_file
952 scatter: input_file
953 run:
954 cwlVersion: v1.0
955 class: CommandLineTool
956
957 requirements:
958 InitialWorkDirRequirement:
959 listing:
960 - $(inputs.input_file)
961 InlineJavascriptRequirement: {}
962
963 inputs:
964 input_file:
965 doc: Aligned file to be sorted with samtools
966 type: File
967 inputBinding:
968 position: 1
969
970 outputs:
971 indexed_file:
972 doc: Indexed BAM file
973 type: File
974 secondaryFiles: .bai
975 outputBinding:
976 glob: $(inputs.input_file.basename)
977
978 baseCommand:
979 - samtools
980 - index
981 arguments:
982 - position: 2
983 valueFrom: $(inputs.input_file.basename + '.bai')
984
985 hints:
986 DockerRequirement:
987 dockerPull: dukegcb/samtools:1.3
988 out:
989 - indexed_file
990 index_dedup_bams:
991 in:
992 input_file: sort_dedup_bams/sorted_file
993 scatter:
994 - input_file
995 run:
996 cwlVersion: v1.0
997 class: CommandLineTool
998
999 requirements:
1000 InitialWorkDirRequirement:
1001 listing:
1002 - $(inputs.input_file)
1003 InlineJavascriptRequirement: {}
1004
1005 inputs:
1006 input_file:
1007 doc: Aligned file to be sorted with samtools
1008 type: File
1009 inputBinding:
1010 position: 1
1011
1012 outputs:
1013 indexed_file:
1014 doc: Indexed BAM file
1015 type: File
1016 secondaryFiles: .bai
1017 outputBinding:
1018 glob: $(inputs.input_file.basename)
1019
1020 baseCommand:
1021 - samtools
1022 - index
1023 arguments:
1024 - position: 2
1025 valueFrom: $(inputs.input_file.basename + '.bai')
1026
1027 hints:
1028 DockerRequirement:
1029 dockerPull: dukegcb/samtools:1.3
1030 out:
1031 - indexed_file
1032 index_dups_marked_bams:
1033 in:
1034 input_file: sort_dups_marked_bams/sorted_file
1035 scatter:
1036 - input_file
1037 run:
1038 cwlVersion: v1.0
1039 class: CommandLineTool
1040
1041 requirements:
1042 InitialWorkDirRequirement:
1043 listing:
1044 - $(inputs.input_file)
1045 InlineJavascriptRequirement: {}
1046
1047 inputs:
1048 input_file:
1049 doc: Aligned file to be sorted with samtools
1050 type: File
1051 inputBinding:
1052 position: 1
1053
1054 outputs:
1055 indexed_file:
1056 doc: Indexed BAM file
1057 type: File
1058 secondaryFiles: .bai
1059 outputBinding:
1060 glob: $(inputs.input_file.basename)
1061
1062 baseCommand:
1063 - samtools
1064 - index
1065 arguments:
1066 - position: 2
1067 valueFrom: $(inputs.input_file.basename + '.bai')
1068
1069 hints:
1070 DockerRequirement:
1071 dockerPull: dukegcb/samtools:1.3
1072 out:
1073 - indexed_file
1074 index_filtered_bam:
1075 in:
1076 input_file: filtered2sorted/sorted_file
1077 scatter: input_file
1078 run:
1079 cwlVersion: v1.0
1080 class: CommandLineTool
1081
1082 requirements:
1083 InitialWorkDirRequirement:
1084 listing:
1085 - $(inputs.input_file)
1086 InlineJavascriptRequirement: {}
1087
1088 inputs:
1089 input_file:
1090 doc: Aligned file to be sorted with samtools
1091 type: File
1092 inputBinding:
1093 position: 1
1094
1095 outputs:
1096 indexed_file:
1097 doc: Indexed BAM file
1098 type: File
1099 secondaryFiles: .bai
1100 outputBinding:
1101 glob: $(inputs.input_file.basename)
1102
1103 baseCommand:
1104 - samtools
1105 - index
1106 arguments:
1107 - position: 2
1108 valueFrom: $(inputs.input_file.basename + '.bai')
1109
1110 hints:
1111 DockerRequirement:
1112 dockerPull: dukegcb/samtools:1.3
1113 out:
1114 - indexed_file
1115 mapped_filtered_reads_count:
1116 in:
1117 input_bam_file: sort_dedup_bams/sorted_file
1118 output_suffix:
1119 valueFrom: .mapped_and_filtered.read_count.txt
1120 scatter: input_bam_file
1121 run:
1122 cwlVersion: v1.0
1123 class: CommandLineTool
1124 doc: Extract mapped reads from BAM file using Samtools flagstat command
1125
1126 requirements:
1127 InlineJavascriptRequirement: {}
1128 ShellCommandRequirement: {}
1129
1130 inputs:
1131 input_bam_file:
1132 doc: Aligned BAM file to filter
1133 type: File
1134 inputBinding:
1135 position: 1
1136 output_suffix:
1137 type: string
1138
1139 outputs:
1140 output_read_count:
1141 doc: Samtools Flagstat report file
1142 type: File
1143 outputBinding:
1144 glob: |-
1145 $(inputs.input_bam_file.path.replace(/^.*[\\\/]/, '').replace(/\.[^/.]+$/, "") + inputs.output_suffix)
1146 stdout: |-
1147 $(inputs.input_bam_file.path.replace(/^.*[\\\/]/, '').replace(/\.[^/.]+$/, "") + inputs.output_suffix)
1148
1149 baseCommand:
1150 - samtools
1151 - flagstat
1152 arguments:
1153 - position: 10000
1154 valueFrom: " | head -n1 | cut -f 1 -d ' '"
1155 shellQuote: false
1156
1157 hints:
1158 DockerRequirement:
1159 dockerPull: dukegcb/samtools
1160 out:
1161 - output_read_count
1162 mapped_reads_count:
1163 in:
1164 bowtie_log: bowtie-se/output_bowtie_log
1165 scatter: bowtie_log
1166 run:
1167 cwlVersion: v1.0
1168 class: CommandLineTool
1169 doc: Get number of processed reads from Bowtie log.
1170
1171 requirements:
1172 InlineJavascriptRequirement: {}
1173 ShellCommandRequirement: {}
1174
1175 inputs:
1176 bowtie_log:
1177 type: File
1178 inputBinding: {}
1179
1180 outputs:
1181 output:
1182 type: File
1183 outputBinding:
1184 glob: $(inputs.bowtie_log.path.replace(/^.*[\\\/]/, '') + '.read_count.mapped')
1185 stdout: $(inputs.bowtie_log.path.replace(/^.*[\\\/]/, '') + '.read_count.mapped')
1186
1187 baseCommand: read-count-from-bowtie-log.sh
1188
1189 hints:
1190 DockerRequirement:
1191 dockerPull: reddylab/workflow-utils:ggr
1192 out:
1193 - output
1194 mark_duplicates:
1195 in:
1196 input_file: index_filtered_bam/indexed_file
1197 java_opts: picard_java_opts
1198 output_filename: extract_basename_2/output_path
1199 output_suffix:
1200 valueFrom: bam
1201 picard_jar_path: picard_jar_path
1202 scatter:
1203 - input_file
1204 - output_filename
1205 scatterMethod: dotproduct
1206 run:
1207 cwlVersion: v1.0
1208 class: CommandLineTool
1209
1210 requirements:
1211 InlineJavascriptRequirement: {}
1212 ShellCommandRequirement: {}
1213
1214 inputs:
1215 barcode_tag:
1216 doc: |-
1217 If true do not write duplicates to the output file instead of writing them with appropriate flags set. (Default false).
1218 type: string?
1219 inputBinding:
1220 prefix: BARCODE_TAG=
1221 position: 5
1222 separate: false
1223 input_file:
1224 doc: One or more input SAM or BAM files to analyze. Must be coordinate
1225 sorted.
1226 type: File
1227 inputBinding:
1228 position: 4
1229 valueFrom: $('INPUT=' + self.path)
1230 shellQuote: false
1231 java_opts:
1232 doc: |-
1233 JVM arguments should be a quoted, space separated list (e.g. "-Xms128m -Xmx512m")
1234 type: string?
1235 inputBinding:
1236 position: 1
1237 shellQuote: false
1238 metrics_suffix:
1239 doc: 'Suffix used to create the metrics output file (Default: dedup_metrics.txt)'
1240 type: string
1241 default: dedup_metrics.txt
1242 output_filename:
1243 doc: Output filename used as basename
1244 type: string
1245 output_suffix:
1246 doc: 'Suffix used to identify the output file (Default: dedup.bam)'
1247 type: string
1248 default: dedup.bam
1249 picard_jar_path:
1250 doc: Path to the picard.jar file
1251 type: string
1252 inputBinding:
1253 prefix: -jar
1254 position: 2
1255 remove_duplicates:
1256 doc: |-
1257 If true do not write duplicates to the output file instead of writing them with appropriate flags set. (Default false).
1258 type: boolean
1259 default: false
1260 inputBinding:
1261 position: 5
1262 valueFrom: $('REMOVE_DUPLICATES=' + self)
1263
1264 outputs:
1265 output_dedup_bam_file:
1266 type: File
1267 outputBinding:
1268 glob: $(inputs.output_filename + '.' + inputs.output_suffix)
1269 output_metrics_file:
1270 type: File
1271 outputBinding:
1272 glob: $(inputs.output_filename + '.' + inputs.metrics_suffix)
1273
1274 baseCommand:
1275 - java
1276 arguments:
1277 - position: 3
1278 valueFrom: MarkDuplicates
1279 - position: 5
1280 valueFrom: $('OUTPUT=' + inputs.output_filename + '.' + inputs.output_suffix)
1281 shellQuote: false
1282 - position: 5
1283 valueFrom: $('METRICS_FILE='+inputs.output_filename + '.' + inputs.metrics_suffix)
1284 shellQuote: false
1285 - position: 5
1286 valueFrom: $('TMP_DIR='+runtime.tmpdir)
1287 shellQuote: false
1288
1289 hints:
1290 DockerRequirement:
1291 dockerPull: dukegcb/picard
1292 out:
1293 - output_metrics_file
1294 - output_dedup_bam_file
1295 percent_mitochondrial_reads:
1296 in:
1297 chrom:
1298 valueFrom: chrM
1299 idxstats: bam_idxstats/idxstats_file
1300 output_filename:
1301 valueFrom: |-
1302 ${return inputs.idxstats.basename.replace(/^.*[\\\/]/, '').replace(/\.[^/.]+$/, '').replace(/\.[^/.]+$/, '').replace(/\.[^/.]+$/, '.mitochondrial_percentage.txt')}
1303 scatter: idxstats
1304 run:
1305 cwlVersion: v1.0
1306 class: ExpressionTool
1307
1308 requirements:
1309 InlineJavascriptRequirement: {}
1310
1311 inputs:
1312 chrom:
1313 doc: Query chromosome used to calculate percentage
1314 type: string
1315 idxstats:
1316 doc: Samtools idxstats file
1317 type: File
1318 inputBinding:
1319 loadContents: true
1320 output_filename:
1321 doc: Save the percentage in a file of the given name
1322 type: string?
1323
1324 outputs:
1325 percent_map:
1326 type:
1327 - File
1328 - string
1329 expression: |
1330 ${
1331 var regExp = new RegExp(inputs.chrom + "\\s\\d+\\s(\\d+)\\s(\\d+)");
1332 var match = inputs.idxstats.contents.match(regExp);
1333 if (match){
1334 var chrom_mapped_reads = match[1];
1335 var total_reads = inputs.idxstats.contents.split("\n")
1336 .map(function(x){
1337 var rr = x.match(/.*\s\d+\s(\d+)\s\d+/);
1338 return (rr ? rr[1] : 0);
1339 })
1340 .reduce(function(a, b) { return Number(a) + Number(b); });
1341
1342 var output = (100*chrom_mapped_reads/total_reads).toFixed(4) + "%" + "\n";
1343
1344 if (inputs.output_filename){
1345 return {
1346 percent_map : {
1347 "class": "File",
1348 "basename" : inputs.output_filename,
1349 "contents" : output,
1350 }
1351 }
1352 }
1353 return output;
1354 }
1355 }
1356 out:
1357 - percent_map
1358 percent_uniq_reads:
1359 in:
1360 preseq_c_curve_outfile: preseq-c-curve/output_file
1361 scatter: preseq_c_curve_outfile
1362 run:
1363 cwlVersion: v1.0
1364 class: CommandLineTool
1365 doc: Get number of processed reads from Bowtie log.
1366
1367 requirements:
1368 InlineJavascriptRequirement: {}
1369 ShellCommandRequirement: {}
1370
1371 inputs:
1372 preseq_c_curve_outfile:
1373 type: File
1374 inputBinding: {}
1375
1376 outputs:
1377 output:
1378 type: File
1379 outputBinding:
1380 glob: |-
1381 $(inputs.preseq_c_curve_outfile.path.replace(/^.*[\\\/]/, '').replace(/\.[^/.]+$/, "") + '.percentage_unique_reads.txt')
1382 stdout: |-
1383 $(inputs.preseq_c_curve_outfile.path.replace(/^.*[\\\/]/, '').replace(/\.[^/.]+$/, "") + '.percentage_unique_reads.txt')
1384
1385 baseCommand: percent-uniq-reads-from-preseq.sh
1386
1387 hints:
1388 DockerRequirement:
1389 dockerPull: reddylab/workflow-utils:ggr
1390 out:
1391 - output
1392 preseq-c-curve:
1393 in:
1394 input_sorted_file: filtered2sorted/sorted_file
1395 output_file_basename: extract_basename_2/output_path
1396 scatter:
1397 - input_sorted_file
1398 - output_file_basename
1399 scatterMethod: dotproduct
1400 run:
1401 cwlVersion: v1.0
1402 class: CommandLineTool
1403 doc: |-
1404 Usage: c_curve [OPTIONS] <sorted-bed-file>
1405
1406 Options:
1407 -o, -output yield output file (default: stdout)
1408 -s, -step step size in extrapolations (default: 1e+06)
1409 -v, -verbose print more information
1410 -P, -pe input is paired end read file
1411 -H, -hist input is a text file containing the observed histogram
1412 -V, -vals input is a text file containing only the observed counts
1413 -B, -bam input is in BAM format
1414 -l, -seg_len maximum segment length when merging paired end bam reads
1415 (default: 5000)
1416
1417 Help options:
1418 -?, -help print this help message
1419 -about print about message
1420
1421 requirements:
1422 InlineJavascriptRequirement: {}
1423
1424 inputs:
1425 B:
1426 doc: "-bam input is in BAM format \n"
1427 type: boolean
1428 default: true
1429 inputBinding:
1430 prefix: -B
1431 position: 1
1432 H:
1433 doc: "-hist input is a text file containing the observed histogram\
1434 \ \n"
1435 type: File?
1436 inputBinding:
1437 prefix: -H
1438 position: 1
1439 V:
1440 doc: "-vals input is a text file containing only the observed\
1441 \ counts \n"
1442 type: File?
1443 inputBinding:
1444 prefix: -V
1445 position: 1
1446 input_sorted_file:
1447 doc: Sorted bed or BAM file
1448 type: File
1449 inputBinding:
1450 position: 2
1451 l:
1452 doc: |
1453 -seg_len maximum segment length when merging paired end bam reads
1454 (default: 5000)
1455 Help options:
1456 -?, -help print this help message
1457 -about print about message
1458 type: int?
1459 inputBinding:
1460 prefix: -l
1461 position: 1
1462 output_file_basename:
1463 type: string
1464 pe:
1465 doc: "-pe input is paired end read file \n"
1466 type: boolean?
1467 inputBinding:
1468 prefix: -P
1469 position: 1
1470 s:
1471 doc: "-step step size in extrapolations (default: 1e+06) \n"
1472 type: float?
1473 inputBinding:
1474 prefix: -s
1475 position: 1
1476 v:
1477 doc: "-verbose print more information \n"
1478 type: boolean
1479 default: false
1480 inputBinding:
1481 prefix: -v
1482 position: 1
1483
1484 outputs:
1485 output_file:
1486 type: File
1487 outputBinding:
1488 glob: $(inputs.output_file_basename + '.preseq_c_curve.txt')
1489 stdout: $(inputs.output_file_basename + '.preseq_c_curve.txt')
1490
1491 baseCommand:
1492 - preseq
1493 - c_curve
1494
1495 hints:
1496 DockerRequirement:
1497 dockerPull: reddylab/preseq:2.0
1498 out:
1499 - output_file
1500 remove_duplicates:
1501 in:
1502 F:
1503 valueFrom: ${return 1024}
1504 b:
1505 valueFrom: ${return true}
1506 input_file: index_dups_marked_bams/indexed_file
1507 outfile_name:
1508 valueFrom: ${return inputs.input_file.basename.replace('dups_marked',
1509 'dedup')}
1510 suffix:
1511 valueFrom: .dedup.bam
1512 scatter:
1513 - input_file
1514 run:
1515 cwlVersion: v1.0
1516 class: CommandLineTool
1517
1518 requirements:
1519 InlineJavascriptRequirement: {}
1520
1521 inputs:
1522 F:
1523 doc: only include reads with none of the bits set in INT set in FLAG
1524 [0]
1525 type: int?
1526 inputBinding:
1527 prefix: -F
1528 position: 1
1529 L:
1530 doc: FILE only include reads overlapping this BED FILE [null]
1531 type: File?
1532 inputBinding:
1533 prefix: -L
1534 position: 1
1535 S:
1536 doc: Input format autodetected
1537 type: boolean
1538 default: true
1539 inputBinding:
1540 prefix: -S
1541 position: 1
1542 b:
1543 doc: output BAM
1544 type: boolean?
1545 inputBinding:
1546 prefix: -b
1547 position: 1
1548 f:
1549 doc: only include reads with all bits set in INT set in FLAG [0]
1550 type: int?
1551 inputBinding:
1552 prefix: -f
1553 position: 1
1554 header:
1555 doc: Include header in output
1556 type: boolean?
1557 inputBinding:
1558 prefix: -h
1559 position: 1
1560 input_file:
1561 doc: File to be converted to BAM with samtools
1562 type: File
1563 inputBinding:
1564 position: 2
1565 nthreads:
1566 doc: Number of threads used
1567 type: int
1568 default: 1
1569 inputBinding:
1570 prefix: -@
1571 position: 1
1572 outfile_name:
1573 doc: |-
1574 Output file name. If not specified, the basename of the input file with the suffix specified in the suffix argument will be used.
1575 type: string?
1576 q:
1577 doc: only include reads with mapping quality >= INT [0]
1578 type: int?
1579 inputBinding:
1580 prefix: -q
1581 position: 1
1582 suffix:
1583 doc: suffix of the transformed SAM/BAM file (including extension,
1584 e.g. .filtered.sam)
1585 type: string?
1586 u:
1587 doc: uncompressed BAM output (implies -b)
1588 type: boolean
1589 default: true
1590 inputBinding:
1591 prefix: -u
1592 position: 1
1593
1594 outputs:
1595 outfile:
1596 doc: Aligned file in SAM or BAM format
1597 type: File
1598 outputBinding:
1599 glob: |
1600 ${
1601 if (inputs.outfile_name) return inputs.outfile_name;
1602 var suffix = inputs.b ? '.bam' : '.sam';
1603 suffix = inputs.suffix || suffix;
1604 return inputs.input_file.path.replace(/^.*[\\\/]/, '').replace(/\.[^/.]+$/, '') + suffix
1605 }
1606 stdout: |
1607 ${
1608 if (inputs.outfile_name) return inputs.outfile_name;
1609 var suffix = inputs.b ? '.bam' : '.sam';
1610 suffix = inputs.suffix || suffix;
1611 return inputs.input_file.path.replace(/^.*[\\\/]/, '').replace(/\.[^/.]+$/, '') + suffix
1612 }
1613
1614 baseCommand:
1615 - samtools
1616 - view
1617
1618 hints:
1619 DockerRequirement:
1620 dockerPull: dukegcb/samtools:1.3
1621 out:
1622 - outfile
1623 sam2bam:
1624 in:
1625 input_file: bowtie-se/output_aligned_file
1626 nthreads: nthreads
1627 scatter: input_file
1628 run:
1629 cwlVersion: v1.0
1630 class: CommandLineTool
1631
1632 requirements:
1633 InlineJavascriptRequirement: {}
1634
1635 inputs:
1636 S:
1637 doc: Input format autodetected
1638 type: boolean
1639 default: true
1640 inputBinding:
1641 prefix: -S
1642 position: 1
1643 input_file:
1644 doc: File to be converted to BAM with samtools
1645 type: File
1646 inputBinding:
1647 position: 2
1648 nthreads:
1649 doc: Number of threads used
1650 type: int
1651 default: 1
1652 inputBinding:
1653 prefix: -@
1654 position: 1
1655
1656 outputs:
1657 bam_file:
1658 doc: Aligned file in BAM format
1659 type: File
1660 outputBinding:
1661 glob: |-
1662 $(inputs.input_file.path.replace(/^.*[\\\/]/, '').replace(/\.[^/.]+$/, '') + '.bam')
1663 stdout: |-
1664 $(inputs.input_file.path.replace(/^.*[\\\/]/, '').replace(/\.[^/.]+$/, '') + '.bam')
1665
1666 baseCommand:
1667 - samtools
1668 - view
1669 - -b
1670
1671 hints:
1672 DockerRequirement:
1673 dockerPull: dukegcb/samtools:1.3
1674 out:
1675 - bam_file
1676 sort_bams:
1677 in:
1678 input_file: sam2bam/bam_file
1679 nthreads: nthreads
1680 scatter: input_file
1681 run:
1682 cwlVersion: v1.0
1683 class: CommandLineTool
1684
1685 requirements:
1686 InlineJavascriptRequirement: {}
1687
1688 inputs:
1689 input_file:
1690 doc: Aligned file to be sorted with samtools
1691 type: File
1692 inputBinding:
1693 position: 1000
1694 n:
1695 doc: Sort by read name
1696 type: boolean
1697 default: false
1698 inputBinding:
1699 prefix: -n
1700 position: 1
1701 nthreads:
1702 doc: Number of threads used in sorting
1703 type: int
1704 default: 1
1705 inputBinding:
1706 prefix: -@
1707 position: 1
1708 suffix:
1709 doc: suffix of the transformed SAM/BAM file (including extension,
1710 e.g. .filtered.sam)
1711 type: string
1712 default: .sorted.bam
1713
1714 outputs:
1715 sorted_file:
1716 doc: Sorted aligned file
1717 type: File
1718 outputBinding:
1719 glob: |-
1720 $(inputs.input_file.path.replace(/^.*[\\\/]/, '').replace(/\.[^/.]+$/, '') + inputs.suffix)
1721 stdout: |-
1722 $(inputs.input_file.path.replace(/^.*[\\\/]/, '').replace(/\.[^/.]+$/, '') + inputs.suffix)
1723
1724 baseCommand:
1725 - samtools
1726 - sort
1727
1728 hints:
1729 DockerRequirement:
1730 dockerPull: dukegcb/samtools:1.3
1731 out:
1732 - sorted_file
1733 sort_dedup_bams:
1734 in:
1735 input_file: remove_duplicates/outfile
1736 nthreads: nthreads
1737 scatter:
1738 - input_file
1739 run:
1740 cwlVersion: v1.0
1741 class: CommandLineTool
1742
1743 requirements:
1744 InlineJavascriptRequirement: {}
1745
1746 inputs:
1747 input_file:
1748 doc: Aligned file to be sorted with samtools
1749 type: File
1750 inputBinding:
1751 position: 1000
1752 n:
1753 doc: Sort by read name
1754 type: boolean
1755 default: false
1756 inputBinding:
1757 prefix: -n
1758 position: 1
1759 nthreads:
1760 doc: Number of threads used in sorting
1761 type: int
1762 default: 1
1763 inputBinding:
1764 prefix: -@
1765 position: 1
1766 suffix:
1767 doc: suffix of the transformed SAM/BAM file (including extension,
1768 e.g. .filtered.sam)
1769 type: string
1770 default: .sorted.bam
1771
1772 outputs:
1773 sorted_file:
1774 doc: Sorted aligned file
1775 type: File
1776 outputBinding:
1777 glob: |-
1778 $(inputs.input_file.path.replace(/^.*[\\\/]/, '').replace(/\.[^/.]+$/, '') + inputs.suffix)
1779 stdout: |-
1780 $(inputs.input_file.path.replace(/^.*[\\\/]/, '').replace(/\.[^/.]+$/, '') + inputs.suffix)
1781
1782 baseCommand:
1783 - samtools
1784 - sort
1785
1786 hints:
1787 DockerRequirement:
1788 dockerPull: dukegcb/samtools:1.3
1789 out:
1790 - sorted_file
1791 sort_dups_marked_bams:
1792 in:
1793 input_file: mark_duplicates/output_dedup_bam_file
1794 nthreads: nthreads
1795 suffix:
1796 valueFrom: .dups_marked.bam
1797 scatter:
1798 - input_file
1799 run:
1800 cwlVersion: v1.0
1801 class: CommandLineTool
1802
1803 requirements:
1804 InlineJavascriptRequirement: {}
1805
1806 inputs:
1807 input_file:
1808 doc: Aligned file to be sorted with samtools
1809 type: File
1810 inputBinding:
1811 position: 1000
1812 n:
1813 doc: Sort by read name
1814 type: boolean
1815 default: false
1816 inputBinding:
1817 prefix: -n
1818 position: 1
1819 nthreads:
1820 doc: Number of threads used in sorting
1821 type: int
1822 default: 1
1823 inputBinding:
1824 prefix: -@
1825 position: 1
1826 suffix:
1827 doc: suffix of the transformed SAM/BAM file (including extension,
1828 e.g. .filtered.sam)
1829 type: string
1830 default: .sorted.bam
1831
1832 outputs:
1833 sorted_file:
1834 doc: Sorted aligned file
1835 type: File
1836 outputBinding:
1837 glob: |-
1838 $(inputs.input_file.path.replace(/^.*[\\\/]/, '').replace(/\.[^/.]+$/, '') + inputs.suffix)
1839 stdout: |-
1840 $(inputs.input_file.path.replace(/^.*[\\\/]/, '').replace(/\.[^/.]+$/, '') + inputs.suffix)
1841
1842 baseCommand:
1843 - samtools
1844 - sort
1845
1846 hints:
1847 DockerRequirement:
1848 dockerPull: dukegcb/samtools:1.3
1849 out:
1850 - sorted_file
1851 out:
1852 - output_data_sorted_dedup_bam_files
1853 - output_data_sorted_dups_marked_bam_files
1854 - output_picard_mark_duplicates_files
1855 - output_pbc_files
1856 - output_bowtie_log
1857 - output_preseq_c_curve_files
1858 - output_percentage_uniq_reads
1859 - output_read_count_mapped
1860 - output_percent_mitochondrial_reads
1861 peak_call:
1862 in:
1863 as_narrowPeak_file: as_narrowPeak_file
1864 genome_effective_size: genome_effective_size
1865 input_bam_files: map/output_data_sorted_dedup_bam_files
1866 input_bam_format:
1867 valueFrom: BAM
1868 input_genome_sizes: genome_sizes_file
1869 nthreads: nthreads_peakcall
1870 run:
1871 cwlVersion: v1.0
1872 class: Workflow
1873 doc: ATAC-seq 04 quantification - SE
1874
1875 requirements:
1876 - class: ScatterFeatureRequirement
1877 - class: StepInputExpressionRequirement
1878 - class: InlineJavascriptRequirement
1879
1880 inputs:
1881 as_narrowPeak_file:
1882 doc: Definition narrowPeak file in AutoSql format (used in bedToBigBed)
1883 type: File
1884 genome_effective_size:
1885 doc: |-
1886 Effective genome size used by MACS2. It can be numeric or a shortcuts:'hs' for human (2.7e9), 'mm' for mouse (1.87e9), 'ce' for C. elegans (9e7) and 'dm' for fruitfly (1.2e8), Default:hs
1887 type: string
1888 default: hs
1889 input_bam_files:
1890 type: File[]
1891 input_genome_sizes:
1892 doc: Two column tab-delimited file with chromosome size information
1893 type: File
1894 nthreads:
1895 type: int
1896 default: 1
1897
1898 outputs:
1899 output_extended_peak_file:
1900 doc: peakshift/phantomPeak extended fragment results file
1901 type: File[]
1902 outputSource: peak-calling/output_ext_frag_bdg_file
1903 output_filtered_read_count_file:
1904 doc: Filtered read count reported by MACS2
1905 type: File[]
1906 outputSource: count-reads-filtered/read_count_file
1907 output_peak_bigbed_file:
1908 doc: Peaks in bigBed format
1909 type: File[]
1910 outputSource: peaks-bed-to-bigbed/bigbed
1911 output_peak_count_within_replicate:
1912 doc: Peak counts within replicate
1913 type: File[]
1914 outputSource: count-peaks/output_counts
1915 output_peak_file:
1916 doc: peakshift/phantomPeak results file
1917 type: File[]
1918 outputSource: peak-calling/output_peak_file
1919 output_peak_summits_file:
1920 doc: File containing peak summits
1921 type: File[]
1922 outputSource: peak-calling/output_peak_summits_file
1923 output_peak_xls_file:
1924 doc: Peak calling report file (*_peaks.xls file produced by MACS2)
1925 type: File[]
1926 outputSource: peak-calling/output_peak_xls_file
1927 output_read_in_peak_count_within_replicate:
1928 doc: Reads peak counts within replicate
1929 type: File[]
1930 outputSource: extract-count-reads-in-peaks/output_read_count
1931 output_spp_cross_corr_plot:
1932 doc: peakshift/phantomPeak results file
1933 type: File[]
1934 outputSource: spp/output_spp_cross_corr_plot
1935 output_spp_x_cross_corr:
1936 doc: peakshift/phantomPeak results file
1937 type: File[]
1938 outputSource: spp/output_spp_cross_corr
1939
1940 steps:
1941 count-peaks:
1942 in:
1943 input_file: peak-calling/output_peak_file
1944 output_suffix:
1945 valueFrom: .peak_count.within_replicate.txt
1946 scatter: input_file
1947 run:
1948 cwlVersion: v1.0
1949 class: CommandLineTool
1950 doc: Counts lines in a file and returns a suffixed file with that number
1951
1952 requirements:
1953 InlineJavascriptRequirement: {}
1954
1955 inputs:
1956 input_file:
1957 type: File
1958 output_suffix:
1959 type: string
1960 default: .count
1961
1962 outputs:
1963 output_counts:
1964 type: File
1965 outputBinding:
1966 glob: $(inputs.input_file.path.replace(/^.*[\\\/]/, '') + inputs.output_suffix)
1967 stdout: $(inputs.input_file.path.replace(/^.*[\\\/]/, '') + inputs.output_suffix)
1968
1969 baseCommand:
1970 - wc
1971 - -l
1972 stdin: $(inputs.input_file.path)
1973 out:
1974 - output_counts
1975 count-reads-filtered:
1976 in:
1977 peak_xls_file: peak-calling/output_peak_xls_file
1978 scatter: peak_xls_file
1979 run:
1980 cwlVersion: v1.0
1981 class: CommandLineTool
1982 doc: Count number of dedup-ed reads used in peak calling
1983
1984 requirements:
1985 InlineJavascriptRequirement: {}
1986
1987 inputs:
1988 peak_xls_file:
1989 type: File
1990 inputBinding:
1991 position: 1
1992
1993 outputs:
1994 read_count_file:
1995 type: File
1996 outputBinding:
1997 glob: |-
1998 $(inputs.peak_xls_file.path.replace(/^.*[\\\/]/, '').replace(/\_peaks\.xls$/, '_read_count.txt'))
1999 stdout: |-
2000 $(inputs.peak_xls_file.path.replace(/^.*[\\\/]/, '').replace(/\_peaks\.xls$/, '_read_count.txt'))
2001
2002 baseCommand: count-filtered-reads-macs2.sh
2003
2004 hints:
2005 DockerRequirement:
2006 dockerPull: reddylab/workflow-utils:ggr
2007 out:
2008 - read_count_file
2009 extract-count-reads-in-peaks:
2010 in:
2011 input_bam_file: filter-reads-in-peaks/filtered_file
2012 output_suffix:
2013 valueFrom: .read_count.within_replicate.txt
2014 scatter: input_bam_file
2015 run:
2016 cwlVersion: v1.0
2017 class: CommandLineTool
2018 doc: Extract mapped reads from BAM file using Samtools flagstat command
2019
2020 requirements:
2021 InlineJavascriptRequirement: {}
2022 ShellCommandRequirement: {}
2023
2024 inputs:
2025 input_bam_file:
2026 doc: Aligned BAM file to filter
2027 type: File
2028 inputBinding:
2029 position: 1
2030 output_suffix:
2031 type: string
2032
2033 outputs:
2034 output_read_count:
2035 doc: Samtools Flagstat report file
2036 type: File
2037 outputBinding:
2038 glob: |-
2039 $(inputs.input_bam_file.path.replace(/^.*[\\\/]/, '').replace(/\.[^/.]+$/, "") + inputs.output_suffix)
2040 stdout: |-
2041 $(inputs.input_bam_file.path.replace(/^.*[\\\/]/, '').replace(/\.[^/.]+$/, "") + inputs.output_suffix)
2042
2043 baseCommand:
2044 - samtools
2045 - flagstat
2046 arguments:
2047 - position: 10000
2048 valueFrom: " | head -n1 | cut -f 1 -d ' '"
2049 shellQuote: false
2050
2051 hints:
2052 DockerRequirement:
2053 dockerPull: dukegcb/samtools
2054 out:
2055 - output_read_count
2056 extract-peak-frag-length:
2057 in:
2058 input_spp_txt_file: spp/output_spp_cross_corr
2059 scatter: input_spp_txt_file
2060 run:
2061 cwlVersion: v1.0
2062 class: CommandLineTool
2063 doc: Extracts best fragment length from SPP output text file
2064
2065 inputs:
2066 input_spp_txt_file:
2067 type: File
2068 inputBinding:
2069 position: 1
2070
2071 outputs:
2072 output_best_frag_length:
2073 type: float
2074 outputBinding:
2075 glob: best_frag_length
2076 outputEval: $(Number(self[0].contents.replace('\n', '')))
2077 loadContents: true
2078 stdout: best_frag_length
2079
2080 baseCommand: extract-best-frag-length.sh
2081
2082 hints:
2083 DockerRequirement:
2084 dockerPull: reddylab/workflow-utils:ggr
2085 out:
2086 - output_best_frag_length
2087 filter-reads-in-peaks:
2088 in:
2089 input_bam_file: input_bam_files
2090 input_bedfile: peak-calling/output_peak_file
2091 scatter:
2092 - input_bam_file
2093 - input_bedfile
2094 scatterMethod: dotproduct
2095 run:
2096 cwlVersion: v1.0
2097 class: CommandLineTool
2098 doc: Filter BAM file to only include reads overlapping with a BED file
2099
2100 requirements:
2101 InlineJavascriptRequirement: {}
2102
2103 inputs:
2104 input_bam_file:
2105 doc: Aligned BAM file to filter
2106 type: File
2107 inputBinding:
2108 position: 3
2109 input_bedfile:
2110 doc: Bedfile used to only include reads overlapping this BED FILE
2111 type: File
2112 inputBinding:
2113 prefix: -L
2114 position: 2
2115
2116 outputs:
2117 filtered_file:
2118 doc: Filtered aligned BAM file by BED coordinates file
2119 type: File
2120 outputBinding:
2121 glob: $(inputs.input_bam_file.path.replace(/^.*[\\\/]/, '') + '.in_peaks.bam')
2122 stdout: $(inputs.input_bam_file.path.replace(/^.*[\\\/]/, '') + '.in_peaks.bam')
2123
2124 baseCommand:
2125 - samtools
2126 - view
2127 - -b
2128 - -h
2129
2130 hints:
2131 DockerRequirement:
2132 dockerPull: dukegcb/samtools:1.3
2133 out:
2134 - filtered_file
2135 peak-calling:
2136 in:
2137 format:
2138 valueFrom: BAM
2139 bdg:
2140 valueFrom: ${return true}
2141 extsize:
2142 valueFrom: ${return 200}
2143 g: genome_effective_size
2144 nomodel:
2145 valueFrom: ${return true}
2146 q:
2147 valueFrom: ${return 0.1}
2148 shift:
2149 valueFrom: ${return -100}
2150 treatment:
2151 valueFrom: $([self])
2152 source: input_bam_files
2153 scatter:
2154 - treatment
2155 scatterMethod: dotproduct
2156 run:
2157 cwlVersion: v1.0
2158 class: CommandLineTool
2159
2160 requirements:
2161 InlineJavascriptRequirement: {}
2162
2163 inputs:
2164 format:
2165 doc: |-
2166 -f {AUTO,BAM,SAM,BED,ELAND,ELANDMULTI,ELANDEXPORT,BOWTIE,BAMPE}, --format {AUTO,BAM,SAM,BED,ELAND,ELANDMULTI,ELANDEXPORT,BOWTIE,BAMPE} Format of tag file, "AUTO", "BED" or "ELAND" or "ELANDMULTI" or "ELANDEXPORT" or "SAM" or "BAM" or "BOWTIE" or "BAMPE". The default AUTO option will let MACS decide which format the file is. Note that MACS can't detect "BAMPE" or "BEDPE" format with "AUTO", and you have to implicitly specify the format for "BAMPE" and "BEDPE". DEFAULT: "AUTO".
2167 type: string?
2168 inputBinding:
2169 prefix: -f
2170 position: 1
2171 SPMR:
2172 doc: |-
2173 If True, MACS will save signal per million reads for fragment pileup profiles. Require --bdg to be set. Default: False
2174 type: boolean?
2175 inputBinding:
2176 prefix: --SPMR
2177 position: 1
2178 bdg:
2179 doc: |-
2180 Whether or not to save extended fragment pileup, and local lambda tracks (two files) at every bp into a bedGraph file. DEFAULT: True
2181 type: boolean?
2182 inputBinding:
2183 prefix: --bdg
2184 position: 1
2185 broad:
2186 doc: |-
2187 If set, MACS will try to call broad peaks by linking nearby highly enriched regions. The linking region is controlled by another cutoff through --linking-cutoff. The maximum linking region length is 4 times of d from MACS. DEFAULT: False
2188 type: boolean?
2189 inputBinding:
2190 prefix: --broad
2191 position: 1
2192 broad-cutoff:
2193 doc: |
2194 BROADCUTOFF
2195 Cutoff for broad region. This option is not available
2196 unless --broad is set. If -p is set, this is a pvalue
2197 cutoff, otherwise, it's a qvalue cutoff. DEFAULT: 0.1
2198 type: float?
2199 inputBinding:
2200 prefix: --broad-cutoff
2201 position: 1
2202 buffer-size:
2203 doc: |
2204 BUFFER_SIZE
2205 Buffer size for incrementally increasing internal
2206 array size to store reads alignment information. In
2207 most cases, you don't have to change this parameter.
2208 However, if there are large number of
2209 chromosomes/contigs/scaffolds in your alignment, it's
2210 recommended to specify a smaller buffer size in order
2211 to decrease memory usage (but it will take longer time
2212 to read alignment files). Minimum memory requested for
2213 reading an alignment file is about # of CHROMOSOME *
2214 BUFFER_SIZE * 2 Bytes. DEFAULT: 100000
2215 type: int?
2216 inputBinding:
2217 prefix: --buffer-size
2218 position: 1
2219 bw:
2220 doc: |
2221 BW Band width for picking regions to compute fragment
2222 size. This value is only used while building the
2223 shifting model. DEFAULT: 300
2224 type: int?
2225 inputBinding:
2226 prefix: --bw
2227 position: 1
2228 call-summits:
2229 doc: |-
2230 If set, MACS will use a more sophisticated signal processing approach to find subpeak summits in each enriched peak region. DEFAULT: False
2231 type: boolean?
2232 inputBinding:
2233 prefix: --call-summits
2234 position: 1
2235 control:
2236 doc: Control sample file.
2237 type: File?
2238 inputBinding:
2239 prefix: --control
2240 position: 2
2241 cutoff-analysis:
2242 doc: |-
2243 While set, MACS2 will analyze number or total length of peaks that can be called by different p-value cutoff then output a summary table to help user decide a better cutoff. The table will be saved in NAME_cutoff_analysis.txt file. Note, minlen and maxgap may affect the results. WARNING: May take ~30 folds longer time to finish. DEFAULT: False Post-processing options:
2244 type: boolean?
2245 inputBinding:
2246 prefix: --cutoff-analysis
2247 position: 1
2248 down-sample:
2249 doc: |-
2250 When set, random sampling method will scale down the bigger sample. By default, MACS uses linear scaling. Warning: This option will make your result unstable and irreproducible since each time, random reads would be selected. Consider to use 'randsample' script instead. <not implmented>If used together with --SPMR, 1 million unique reads will be randomly picked.</not implemented> Caution: due to the implementation, the final number of selected reads may not be as you expected! DEFAULT: False
2251 type: boolean?
2252 inputBinding:
2253 prefix: --down-sample
2254 position: 1
2255 extsize:
2256 doc: |-
2257 The arbitrary extension size in bp. When nomodel is true, MACS will use this value as fragment size to extend each read towards 3' end, then pile them up. It's exactly twice the number of obsolete SHIFTSIZE. In previous language, each read is moved 5'->3' direction to middle of fragment by 1/2 d, then extended to both direction with 1/2 d. This is equivalent to say each read is extended towards 5'->3' into a d size fragment. DEFAULT: 200. EXTSIZE and SHIFT can be combined when necessary. Check SHIFT option.
2258 type: float?
2259 inputBinding:
2260 prefix: --extsize
2261 position: 1
2262 fe-cutoff:
2263 doc: |
2264 FECUTOFF When set, the value will be used to filter out peaks
2265 with low fold-enrichment. Note, MACS2 use 1.0 as
2266 pseudocount while calculating fold-enrichment.
2267 DEFAULT: 1.0
2268 type: float?
2269 inputBinding:
2270 prefix: --fe-cutoff
2271 position: 1
2272 fix-bimodal:
2273 doc: |-
2274 Whether turn on the auto pair model process. If set, when MACS failed to build paired model, it will use the nomodel settings, the --exsize parameter to extend each tags towards 3' direction. Not to use this automate fixation is a default behavior now. DEFAULT: False
2275 type: boolean?
2276 inputBinding:
2277 prefix: --fix-bimodal
2278 position: 1
2279 g:
2280 doc: |-
2281 Effective genome size. It can be 1.0e+9 or 1000000000, or shortcuts:'hs' for human (2.7e9), 'mm' for mouse (1.87e9), 'ce' for C. elegans (9e7) and 'dm' for fruitfly (1.2e8), Default:hs.
2282 type: string?
2283 inputBinding:
2284 prefix: -g
2285 position: 1
2286 keep-dup:
2287 doc: |
2288 KEEPDUPLICATES
2289 It controls the MACS behavior towards duplicate tags
2290 at the exact same location -- the same coordination
2291 and the same strand. The 'auto' option makes MACS
2292 calculate the maximum tags at the exact same location
2293 based on binomal distribution using 1e-5 as pvalue
2294 cutoff; and the 'all' option keeps every tags. If an
2295 integer is given, at most this number of tags will be
2296 kept at the same location. The default is to keep one
2297 tag at the same location. Default: 1
2298 type: string?
2299 inputBinding:
2300 prefix: --keep-dup
2301 position: 1
2302 llocal:
2303 doc: |
2304 LARGELOCAL The large nearby region in basepairs to calculate
2305 dynamic lambda. This is used to capture the surround
2306 bias. If you set this to 0, MACS will skip llocal
2307 lambda calculation. *Note* that MACS will always
2308 perform a d-size local lambda calculation. The final
2309 local bias should be the maximum of the lambda value
2310 from d, slocal, and llocal size windows. DEFAULT:
2311 10000.
2312 type: int?
2313 inputBinding:
2314 prefix: --llocal
2315 position: 1
2316 m:
2317 doc: |
2318 MFOLD MFOLD, --mfold MFOLD MFOLD
2319 Select the regions within MFOLD range of high-
2320 confidence enrichment ratio against background to
2321 build model. Fold-enrichment in regions must be lower
2322 than upper limit, and higher than the lower limit. Use
2323 as "-m 10 30". DEFAULT:5 50
2324 type: string?
2325 inputBinding:
2326 prefix: -m
2327 position: 1
2328 nolambda:
2329 doc: |-
2330 If True, MACS will use fixed background lambda as local lambda for every peak region. Normally, MACS calculates a dynamic local lambda to reflect the local bias due to potential chromatin structure.
2331 type: boolean?
2332 inputBinding:
2333 prefix: --nolambda
2334 position: 1
2335 nomodel:
2336 doc: |-
2337 Whether or not to build the shifting model. If True, MACS will not build model. by default it means shifting size = 100, try to set extsize to change it. DEFAULT: False
2338 type: boolean?
2339 inputBinding:
2340 prefix: --nomodel
2341 position: 1
2342 p:
2343 doc: |-
2344 Pvalue cutoff for peak detection. DEFAULT: not set. -q, and -p are mutually exclusive. If pvalue cutoff is set, qvalue will not be calculated and reported as -1 in the final .xls file..
2345 type: float?
2346 inputBinding:
2347 prefix: -p
2348 position: 1
2349 q:
2350 doc: |-
2351 Minimum FDR (q-value) cutoff for peak detection. DEFAULT: 0.05. -q, and -p are mutually exclusive.
2352 type: float?
2353 inputBinding:
2354 prefix: -q
2355 position: 1
2356 ratio:
2357 doc: |
2358 RATIO When set, use a custom scaling ratio of ChIP/control
2359 (e.g. calculated using NCIS) for linear scaling.
2360 DEFAULT: ingore
2361 type: float?
2362 inputBinding:
2363 prefix: --ratio
2364 position: 1
2365 s:
2366 doc: |
2367 TSIZE, --tsize TSIZE
2368 Tag size. This will overide the auto detected tag
2369 size. DEFAULT: Not set
2370 type: int?
2371 inputBinding:
2372 prefix: -s
2373 position: 1
2374 seed:
2375 doc: |
2376 SEED Set the random seed while down sampling data. Must be
2377 a non-negative integer in order to be effective.
2378 DEFAULT: not set
2379 type: int?
2380 inputBinding:
2381 prefix: --seed
2382 position: 1
2383 shift:
2384 doc: |-
2385 (NOT the legacy --shiftsize option!) The arbitrary shift in bp. Use discretion while setting it other than default value. When NOMODEL is set, MACS will use this value to move cutting ends (5') towards 5'->3' direction then apply EXTSIZE to extend them to fragments. When this value is negative, ends will be moved toward 3'->5' direction. Recommended to keep it as default 0 for ChIP-Seq datasets, or -1 * half of EXTSIZE together with EXTSIZE option for detecting enriched cutting loci such as certain DNAseI-Seq datasets. Note, you can't set values other than 0 if format is BAMPE for paired-end data. DEFAULT: 0.
2386 type: int?
2387 inputBinding:
2388 prefix: --shift
2389 position: 1
2390 slocal:
2391 doc: |
2392 SMALLLOCAL The small nearby region in basepairs to calculate
2393 dynamic lambda. This is used to capture the bias near
2394 the peak summit region. Invalid if there is no control
2395 data. If you set this to 0, MACS will skip slocal
2396 lambda calculation. *Note* that MACS will always
2397 perform a d-size local lambda calculation. The final
2398 local bias should be the maximum of the lambda value
2399 from d, slocal, and llocal size windows. DEFAULT: 1000
2400 type: int?
2401 inputBinding:
2402 prefix: --slocal
2403 position: 1
2404 to-large:
2405 doc: |-
2406 When set, scale the small sample up to the bigger sample. By default, the bigger dataset will be scaled down towards the smaller dataset, which will lead to smaller p/qvalues and more specific results. Keep in mind that scaling down will bring down background noise more. DEFAULT: False
2407 type: boolean?
2408 inputBinding:
2409 prefix: --to-large
2410 position: 1
2411 trackline:
2412 doc: |-
2413 Tells MACS to include trackline with bedGraph files. To include this trackline while displaying bedGraph at UCSC genome browser, can show name and description of the file as well. However my suggestion is to convert bedGraph to bigWig, then show the smaller and faster binary bigWig file at UCSC genome browser, as well as downstream analysis. Require --bdg to be set. Default: Not include trackline.
2414 type: boolean?
2415 inputBinding:
2416 prefix: --trackline
2417 position: 1
2418 treatment:
2419 doc: |-
2420 Treatment sample file(s). If multiple files are given as -t A B C, then they will all be read and pooled together. IMPORTANT: the first sample will be used as the outputs basename.
2421 type: File[]
2422 inputBinding:
2423 prefix: --treatment
2424 position: 2
2425 verbose:
2426 doc: |
2427 VERBOSE_LEVEL Set verbose level of runtime message. 0: only show
2428 critical message, 1: show additional warning message,
2429 2: show process information, 3: show debug messages.
2430 DEFAULT:2
2431 type: int?
2432 inputBinding:
2433 prefix: --verbose
2434 position: 1
2435
2436 outputs:
2437 output_ext_frag_bdg_file:
2438 doc: Bedgraph with extended fragment pileup.
2439 type: File?
2440 outputBinding:
2441 glob: |-
2442 $(inputs.treatment[0].path.replace(/^.*[\\\/]/, '').replace(/\.[^/.]+$/, '') + '_treat_pileup.bdg')
2443 output_peak_file:
2444 doc: Peak calling output file in narrowPeak|broadPeak format.
2445 type: File
2446 outputBinding:
2447 glob: |-
2448 $(inputs.treatment[0].path.replace(/^.*[\\\/]/, '').replace(/\.[^/.]+$/, '') + '_peaks.*Peak')
2449 outputEval: $(self[0])
2450 output_peak_summits_file:
2451 doc: Peaks summits bedfile.
2452 type: File?
2453 outputBinding:
2454 glob: |-
2455 $(inputs.treatment[0].path.replace(/^.*[\\\/]/, '').replace(/\.[^/.]+$/, '') + '_summits.bed')
2456 output_peak_xls_file:
2457 doc: Peaks information/report file.
2458 type: File
2459 outputBinding:
2460 glob: |-
2461 $(inputs.treatment[0].path.replace(/^.*[\\\/]/, '').replace(/\.[^/.]+$/, '') + '_peaks.xls')
2462
2463 baseCommand:
2464 - macs2
2465 - callpeak
2466 arguments:
2467 - prefix: -n
2468 position: 1
2469 valueFrom: $(inputs.treatment[0].path.replace(/^.*[\\\/]/, '').replace(/\.[^/.]+$/,
2470 ''))
2471
2472 hints:
2473 DockerRequirement:
2474 dockerPull: dukegcb/macs2
2475 out:
2476 - output_peak_file
2477 - output_peak_summits_file
2478 - output_ext_frag_bdg_file
2479 - output_peak_xls_file
2480 peaks-bed-to-bigbed:
2481 in:
2482 type:
2483 valueFrom: bed6+4
2484 as: as_narrowPeak_file
2485 bed: trunk-peak-score/trunked_scores_peaks
2486 genome_sizes: input_genome_sizes
2487 scatter: bed
2488 run:
2489 cwlVersion: v1.0
2490 class: CommandLineTool
2491 doc: |
2492 "bedToBigBed v. 2.7 - Convert bed file to bigBed. (BigBed version: 4)
2493 usage:
2494 bedToBigBed in.bed chrom.sizes out.bb
2495 Where in.bed is in one of the ascii bed formats, but not including track lines
2496 and chrom.sizes is two column: <chromosome name> <size in bases>
2497 and out.bb is the output indexed big bed file.
2498 Use the script: fetchChromSizes to obtain the actual chrom.sizes information
2499 from UCSC, please do not make up a chrom sizes from your own information.
2500 The in.bed file must be sorted by chromosome,start,
2501 to sort a bed file, use the unix sort command:
2502 sort -k1,1 -k2,2n unsorted.bed > sorted.bed"
2503
2504 requirements:
2505 InlineJavascriptRequirement: {}
2506
2507 inputs:
2508 type:
2509 doc: |
2510 -type=bedN[+[P]] :
2511 N is between 3 and 15,
2512 optional (+) if extra "bedPlus" fields,
2513 optional P specifies the number of extra fields. Not required, but preferred.
2514 Examples: -type=bed6 or -type=bed6+ or -type=bed6+3
2515 (see http://genome.ucsc.edu/FAQ/FAQformat.html#format1)
2516 type: string?
2517 inputBinding:
2518 prefix: -type=
2519 position: 1
2520 separate: false
2521 as:
2522 doc: |
2523 -as=fields.as - If you have non-standard "bedPlus" fields, it's great to put a definition
2524 of each field in a row in AutoSql format here.1)
2525 type: File?
2526 inputBinding:
2527 prefix: -as=
2528 position: 1
2529 separate: false
2530 bed:
2531 doc: Input bed file
2532 type: File
2533 inputBinding:
2534 position: 2
2535 blockSize:
2536 doc: "-blockSize=N - Number of items to bundle in r-tree. Default\
2537 \ 256\n"
2538 type: int?
2539 inputBinding:
2540 prefix: -blockSize=
2541 position: 1
2542 separate: false
2543 extraIndex:
2544 doc: |
2545 -extraIndex=fieldList - If set, make an index on each field in a comma separated list
2546 extraIndex=name and extraIndex=name,id are commonly used.
2547 type:
2548 - 'null'
2549 - type: array
2550 items: string
2551 inputBinding:
2552 prefix: -extraIndex=
2553 position: 1
2554 itemSeparator: ','
2555 genome_sizes:
2556 doc: "genome_sizes is two column: <chromosome name> <size in bases>.\n"
2557 type: File
2558 inputBinding:
2559 position: 3
2560 itemsPerSlot:
2561 doc: "-itemsPerSlot=N - Number of data points bundled at lowest level.\
2562 \ Default 512\n"
2563 type: int?
2564 inputBinding:
2565 prefix: -itemsPerSlot=
2566 position: 1
2567 separate: false
2568 output_suffix:
2569 type: string
2570 default: .bb
2571 tab:
2572 doc: |
2573 -tab - If set, expect fields to be tab separated, normally expects white space separator.
2574 type: boolean?
2575 inputBinding:
2576 position: 1
2577 unc:
2578 doc: "-unc - If set, do not use compression.\n"
2579 type: boolean?
2580 inputBinding:
2581 position: 1
2582
2583 outputs:
2584 bigbed:
2585 type: File
2586 outputBinding:
2587 glob: $(inputs.bed.path.replace(/^.*[\\\/]/, '')+ inputs.output_suffix)
2588
2589 baseCommand: bedToBigBed
2590 arguments:
2591 - position: 4
2592 valueFrom: $(inputs.bed.path.replace(/^.*[\\\/]/, '') + inputs.output_suffix)
2593
2594 hints:
2595 DockerRequirement:
2596 dockerPull: dleehr/docker-hubutils
2597 out:
2598 - bigbed
2599 spp:
2600 in:
2601 input_bam: input_bam_files
2602 nthreads: nthreads
2603 savp:
2604 valueFrom: ${return true}
2605 scatter:
2606 - input_bam
2607 scatterMethod: dotproduct
2608 run:
2609 cwlVersion: v1.0
2610 class: CommandLineTool
2611
2612 requirements:
2613 InlineJavascriptRequirement: {}
2614 ShellCommandRequirement: {}
2615
2616 inputs:
2617 control_bam:
2618 doc: |-
2619 <Input_alignFile>, full path and name (or URL) of tagAlign/BAM file (can be gzipped) (FILE EXTENSION MUST BE tagAlign.gz, tagAlign, bam or bam.gz)
2620 type: File?
2621 inputBinding:
2622 prefix: -i=
2623 separate: false
2624 fdr:
2625 doc: -fdr=<falseDisoveryRate> , false discovery rate threshold for
2626 peak calling
2627 type: float?
2628 inputBinding:
2629 prefix: -fdr=
2630 separate: false
2631 filtchr:
2632 doc: |-
2633 -filtchr=<chrnamePattern> , Pattern to use to remove tags that map to specific chromosomes e.g. _ will remove all tags that map to chromosomes with _ in their name
2634 type: string?
2635 inputBinding:
2636 prefix: -filtchr=
2637 separate: false
2638 input_bam:
2639 doc: |-
2640 <ChIP_alignFile>, full path and name (or URL) of tagAlign/BAM file (can be gzipped)(FILE EXTENSION MUST BE tagAlign.gz, tagAlign, bam or bam.gz)
2641 type: File
2642 inputBinding:
2643 prefix: -c=
2644 separate: false
2645 npeak:
2646 doc: -npeak=<numPeaks>, threshold on number of peaks to call
2647 type: int?
2648 inputBinding:
2649 prefix: -npeak=
2650 separate: false
2651 nthreads:
2652 doc: -p=<nodes> , number of parallel processing nodes, default=0
2653 type: int?
2654 inputBinding:
2655 prefix: -p=
2656 separate: false
2657 rf:
2658 doc: 'overwrite (force remove) output files in case they exist. Default:
2659 true'
2660 type: boolean
2661 default: true
2662 inputBinding:
2663 prefix: -rf
2664 s:
2665 doc: |-
2666 -s=<min>:<step>:<max> , strand shifts at which cross-correlation is evaluated, default=-500:5:1500
2667 type: string?
2668 inputBinding:
2669 prefix: -s=
2670 separate: false
2671 savd:
2672 doc: -savd=<rdatafile> OR -savd, save Rdata file
2673 type: boolean?
2674 inputBinding:
2675 valueFrom: |-
2676 ${ if (self) return "-savd=" + inputs.input_bam.path.replace(/^.*[\\\/]/, "").replace(/\.[^/.]+$/, "") + ".spp.Rdata"; return null}
2677 savn:
2678 doc: -savn=<narrowpeakfilename> OR -savn NarrowPeak file name (fixed
2679 width peaks)
2680 type: boolean?
2681 inputBinding:
2682 valueFrom: |-
2683 ${ if (self) return "-savn=" + inputs.input_bam.path.replace(/^.*[\\\/]/, "").replace(/\.[^/.]+$/, "") + ".spp.narrowPeak"; return null}
2684 savp:
2685 doc: save cross-correlation plot
2686 type: boolean?
2687 inputBinding:
2688 valueFrom: |-
2689 ${ if (self) return "-savp=" + inputs.input_bam.path.replace(/^.*[\\\/]/, "").replace(/\.[^/.]+$/, "") + ".spp_cross_corr.pdf"; return null}
2690 savr:
2691 doc: |-
2692 -savr=<regionpeakfilename> OR -savr RegionPeak file name (variable width peaks with regions of enrichment)
2693 type: boolean?
2694 inputBinding:
2695 valueFrom: |-
2696 ${ if (self) return "-savr=" + inputs.input_bam.path.replace(/^.*[\\\/]/, "").replace(/\.[^/.]+$/, "") + ".spp.regionPeak"; return null}
2697 speak:
2698 doc: -speak=<strPeak>, user-defined cross-correlation peak strandshift
2699 type: string?
2700 inputBinding:
2701 prefix: -speak=
2702 separate: false
2703 x:
2704 doc: |-
2705 -x=<min>:<max>, strand shifts to exclude (This is mainly to avoid region around phantom peak) default=10:(readlen+10)
2706 type: string?
2707 inputBinding:
2708 prefix: -x=
2709 separate: false
2710
2711 outputs:
2712 output_spp_cross_corr:
2713 doc: peakshift/phantomPeak results summary file
2714 type: File
2715 outputBinding:
2716 glob: |-
2717 $(inputs.input_bam.path.replace(/^.*[\\\/]/, "").replace(/\.[^/.]+$/, "") + ".spp_cross_corr.txt")
2718 output_spp_cross_corr_plot:
2719 doc: peakshift/phantomPeak results summary plot
2720 type: File?
2721 outputBinding:
2722 glob: |-
2723 $(inputs.input_bam.path.replace(/^.*[\\\/]/, "").replace(/\.[^/.]+$/, "") + ".spp_cross_corr.pdf")
2724 output_spp_narrow_peak:
2725 doc: narrowPeak output file
2726 type: File?
2727 outputBinding:
2728 glob: |-
2729 $(inputs.input_bam.path.replace(/^.*[\\\/]/, "").replace(/\.[^/.]+$/, "") + ".spp.narrowPeak")
2730 output_spp_rdata:
2731 doc: Rdata file from the run_spp.R run
2732 type: File?
2733 outputBinding:
2734 glob: |-
2735 $(inputs.input_bam.path.replace(/^.*[\\\/]/, "").replace(/\.[^/.]+$/, "") + ".spp.Rdata")
2736 output_spp_region_peak:
2737 doc: regionPeak output file
2738 type: File?
2739 outputBinding:
2740 glob: |-
2741 $(inputs.input_bam.path.replace(/^.*[\\\/]/, "").replace(/\.[^/.]+$/, "") + ".spp.regionPeak")
2742
2743 baseCommand: run_spp.R
2744 arguments:
2745 - valueFrom: |-
2746 $("-out=" + inputs.input_bam.path.replace(/^.*[\\\/]/, "").replace(/\.[^/.]+$/, "") + ".spp_cross_corr.txt")
2747 - valueFrom: $("-tmpdir="+runtime.tmpdir)
2748 shellQuote: false
2749
2750 hints:
2751 DockerRequirement:
2752 dockerPull: dukegcb/spp
2753 out:
2754 - output_spp_cross_corr
2755 - output_spp_cross_corr_plot
2756 trunk-peak-score:
2757 in:
2758 peaks: peak-calling/output_peak_file
2759 scatter: peaks
2760 run:
2761 cwlVersion: v1.0
2762 class: CommandLineTool
2763 doc: Trunk scores in ENCODE bed6+4 files
2764
2765 inputs:
2766 peaks:
2767 type: File
2768 inputBinding:
2769 position: 10000
2770 sep:
2771 type: string
2772 default: \t
2773 inputBinding:
2774 prefix: -F
2775 position: 2
2776
2777 outputs:
2778 trunked_scores_peaks:
2779 type: File
2780 outputBinding:
2781 glob: |-
2782 $(inputs.peaks.path.replace(/^.*[\\\/]/, '').replace(/\.([^/.]+)$/, "\.trunked_scores\.$1"))
2783 stdout: |-
2784 $(inputs.peaks.path.replace(/^.*[\\\/]/, '').replace(/\.([^/.]+)$/, "\.trunked_scores\.$1"))
2785
2786 baseCommand: awk
2787 arguments:
2788 - position: 3
2789 valueFrom: BEGIN{OFS=FS}$5>1000{$5=1000}{print}
2790
2791 hints:
2792 DockerRequirement:
2793 dockerPull: reddylab/workflow-utils:ggr
2794 out:
2795 - trunked_scores_peaks
2796 out:
2797 - output_spp_x_cross_corr
2798 - output_spp_cross_corr_plot
2799 - output_read_in_peak_count_within_replicate
2800 - output_peak_file
2801 - output_peak_bigbed_file
2802 - output_peak_summits_file
2803 - output_extended_peak_file
2804 - output_peak_xls_file
2805 - output_filtered_read_count_file
2806 - output_peak_count_within_replicate
2807 qc:
2808 in:
2809 default_adapters_file: default_adapters_file
2810 input_fastq_files: input_fastq_files
2811 nthreads: nthreads_qc
2812 run:
2813 cwlVersion: v1.0
2814 class: Workflow
2815 doc: 'ATAC-seq 01 QC - reads: SE'
2816
2817 requirements:
2818 - class: ScatterFeatureRequirement
2819 - class: StepInputExpressionRequirement
2820 - class: InlineJavascriptRequirement
2821
2822 inputs:
2823 default_adapters_file:
2824 doc: Adapters file
2825 type: File
2826 input_fastq_files:
2827 doc: Input fastq files
2828 type: File[]
2829 nthreads:
2830 doc: Number of threads.
2831 type: int
2832
2833 outputs:
2834 output_count_raw_reads:
2835 type: File[]
2836 outputSource: count_raw_reads/output_read_count
2837 output_custom_adapters:
2838 type: File[]
2839 outputSource: overrepresented_sequence_extract/output_custom_adapters
2840 output_diff_counts:
2841 type: File[]
2842 outputSource: compare_read_counts/result
2843 output_fastqc_data_files:
2844 doc: FastQC data files
2845 type: File[]
2846 outputSource: extract_fastqc_data/output_fastqc_data_file
2847 output_fastqc_report_files:
2848 doc: FastQC reports in zip format
2849 type: File[]
2850 outputSource: fastqc/output_qc_report_file
2851
2852 steps:
2853 compare_read_counts:
2854 in:
2855 file1: count_raw_reads/output_read_count
2856 file2: count_fastqc_reads/output_fastqc_read_count
2857 scatter:
2858 - file1
2859 - file2
2860 scatterMethod: dotproduct
2861 run:
2862 cwlVersion: v1.0
2863 class: CommandLineTool
2864 doc: Compares 2 files
2865
2866 inputs:
2867 brief:
2868 type: boolean
2869 default: true
2870 inputBinding:
2871 prefix: --brief
2872 position: 3
2873 file1:
2874 type: File
2875 inputBinding:
2876 position: 1
2877 file2:
2878 type: File
2879 inputBinding:
2880 position: 2
2881
2882 outputs:
2883 result:
2884 type: File
2885 outputBinding:
2886 glob: stdout.txt
2887 stdout: stdout.txt
2888
2889 baseCommand: diff
2890
2891 hints:
2892 DockerRequirement:
2893 dockerPull: reddylab/workflow-utils:ggr
2894 out:
2895 - result
2896 count_fastqc_reads:
2897 in:
2898 input_basename: extract_basename/output_basename
2899 input_fastqc_data: extract_fastqc_data/output_fastqc_data_file
2900 scatter:
2901 - input_fastqc_data
2902 - input_basename
2903 scatterMethod: dotproduct
2904 run:
2905 cwlVersion: v1.0
2906 class: CommandLineTool
2907 doc: Extracts read count from fastqc_data.txt
2908
2909 inputs:
2910 input_basename:
2911 type: string
2912 input_fastqc_data:
2913 type: File
2914 inputBinding:
2915 position: 1
2916
2917 outputs:
2918 output_fastqc_read_count:
2919 type: File
2920 outputBinding:
2921 glob: $(inputs.input_basename + '.fastqc-read_count.txt')
2922 stdout: $(inputs.input_basename + '.fastqc-read_count.txt')
2923
2924 baseCommand: count-fastqc_data-reads.sh
2925
2926 hints:
2927 DockerRequirement:
2928 dockerPull: reddylab/workflow-utils:ggr
2929 out:
2930 - output_fastqc_read_count
2931 count_raw_reads:
2932 in:
2933 input_basename: extract_basename/output_basename
2934 input_fastq_file: input_fastq_files
2935 scatter:
2936 - input_fastq_file
2937 - input_basename
2938 scatterMethod: dotproduct
2939 run:
2940 cwlVersion: v1.0
2941 class: CommandLineTool
2942 doc: Counts reads in a fastq file
2943
2944 requirements:
2945 InlineJavascriptRequirement: {}
2946
2947 inputs:
2948 input_basename:
2949 type: string
2950 input_fastq_file:
2951 type: File
2952 inputBinding:
2953 position: 1
2954
2955 outputs:
2956 output_read_count:
2957 type: File
2958 outputBinding:
2959 glob: $(inputs.input_basename + '.read_count.txt')
2960 stdout: $(inputs.input_basename + '.read_count.txt')
2961
2962 baseCommand: count-fastq-reads.sh
2963
2964 hints:
2965 DockerRequirement:
2966 dockerPull: reddylab/workflow-utils:ggr
2967 out:
2968 - output_read_count
2969 extract_basename:
2970 in:
2971 input_file: input_fastq_files
2972 scatter: input_file
2973 run:
2974 cwlVersion: v1.0
2975 class: CommandLineTool
2976 doc: Extracts the base name of a file
2977
2978 requirements:
2979 InlineJavascriptRequirement: {}
2980
2981 inputs:
2982 input_file:
2983 type: File
2984 inputBinding:
2985 position: 1
2986
2987 outputs:
2988 output_basename:
2989 type: string
2990 outputBinding:
2991 outputEval: |-
2992 $(inputs.input_file.path.substr(inputs.input_file.path.lastIndexOf('/') + 1, inputs.input_file.path.lastIndexOf('.') - (inputs.input_file.path.lastIndexOf('/') + 1)))
2993
2994 baseCommand: echo
2995
2996 hints:
2997 DockerRequirement:
2998 dockerPull: reddylab/workflow-utils:ggr
2999 out:
3000 - output_basename
3001 extract_fastqc_data:
3002 in:
3003 input_basename: extract_basename/output_basename
3004 input_qc_report_file: fastqc/output_qc_report_file
3005 scatter:
3006 - input_qc_report_file
3007 - input_basename
3008 scatterMethod: dotproduct
3009 run:
3010 cwlVersion: v1.0
3011 class: CommandLineTool
3012 doc: |-
3013 Unzips a zipped fastqc report and returns the fastqc_data.txt file. Unzips the file to pipe and uses redirection
3014
3015 inputs:
3016 extract_pattern:
3017 type: string
3018 default: '*/fastqc_data.txt'
3019 inputBinding:
3020 position: 3
3021 input_basename:
3022 type: string
3023 input_qc_report_file:
3024 type: File
3025 inputBinding:
3026 position: 2
3027 pipe:
3028 type: boolean
3029 default: true
3030 inputBinding:
3031 prefix: -p
3032 position: 1
3033
3034 outputs:
3035 output_fastqc_data_file:
3036 type: File
3037 outputBinding:
3038 glob: $(inputs.input_basename + '.fastqc_data.txt')
3039 stdout: $(inputs.input_basename + '.fastqc_data.txt')
3040
3041 baseCommand: unzip
3042
3043 hints:
3044 DockerRequirement:
3045 dockerPull: dukegcb/fastqc
3046 out:
3047 - output_fastqc_data_file
3048 fastqc:
3049 in:
3050 input_fastq_file: input_fastq_files
3051 threads: nthreads
3052 scatter: input_fastq_file
3053 run:
3054 cwlVersion: v1.0
3055 class: CommandLineTool
3056
3057 requirements:
3058 InlineJavascriptRequirement: {}
3059
3060 inputs:
3061 format:
3062 type: string
3063 default: fastq
3064 inputBinding:
3065 prefix: --format
3066 position: 3
3067 input_fastq_file:
3068 type: File
3069 inputBinding:
3070 position: 4
3071 noextract:
3072 type: boolean
3073 default: true
3074 inputBinding:
3075 prefix: --noextract
3076 position: 2
3077 threads:
3078 type: int
3079 default: 1
3080 inputBinding:
3081 prefix: --threads
3082 position: 5
3083
3084 outputs:
3085 output_qc_report_file:
3086 type: File
3087 outputBinding:
3088 glob: |-
3089 $(inputs.input_fastq_file.path.replace(/^.*[\\\/]/, "").replace(/\.[^/.]+$/, '') + "_fastqc.zip")
3090
3091 baseCommand: fastqc
3092 arguments:
3093 - prefix: --dir
3094 position: 5
3095 valueFrom: $(runtime.tmpdir)
3096 - prefix: -o
3097 position: 5
3098 valueFrom: $(runtime.outdir)
3099
3100 hints:
3101 DockerRequirement:
3102 dockerPull: dukegcb/fastqc
3103 out:
3104 - output_qc_report_file
3105 overrepresented_sequence_extract:
3106 in:
3107 default_adapters_file: default_adapters_file
3108 input_basename: extract_basename/output_basename
3109 input_fastqc_data: extract_fastqc_data/output_fastqc_data_file
3110 scatter:
3111 - input_fastqc_data
3112 - input_basename
3113 scatterMethod: dotproduct
3114 run:
3115 cwlVersion: v1.0
3116 class: CommandLineTool
3117
3118 inputs:
3119 default_adapters_file:
3120 doc: Adapters file in fasta format
3121 type: File
3122 inputBinding:
3123 position: 2
3124 input_basename:
3125 doc: Name of the sample - used as a base name for generating output
3126 files
3127 type: string
3128 input_fastqc_data:
3129 doc: fastqc_data.txt file from a fastqc report
3130 type: File
3131 inputBinding:
3132 position: 1
3133
3134 outputs:
3135 output_custom_adapters:
3136 type: File
3137 outputBinding:
3138 glob: $(inputs.input_basename + '.custom_adapters.fasta')
3139
3140 baseCommand: overrepresented_sequence_extract.py
3141 arguments:
3142 - position: 3
3143 valueFrom: $(inputs.input_basename + '.custom_adapters.fasta')
3144
3145 hints:
3146 DockerRequirement:
3147 dockerPull: reddylab/overrepresented_sequence_extract:1.0
3148 out:
3149 - output_custom_adapters
3150 out:
3151 - output_count_raw_reads
3152 - output_diff_counts
3153 - output_fastqc_report_files
3154 - output_fastqc_data_files
3155 - output_custom_adapters
3156 quant:
3157 in:
3158 input_bam_files: map/output_data_sorted_dedup_bam_files
3159 input_genome_sizes: genome_sizes_file
3160 nthreads: nthreads_quant
3161 run:
3162 cwlVersion: v1.0
3163 class: Workflow
3164 doc: ATAC-seq - Quantification
3165
3166 requirements:
3167 - class: ScatterFeatureRequirement
3168 - class: StepInputExpressionRequirement
3169 - class: InlineJavascriptRequirement
3170
3171 inputs:
3172 input_bam_files:
3173 type: File[]
3174 input_genome_sizes:
3175 type: File
3176 nthreads:
3177 type: int
3178 default: 1
3179
3180 outputs:
3181 bigwig_norm_files:
3182 doc: signal files of pileup reads in RPKM
3183 type: File[]
3184 outputSource: bamcoverage/output_bam_coverage
3185 bigwig_raw_files:
3186 doc: Raw reads bigWig (signal) files
3187 type: File[]
3188 outputSource: bdg2bw-raw/output_bigwig
3189
3190 steps:
3191 bamcoverage:
3192 in:
3193 bam: input_bam_files
3194 binSize:
3195 valueFrom: ${return 1}
3196 extendReads:
3197 valueFrom: ${return 200}
3198 normalizeUsing:
3199 valueFrom: RPKM
3200 numberOfProcessors: nthreads
3201 output_suffix:
3202 valueFrom: .rpkm.bw
3203 scatter: bam
3204 run:
3205 cwlVersion: v1.0
3206 class: CommandLineTool
3207 doc: |
3208 usage: An example usage is:$ bamCoverage -b reads.bam -o coverage.bw
3209
3210 This tool takes an alignment of reads or fragments as input (BAM file) and
3211 generates a coverage track (bigWig or bedGraph) as output. The coverage is
3212 calculated as the number of reads per bin, where bins are short consecutive
3213 counting windows of a defined size. It is possible to extended the length of
3214 the reads to better reflect the actual fragment length. *bamCoverage* offers
3215 normalization by scaling factor, Reads Per Kilobase per Million mapped reads
3216 (RPKM), and 1x depth (reads per genome coverage, RPGC).
3217 Required arguments:
3218 --bam BAM file, -b BAM file
3219 BAM file to process (default: None)
3220 Output:
3221 --outFileName FILENAME, -o FILENAME
3222 Output file name. (default: None)
3223 --outFileFormat {bigwig,bedgraph}, -of {bigwig,bedgraph}
3224 Output file type. Either "bigwig" or "bedgraph".
3225 (default: bigwig)
3226 Optional arguments:
3227 --help, -h show this help message and exit
3228 --scaleFactor SCALEFACTOR
3229 The smooth length defines a window, larger than the
3230 binSize, to average the number of reads. For example,
3231 if the –binSize is set to 20 and the –smoothLength is
3232 set to 60, then, for each bin, the average of the bin
3233 and its left and right neighbors is considered.
3234 Any value smaller than –binSize will be ignored and
3235 no smoothing will be applied. (default: 1.0)
3236 --MNase Determine nucleosome positions from MNase-seq data.
3237 Only 3 nucleotides at the center of each fragment are
3238 counted. The fragment ends are defined by the two mate
3239 reads. Only fragment lengthsbetween 130 - 200 bp are
3240 considered to avoid dinucleosomes or other
3241 artifacts.*NOTE*: Requires paired-end data. A bin size
3242 of 1 is recommended. (default: False)
3243 --filterRNAstrand {forward,reverse}
3244 Selects RNA-seq reads (single-end or paired-end) in
3245 the given strand. (default: None)
3246 --version show program's version number and exit
3247 --binSize INT bp, -bs INT bp
3248 Size of the bins, in bases, for the output of the
3249 bigwig/bedgraph file. (default: 50)
3250 --region CHR:START:END, -r CHR:START:END
3251 Region of the genome to limit the operation to - this
3252 is useful when testing parameters to reduce the
3253 computing time. The format is chr:start:end, for
3254 example --region chr10 or --region
3255 chr10:456700:891000. (default: None)
3256 --blackListFileName BED file, -bl BED file
3257 A BED file containing regions that should be excluded
3258 from all analyses. Currently this works by rejecting
3259 genomic chunks that happen to overlap an entry.
3260 Consequently, for BAM files, if a read partially
3261 overlaps a blacklisted region or a fragment spans over
3262 it, then the read/fragment might still be considered.
3263 (default: None)
3264 --numberOfProcessors INT, -p INT
3265 Number of processors to use. Type "max/2" to use half
3266 the maximum number of processors or "max" to use all
3267 available processors. (default: max/2)
3268 --verbose, -v Set to see processing messages. (default: False)
3269 Read coverage normalization options:
3270 --normalizeTo1x EFFECTIVE GENOME SIZE LENGTH
3271 Report read coverage normalized to 1x sequencing depth
3272 (also known as Reads Per Genomic Content (RPGC)).
3273 Sequencing depth is defined as: (total number of
3274 mapped reads * fragment length) / effective genome
3275 size. The scaling factor used is the inverse of the
3276 sequencing depth computed for the sample to match the
3277 1x coverage. To use this option, the effective genome
3278 size has to be indicated after the option. The
3279 effective genome size is the portion of the genome
3280 that is mappable. Large fractions of the genome are
3281 stretches of NNNN that should be discarded. Also, if
3282 repetitive regions were not included in the mapping of
3283 reads, the effective genome size needs to be adjusted
3284 accordingly. Common values are: mm9: 2,150,570,000;
3285 hg19:2,451,960,000; dm3:121,400,000 and
3286 ce10:93,260,000. See Table 2 of http://www.plosone.org
3287 /article/info:doi/10.1371/journal.pone.0030377 or http
3288 ://www.nature.com/nbt/journal/v27/n1/fig_tab/nbt.1518_
3289 T1.html for several effective genome sizes. (default:
3290 None)
3291 --ignoreForNormalization IGNOREFORNORMALIZATION [IGNOREFORNORMALIZATION ...]
3292 A list of space-delimited chromosome names containing
3293 those chromosomes that should be excluded for
3294 computing the normalization. This is useful when
3295 considering samples with unequal coverage across
3296 chromosomes, like male samples. An usage examples is
3297 --ignoreForNormalization chrX chrM. (default: None)
3298 --skipNonCoveredRegions, --skipNAs
3299 This parameter determines if non-covered regions
3300 (regions without overlapping reads) in a BAM file
3301 should be skipped. The default is to treat those
3302 regions as having a value of zero. The decision to
3303 skip non-covered regions depends on the interpretation
3304 of the data. Non-covered regions may represent, for
3305 example, repetitive regions that should be skipped.
3306 (default: False)
3307 --smoothLength INT bp
3308 The smooth length defines a window, larger than the
3309 binSize, to average the number of reads. For example,
3310 if the --binSize is set to 20 and the --smoothLength
3311 is set to 60, then, for each bin, the average of the
3312 bin and its left and right neighbors is considered.
3313 Any value smaller than --binSize will be ignored and
3314 no smoothing will be applied. (default: None)
3315 Read processing options:
3316 --extendReads [INT bp], -e [INT bp]
3317 This parameter allows the extension of reads to
3318 fragment size. If set, each read is extended, without
3319 exception. *NOTE*: This feature is generally NOT
3320 recommended for spliced-read data, such as RNA-seq, as
3321 it would extend reads over skipped regions. *Single-
3322 end*: Requires a user specified value for the final
3323 fragment length. Reads that already exceed this
3324 fragment length will not be extended. *Paired-end*:
3325 Reads with mates are always extended to match the
3326 fragment size defined by the two read mates. Unmated
3327 reads, mate reads that map too far apart (>4x fragment
3328 length) or even map to different chromosomes are
3329 treated like single-end reads. The input of a fragment
3330 length value is optional. If no value is specified, it
3331 is estimated from the data (mean of the fragment size
3332 of all mate reads). (default: False)
3333 --ignoreDuplicates If set, reads that have the same orientation and start
3334 position will be considered only once. If reads are
3335 paired, the mate's position also has to coincide to
3336 ignore a read. (default: False)
3337 --minMappingQuality INT
3338 If set, only reads that have a mapping quality score
3339 of at least this are considered. (default: None)
3340 --centerReads By adding this option, reads are centered with respect
3341 to the fragment length. For paired-end data, the read
3342 is centered at the fragment length defined by the two
3343 ends of the fragment. For single-end data, the given
3344 fragment length is used. This option is useful to get
3345 a sharper signal around enriched regions. (default:
3346 False)
3347 --samFlagInclude INT Include reads based on the SAM flag. For example, to
3348 get only reads that are the first mate, use a flag of
3349 64. This is useful to count properly paired reads only
3350 once, as otherwise the second mate will be also
3351 considered for the coverage. (default: None)
3352 --samFlagExclude INT Exclude reads based on the SAM flag. For example, to
3353 get only reads that map to the forward strand, use
3354 --samFlagExclude 16, where 16 is the SAM flag for
3355 reads that map to the reverse strand. (default: None)
3356
3357 requirements:
3358 InlineJavascriptRequirement: {}
3359
3360 inputs:
3361 MNase:
3362 doc: |
3363 Determine nucleosome positions from MNase-seq data.
3364 Only 3 nucleotides at the center of each fragment are
3365 counted. The fragment ends are defined by the two mate
3366 reads. Only fragment lengthsbetween 130 - 200 bp are
3367 considered to avoid dinucleosomes or other
3368 artifacts.*NOTE*: Requires paired-end data. A bin size
3369 of 1 is recommended. (default: False)
3370 type: boolean?
3371 inputBinding:
3372 prefix: --MNase
3373 position: 1
3374 bam:
3375 doc: 'BAM file to process '
3376 type: File
3377 secondaryFiles:
3378 - .bai
3379 inputBinding:
3380 prefix: --bam
3381 position: 1
3382 binSize:
3383 doc: |
3384 INT bp
3385 Size of the bins, in bases, for the output of the
3386 bigwig/bedgraph file. (default: 50)
3387 type: int?
3388 inputBinding:
3389 prefix: --binSize
3390 position: 1
3391 blackListFileName:
3392 doc: |
3393 BED file
3394 A BED file containing regions that should be excluded
3395 from all analyses. Currently this works by rejecting
3396 genomic chunks that happen to overlap an entry.
3397 Consequently, for BAM files, if a read partially
3398 overlaps a blacklisted region or a fragment spans over
3399 it, then the read/fragment might still be considered.
3400 (default: None)
3401 type: File?
3402 inputBinding:
3403 prefix: --blackListFileName
3404 position: 1
3405 centerReads:
3406 doc: |
3407 By adding this option, reads are centered with respect
3408 to the fragment length. For paired-end data, the read
3409 is centered at the fragment length defined by the two
3410 ends of the fragment. For single-end data, the given
3411 fragment length is used. This option is useful to get
3412 a sharper signal around enriched regions. (default:
3413 False)
3414 type: boolean?
3415 inputBinding:
3416 prefix: --centerReads
3417 position: 1
3418 extendReads:
3419 doc: |
3420 INT bp
3421 This parameter allows the extension of reads to
3422 fragment size. If set, each read is extended, without
3423 exception. *NOTE*: This feature is generally NOT
3424 recommended for spliced-read data, such as RNA-seq, as
3425 it would extend reads over skipped regions. *Single-
3426 end*: Requires a user specified value for the final
3427 fragment length. Reads that already exceed this
3428 fragment length will not be extended. *Paired-end*:
3429 Reads with mates are always extended to match the
3430 fragment size defined by the two read mates. Unmated
3431 reads, mate reads that map too far apart (>4x fragment
3432 length) or even map to different chromosomes are
3433 treated like single-end reads. The input of a fragment
3434 length value is optional. If no value is specified, it
3435 is estimated from the data (mean of the fragment size
3436 of all mate reads). (default: False)
3437 type: int?
3438 inputBinding:
3439 prefix: --extendReads
3440 position: 1
3441 filterRNAstrand:
3442 doc: |
3443 {forward,reverse}
3444 Selects RNA-seq reads (single-end or paired-end) in
3445 the given strand. (default: None)
3446 type: string?
3447 inputBinding:
3448 prefix: --filterRNAstrand
3449 position: 1
3450 ignoreDuplicates:
3451 doc: |
3452 If set, reads that have the same orientation and start
3453 position will be considered only once. If reads are
3454 paired, the mate's position also has to coincide to
3455 ignore a read. (default: False)
3456 type: boolean?
3457 inputBinding:
3458 prefix: --ignoreDuplicates
3459 position: 1
3460 ignoreForNormalization:
3461 doc: |
3462 A list of space-delimited chromosome names containing those chromosomes
3463 that should be excluded for computing the normalization. This is useful
3464 when considering samples with unequal coverage across chromosomes, like
3465 male samples. An usage examples is –ignoreForNormalization chrX chrM.
3466 type:
3467 - 'null'
3468 - type: array
3469 items: string
3470 inputBinding:
3471 prefix: --ignoreForNormalization
3472 position: 1
3473 minMappingQuality:
3474 doc: |
3475 INT
3476 If set, only reads that have a mapping quality score
3477 of at least this are considered. (default: None)
3478 type: int?
3479 inputBinding:
3480 prefix: --minMappingQuality
3481 position: 1
3482 normalizeUsing:
3483 doc: |
3484 Possible choices: RPKM, CPM, BPM, RPGC
3485
3486 Use one of the entered methods to normalize the number of reads per bin.
3487 By default, no normalization is performed. RPKM = Reads Per Kilobase per
3488 Million mapped reads; CPM = Counts Per Million mapped reads, same as
3489 CPM in RNA-seq; BPM = Bins Per Million mapped reads, same as TPM in
3490 RNA-seq; RPGC = reads per genomic content (1x normalization);
3491 Mapped reads are considered after blacklist filtering (if applied).
3492 RPKM (per bin) = number of reads per bin / (number of mapped reads (in millions) * bin length (kb)).
3493 CPM (per bin) = number of reads per bin / number of mapped reads (in millions).
3494 BPM (per bin) = number of reads per bin / sum of all reads per bin (in millions).
3495 RPGC (per bin) = number of reads per bin / scaling factor for 1x average coverage.
3496 This scaling factor, in turn, is determined from the sequencing depth:
3497 (total number of mapped reads * fragment length) / effective genome size.
3498 The scaling factor used is the inverse of the sequencing depth
3499 computed for the sample to match the 1x coverage.
3500 This option requires –effectiveGenomeSize.
3501 Each read is considered independently, if you want to only count one
3502 mate from a pair in paired-end data, then use
3503 the –samFlagInclude/–samFlagExclude options.
3504 type: string?
3505 inputBinding:
3506 prefix: --normalizeUsing
3507 position: 1
3508 numberOfProcessors:
3509 doc: |
3510 INT
3511 Number of processors to use. Type "max/2" to use half
3512 the maximum number of processors or "max" to use all
3513 available processors. (default: max/2)
3514 type: int?
3515 inputBinding:
3516 prefix: --numberOfProcessors
3517 position: 1
3518 outFileFormat:
3519 doc: |
3520 {bigwig,bedgraph}, -of {bigwig,bedgraph}
3521 Output file type. Either "bigwig" or "bedgraph".
3522 (default: bigwig)
3523 type: string
3524 default: bigwig
3525 inputBinding:
3526 prefix: --outFileFormat
3527 position: 1
3528 outFileName:
3529 doc: |
3530 FILENAME
3531 Output file name. (default: input BAM filename with bigwig [*.bw] or bedgraph [*.bdg] extension.)
3532 type: string?
3533 output_suffix:
3534 doc: Suffix used for output file (input BAM filename + suffix)
3535 type: string?
3536 region:
3537 doc: |
3538 CHR:START:END
3539 Region of the genome to limit the operation to - this
3540 is useful when testing parameters to reduce the
3541 computing time. The format is chr:start:end, for
3542 example --region chr10 or --region
3543 chr10:456700:891000. (default: None)
3544 type: string?
3545 inputBinding:
3546 prefix: --region
3547 position: 1
3548 samFlagExclude:
3549 doc: |
3550 INT
3551 Exclude reads based on the SAM flag. For example, to
3552 get only reads that map to the forward strand, use
3553 --samFlagExclude 16, where 16 is the SAM flag for
3554 reads that map to the reverse strand. (default: None)
3555 type: int?
3556 inputBinding:
3557 prefix: --samFlagExclude
3558 position: 1
3559 samFlagInclude:
3560 doc: |
3561 INT
3562 Include reads based on the SAM flag. For example, to
3563 get only reads that are the first mate, use a flag of
3564 64. This is useful to count properly paired reads only
3565 once, as otherwise the second mate will be also
3566 considered for the coverage. (default: None)
3567 type: int?
3568 inputBinding:
3569 prefix: --samFlagInclude
3570 position: 1
3571 scaleFactor:
3572 doc: |
3573 The smooth length defines a window, larger than the
3574 binSize, to average the number of reads. For example,
3575 if the –binSize is set to 20 and the –smoothLength is
3576 set to 60, then, for each bin, the average of the bin
3577 and its left and right neighbors is considered.
3578 Any value smaller than –binSize will be ignored and
3579 no smoothing will be applied. (default: 1.0)
3580 type: float?
3581 inputBinding:
3582 prefix: --scaleFactor
3583 position: 1
3584 skipNonCoveredRegions:
3585 doc: |
3586 --skipNonCoveredRegions, --skipNAs
3587 This parameter determines if non-covered regions
3588 (regions without overlapping reads) in a BAM file
3589 should be skipped. The default is to treat those
3590 regions as having a value of zero. The decision to
3591 skip non-covered regions depends on the interpretation
3592 of the data. Non-covered regions may represent, for
3593 example, repetitive regions that should be skipped.
3594 (default: False)
3595 type: boolean?
3596 inputBinding:
3597 prefix: --skipNonCoveredRegions
3598 position: 1
3599 smoothLength:
3600 doc: |
3601 INT bp
3602 The smooth length defines a window, larger than the
3603 binSize, to average the number of reads. For example,
3604 if the --binSize is set to 20 and the --smoothLength
3605 is set to 60, then, for each bin, the average of the
3606 bin and its left and right neighbors is considered.
3607 Any value smaller than --binSize will be ignored and
3608 no smoothing will be applied. (default: None)
3609 Read processing options:
3610 type: int?
3611 inputBinding:
3612 prefix: --smoothLength
3613 position: 1
3614 verbose:
3615 doc: "--verbose \nSet to see processing messages. (default:\
3616 \ False)\n"
3617 type: boolean?
3618 inputBinding:
3619 prefix: --verbose
3620 position: 1
3621 version:
3622 doc: show program's version number and exit
3623 type: boolean?
3624 inputBinding:
3625 prefix: --version
3626 position: 1
3627
3628 outputs:
3629 output_bam_coverage:
3630 type: File
3631 outputBinding:
3632 glob: |-
3633 ${ if (inputs.outFileName) return inputs.outFileName; if (inputs.output_suffix) return inputs.bam.path.replace(/^.*[\\\/]/, "").replace(/\.[^/.]+$/, "") + inputs.output_suffix; if (inputs.outFileFormat == "bedgraph") return inputs.bam.path.replace(/^.*[\\\/]/, "").replace(/\.[^/.]+$/, "") + ".bdg"; return inputs.bam.path.replace(/^.*[\\\/]/, "").replace(/\.[^/.]+$/, "") + ".bw"; }
3634
3635 baseCommand: bamCoverage
3636 arguments:
3637 - prefix: --outFileName
3638 position: 3
3639 valueFrom: |-
3640 ${ if (inputs.outFileName) return inputs.outFileName; if (inputs.output_suffix) return inputs.bam.path.replace(/^.*[\\\/]/, "").replace(/\.[^/.]+$/, "") + inputs.output_suffix; if (inputs.outFileFormat == "bedgraph") return inputs.bam.path.replace(/^.*[\\\/]/, "").replace(/\.[^/.]+$/, "") + ".bdg"; return inputs.bam.path.replace(/^.*[\\\/]/, "").replace(/\.[^/.]+$/, "") + ".bw"; }
3641
3642 hints:
3643 DockerRequirement:
3644 dockerPull: reddylab/deeptools:3.0.1
3645 out:
3646 - output_bam_coverage
3647 bdg2bw-raw:
3648 in:
3649 bed_graph: bedsort_genomecov/bed_file_sorted
3650 genome_sizes: input_genome_sizes
3651 output_suffix:
3652 valueFrom: .raw.bw
3653 scatter: bed_graph
3654 run:
3655 cwlVersion: v1.0
3656 class: CommandLineTool
3657 doc: 'Tool: bedGraphToBigWig v 4 - Convert a bedGraph file to bigWig
3658 format.'
3659
3660 requirements:
3661 InlineJavascriptRequirement: {}
3662
3663 inputs:
3664 bed_graph:
3665 doc: "\tbed_graph is a four column file in the format: <chrom> <start>\
3666 \ <end> <value>\n"
3667 type: File
3668 inputBinding:
3669 position: 1
3670 genome_sizes:
3671 doc: "\tgenome_sizes is two column: <chromosome name> <size in bases>.\n"
3672 type: File
3673 inputBinding:
3674 position: 2
3675 output_suffix:
3676 type: string
3677 default: .bw
3678
3679 outputs:
3680 output_bigwig:
3681 type: File
3682 outputBinding:
3683 glob: |-
3684 $(inputs.bed_graph.path.replace(/^.*[\\\/]/, '').replace(/\.[^/.]+$/, "") + inputs.output_suffix)
3685
3686 baseCommand: bedGraphToBigWig
3687 arguments:
3688 - position: 3
3689 valueFrom: |-
3690 $(inputs.bed_graph.path.replace(/^.*[\\\/]/, '').replace(/\.[^/.]+$/, "") + inputs.output_suffix)
3691
3692 hints:
3693 DockerRequirement:
3694 dockerPull: dukegcb/bedgraphtobigwig
3695 out:
3696 - output_bigwig
3697 bedsort_genomecov:
3698 in:
3699 bed_file: bedtools_genomecov/output_bedfile
3700 scatter: bed_file
3701 run:
3702 cwlVersion: v1.0
3703 class: CommandLineTool
3704 doc: |
3705 bedSort - Sort a .bed file by chrom,chromStart
3706 usage:
3707 bedSort in.bed out.bed
3708 in.bed and out.bed may be the same.
3709
3710 requirements:
3711 InlineJavascriptRequirement: {}
3712
3713 inputs:
3714 bed_file:
3715 doc: Bed or bedGraph file to be sorted
3716 type: File
3717 inputBinding:
3718 position: 1
3719
3720 outputs:
3721 bed_file_sorted:
3722 type: File
3723 outputBinding:
3724 glob: $(inputs.bed_file.path.replace(/^.*[\\\/]/, '') + "_sorted")
3725
3726 baseCommand: bedSort
3727 arguments:
3728 - position: 2
3729 valueFrom: $(inputs.bed_file.path.replace(/^.*[\\\/]/, '') + "_sorted")
3730
3731 hints:
3732 DockerRequirement:
3733 dockerPull: dleehr/docker-hubutils
3734 out:
3735 - bed_file_sorted
3736 bedtools_genomecov:
3737 in:
3738 bg:
3739 valueFrom: ${return true}
3740 g: input_genome_sizes
3741 ibam: input_bam_files
3742 scatter: ibam
3743 run:
3744 cwlVersion: v1.0
3745 class: CommandLineTool
3746 doc: |-
3747 Tool: bedtools genomecov (aka genomeCoverageBed)
3748 Version: v2.25.0
3749 Summary: Compute the coverage of a feature file among a genome.
3750
3751 Usage: bedtools genomecov [OPTIONS] -i <bed/gff/vcf> -g <genome>
3752
3753 Options:
3754 -ibam The input file is in BAM format.
3755 Note: BAM _must_ be sorted by position
3756
3757 -d Report the depth at each genome position (with one-based coordinates).
3758 Default behavior is to report a histogram.
3759
3760 -dz Report the depth at each genome position (with zero-based coordinates).
3761 Reports only non-zero positions.
3762 Default behavior is to report a histogram.
3763
3764 -bg Report depth in BedGraph format. For details, see:
3765 genome.ucsc.edu/goldenPath/help/bedgraph.html
3766
3767 -bga Report depth in BedGraph format, as above (-bg).
3768 However with this option, regions with zero
3769 coverage are also reported. This allows one to
3770 quickly extract all regions of a genome with 0
3771 coverage by applying: "grep -w 0$" to the output.
3772
3773 -split Treat "split" BAM or BED12 entries as distinct BED intervals.
3774 when computing coverage.
3775 For BAM files, this uses the CIGAR "N" and "D" operations
3776 to infer the blocks for computing coverage.
3777 For BED12 files, this uses the BlockCount, BlockStarts, and BlockEnds
3778 fields (i.e., columns 10,11,12).
3779
3780 -strand Calculate coverage of intervals from a specific strand.
3781 With BED files, requires at least 6 columns (strand is column 6).
3782 - (STRING): can be + or -
3783
3784 -5 Calculate coverage of 5" positions (instead of entire interval).
3785
3786 -3 Calculate coverage of 3" positions (instead of entire interval).
3787
3788 -max Combine all positions with a depth >= max into
3789 a single bin in the histogram. Irrelevant
3790 for -d and -bedGraph
3791 - (INTEGER)
3792
3793 -scale Scale the coverage by a constant factor.
3794 Each coverage value is multiplied by this factor before being reported.
3795 Useful for normalizing coverage by, e.g., reads per million (RPM).
3796 - Default is 1.0; i.e., unscaled.
3797 - (FLOAT)
3798
3799 -trackline Adds a UCSC/Genome-Browser track line definition in the first line of the output.
3800 - See here for more details about track line definition:
3801 http://genome.ucsc.edu/goldenPath/help/bedgraph.html
3802 - NOTE: When adding a trackline definition, the output BedGraph can be easily
3803 uploaded to the Genome Browser as a custom track,
3804 BUT CAN NOT be converted into a BigWig file (w/o removing the first line).
3805
3806 -trackopts Writes additional track line definition parameters in the first line.
3807 - Example:
3808 -trackopts 'name="My Track" visibility=2 color=255,30,30'
3809 Note the use of single-quotes if you have spaces in your parameters.
3810 - (TEXT)
3811
3812 Notes:
3813 (1) The genome file should tab delimited and structured as follows:
3814 <chromName><TAB><chromSize>
3815
3816 For example, Human (hg19):
3817 chr1 249250621
3818 chr2 243199373
3819 ...
3820 chr18_gl000207_random 4262
3821
3822 (2) The input BED (-i) file must be grouped by chromosome.
3823 A simple "sort -k 1,1 <BED> > <BED>.sorted" will suffice.
3824
3825 (3) The input BAM (-ibam) file must be sorted by position.
3826 A "samtools sort <BAM>" should suffice.
3827
3828 Tips:
3829 One can use the UCSC Genome Browser's MySQL database to extract
3830 chromosome sizes. For example, H. sapiens:
3831
3832 mysql --user=genome --host=genome-mysql.cse.ucsc.edu -A -e \
3833 "select chrom, size from hg19.chromInfo" > hg19.genome
3834
3835 requirements:
3836 InlineJavascriptRequirement: {}
3837 ShellCommandRequirement: {}
3838
3839 inputs:
3840 '3':
3841 doc: "\tCalculate coverage of 3\" positions (instead of entire interval).\n"
3842 type: boolean?
3843 inputBinding:
3844 prefix: '-3'
3845 position: 1
3846 '5':
3847 doc: "\tCalculate coverage of 5\" positions (instead of entire interval).\n"
3848 type: boolean?
3849 inputBinding:
3850 prefix: '-5'
3851 position: 1
3852 bg:
3853 doc: |
3854 Report depth in BedGraph format. For details, see:
3855 genome.ucsc.edu/goldenPath/help/bedgraph.html
3856 type: boolean?
3857 inputBinding:
3858 prefix: -bg
3859 position: 1
3860 bga:
3861 doc: |
3862 Report depth in BedGraph format, as above (-bg).
3863 However with this option, regions with zero
3864 coverage are also reported. This allows one to
3865 quickly extract all regions of a genome with 0
3866 coverage by applying: "grep -w 0$" to the output.
3867 type: boolean?
3868 inputBinding:
3869 prefix: -bga
3870 position: 1
3871 d:
3872 doc: |
3873 Report the depth at each genome position (with one-based coordinates).
3874 Default behavior is to report a histogram.
3875 type: boolean?
3876 inputBinding:
3877 prefix: -d
3878 position: 1
3879 dz:
3880 doc: |
3881 Report the depth at each genome position (with zero-based coordinates).
3882 Reports only non-zero positions.
3883 Default behavior is to report a histogram.
3884 type: boolean?
3885 inputBinding:
3886 prefix: -dz
3887 position: 1
3888 g:
3889 doc: <genome sizes>
3890 type: File
3891 inputBinding:
3892 prefix: -g
3893 position: 3
3894 ibam:
3895 doc: "\tThe input file is in BAM format.\nNote: BAM _must_ be sorted\
3896 \ by position\n"
3897 type: File
3898 inputBinding:
3899 prefix: -ibam
3900 position: 2
3901 max:
3902 doc: |
3903 Combine all positions with a depth >= max into
3904 a single bin in the histogram. Irrelevant
3905 for -d and -bedGraph
3906 - (INTEGER)
3907 type: int?
3908 inputBinding:
3909 prefix: -max
3910 position: 1
3911 scale:
3912 doc: |
3913 Scale the coverage by a constant factor.
3914 Each coverage value is multiplied by this factor before being reported.
3915 Useful for normalizing coverage by, e.g., reads per million (RPM).
3916 - Default is 1.0; i.e., unscaled.
3917 - (FLOAT)
3918 type: float?
3919 inputBinding:
3920 prefix: -scale
3921 position: 1
3922 split:
3923 doc: |
3924 Treat "split" BAM or BED12 entries as distinct BED intervals.
3925 when computing coverage.
3926 For BAM files, this uses the CIGAR "N" and "D" operations
3927 to infer the blocks for computing coverage.
3928 For BED12 files, this uses the BlockCount, BlockStarts, and BlockEnds
3929 fields (i.e., columns 10,11,12).
3930 type: boolean?
3931 inputBinding:
3932 prefix: -split
3933 position: 1
3934 strand:
3935 doc: |
3936 Calculate coverage of intervals from a specific strand.
3937 With BED files, requires at least 6 columns (strand is column 6).
3938 - (STRING): can be + or -
3939 type: string?
3940 inputBinding:
3941 prefix: -strand
3942 position: 1
3943 trackline:
3944 doc: |
3945 Adds a UCSC/Genome-Browser track line definition in the first line of the output.
3946 - See here for more details about track line definition:
3947 http://genome.ucsc.edu/goldenPath/help/bedgraph.html
3948 - NOTE: When adding a trackline definition, the output BedGraph can be easily
3949 uploaded to the Genome Browser as a custom track,
3950 BUT CAN NOT be converted into a BigWig file (w/o removing the first line).
3951 type: boolean?
3952 inputBinding:
3953 prefix: -trackline
3954 position: 1
3955 trackopts:
3956 doc: |
3957 Writes additional track line definition parameters in the first line.
3958 - Example:
3959 -trackopts 'name="My Track" visibility=2 color=255,30,30'
3960 Note the use of single-quotes if you have spaces in your parameters.
3961 - (TEXT)
3962 type: string?
3963 inputBinding:
3964 prefix: -trackopts
3965 position: 1
3966
3967 outputs:
3968 output_bedfile:
3969 type: File
3970 outputBinding:
3971 glob: $(inputs.ibam.path.replace(/^.*[\\\/]/, '').replace(/\.[^/.]+$/,
3972 '') + '.bdg')
3973 stdout: $(inputs.ibam.path.replace(/^.*[\\\/]/, '').replace(/\.[^/.]+$/,
3974 '') + '.bdg')
3975
3976 baseCommand:
3977 - bedtools
3978 - genomecov
3979
3980 hints:
3981 DockerRequirement:
3982 dockerPull: dukegcb/bedtools
3983 out:
3984 - output_bedfile
3985 out:
3986 - bigwig_raw_files
3987 - bigwig_norm_files
3988 trimm:
3989 in:
3990 input_adapters_files: qc/output_custom_adapters
3991 input_fastq_files: input_fastq_files
3992 nthreads: nthreads_trimm
3993 trimmomatic_jar_path: trimmomatic_jar_path
3994 trimmomatic_java_opts: trimmomatic_java_opts
3995 run:
3996 cwlVersion: v1.0
3997 class: Workflow
3998 doc: 'ATAC-seq 02 trimming - reads: SE'
3999
4000 requirements:
4001 - class: ScatterFeatureRequirement
4002 - class: StepInputExpressionRequirement
4003 - class: InlineJavascriptRequirement
4004
4005 inputs:
4006 input_adapters_files:
4007 doc: Input adapters files
4008 type: File[]
4009 input_fastq_files:
4010 doc: Input fastq files
4011 type: File[]
4012 nthreads:
4013 doc: Number of threads
4014 type: int
4015 default: 1
4016 quality_score:
4017 type: string
4018 default: -phred33
4019 trimmomatic_jar_path:
4020 doc: Trimmomatic Java jar file
4021 type: string
4022 default: /usr/share/java/trimmomatic.jar
4023 trimmomatic_java_opts:
4024 doc: JVM arguments should be a quoted, space separated list
4025 type: string?
4026
4027 outputs:
4028 output_data_fastq_trimmed_files:
4029 doc: Trimmed fastq files
4030 type: File[]
4031 outputSource: trimmomatic/output_read1_trimmed_file
4032 output_trimmed_fastq_read_count:
4033 doc: Trimmed read counts of fastq files
4034 type: File[]
4035 outputSource: count_fastq_reads/output_read_count
4036
4037 steps:
4038 count_fastq_reads:
4039 in:
4040 input_basename: extract_basename/output_basename
4041 input_fastq_file: trimmomatic/output_read1_trimmed_file
4042 scatter:
4043 - input_fastq_file
4044 - input_basename
4045 scatterMethod: dotproduct
4046 run:
4047 cwlVersion: v1.0
4048 class: CommandLineTool
4049 doc: Counts reads in a fastq file
4050
4051 requirements:
4052 InlineJavascriptRequirement: {}
4053
4054 inputs:
4055 input_basename:
4056 type: string
4057 input_fastq_file:
4058 type: File
4059 inputBinding:
4060 position: 1
4061
4062 outputs:
4063 output_read_count:
4064 type: File
4065 outputBinding:
4066 glob: $(inputs.input_basename + '.read_count.txt')
4067 stdout: $(inputs.input_basename + '.read_count.txt')
4068
4069 baseCommand: count-fastq-reads.sh
4070
4071 hints:
4072 DockerRequirement:
4073 dockerPull: reddylab/workflow-utils:ggr
4074 out:
4075 - output_read_count
4076 extract_basename:
4077 in:
4078 input_file: trimmomatic/output_read1_trimmed_file
4079 scatter: input_file
4080 run:
4081 cwlVersion: v1.0
4082 class: CommandLineTool
4083 doc: Extracts the base name of a file
4084
4085 requirements:
4086 InlineJavascriptRequirement: {}
4087
4088 inputs:
4089 input_file:
4090 type: File
4091 inputBinding:
4092 position: 1
4093
4094 outputs:
4095 output_basename:
4096 type: string
4097 outputBinding:
4098 outputEval: |-
4099 $(inputs.input_file.path.substr(inputs.input_file.path.lastIndexOf('/') + 1, inputs.input_file.path.lastIndexOf('.') - (inputs.input_file.path.lastIndexOf('/') + 1)))
4100
4101 baseCommand: echo
4102
4103 hints:
4104 DockerRequirement:
4105 dockerPull: reddylab/workflow-utils:ggr
4106 out:
4107 - output_basename
4108 trimmomatic:
4109 in:
4110 end_mode:
4111 valueFrom: SE
4112 illuminaclip:
4113 valueFrom: 2:30:15
4114 input_adapters_file: input_adapters_files
4115 input_read1_fastq_file: input_fastq_files
4116 java_opts: trimmomatic_java_opts
4117 leading:
4118 valueFrom: ${return 3}
4119 minlen:
4120 valueFrom: ${return 15}
4121 nthreads: nthreads
4122 phred:
4123 valueFrom: '33'
4124 slidingwindow:
4125 valueFrom: 4:20
4126 trailing:
4127 valueFrom: ${return 3}
4128 trimmomatic_jar_path: trimmomatic_jar_path
4129 scatter:
4130 - input_read1_fastq_file
4131 - input_adapters_file
4132 scatterMethod: dotproduct
4133 run:
4134 cwlVersion: v1.0
4135 class: CommandLineTool
4136 doc: |
4137 Trimmomatic is a fast, multithreaded command line tool that can be used to trim and crop
4138 Illumina (FASTQ) data as well as to remove adapters. These adapters can pose a real problem
4139 depending on the library preparation and downstream application.
4140 There are two major modes of the program: Paired end mode and Single end mode. The
4141 paired end mode will maintain correspondence of read pairs and also use the additional
4142 information contained in paired reads to better find adapter or PCR primer fragments
4143 introduced by the library preparation process.
4144 Trimmomatic works with FASTQ files (using phred + 33 or phred + 64 quality scores,
4145 depending on the Illumina pipeline used).
4146
4147 requirements:
4148 InlineJavascriptRequirement: {}
4149 ShellCommandRequirement: {}
4150
4151 inputs:
4152 avgqual:
4153 doc: |
4154 <quality>
4155 Drop the read if the average quality is below the specified level
4156 <quality>: Specifies the minimum average quality required to keep a read.
4157 type: int?
4158 inputBinding:
4159 prefix: 'AVGQUAL:'
4160 position: 101
4161 separate: false
4162 crop:
4163 doc: |
4164 <length>
4165 Removes bases regardless of quality from the end of the read, so that the read has maximally
4166 the specified length after this step has been performed. Steps performed after CROP might of
4167 course further shorten the read.
4168 <length>: The number of bases to keep, from the start of the read.
4169 type: int?
4170 inputBinding:
4171 prefix: 'CROP:'
4172 position: 13
4173 separate: false
4174 end_mode:
4175 doc: "SE|PE\nSingle End (SE) or Paired End (PE) mode\n"
4176 type: string
4177 inputBinding:
4178 position: 3
4179 headcrop:
4180 doc: |
4181 <length>
4182 Removes the specified number of bases, regardless of quality, from the beginning of the read.
4183 <length>: The number of bases to keep, from the start of the read.
4184 type: int?
4185 inputBinding:
4186 prefix: 'HEADCROP:'
4187 position: 13
4188 separate: false
4189 illuminaclip:
4190 doc: |
4191 <fastaWithAdaptersEtc>:<seed mismatches>:<palindrome clip threshold>:<simple clip threshold>:<minAdapterLength>:<keepBothReads>
4192 Find and remove Illumina adapters.
4193 REQUIRED:
4194 <fastaWithAdaptersEtc>: specifies the path to a fasta file containing all the adapters, PCR sequences etc.
4195 The naming of the various sequences within this file determines how they are used. See below.
4196 <seedMismatches>: specifies the maximum mismatch count which will still allow a full match to be performed
4197 <palindromeClipThreshold>: specifies how accurate the match between the two 'adapter ligated' reads must be
4198 for PE palindrome read alignment.
4199 <simpleClipThreshold>: specifies how accurate the match between any adapter etc. sequence must be against a read
4200 OPTIONAL:
4201 <minAdapterLength>: In addition to the alignment score, palindrome mode can verify
4202 that a minimum length of adapter has been detected. If unspecified, this defaults to 8 bases,
4203 for historical reasons. However, since palindrome mode has a very low false positive rate, this
4204 can be safely reduced, even down to 1, to allow shorter adapter fragments to be removed.
4205 <keepBothReads>: After read-though has been detected by palindrome mode, and the
4206 adapter sequence removed, the reverse read contains the same sequence information as the
4207 forward read, albeit in reverse complement. For this reason, the default behaviour is to
4208 entirely drop the reverse read. By specifying "true" for this parameter, the reverse read will
4209 also be retained, which may be useful e.g. if the downstream tools cannot handle a
4210 combination of paired and unpaired reads.
4211 type: string
4212 input_adapters_file:
4213 doc: |-
4214 FASTA file containing adapters, PCR sequences, etc. It is used to search for and remove these sequences in the input FASTQ file(s)
4215 type: File
4216 input_read1_fastq_file:
4217 doc: FASTQ file for input read (read R1 in Paired End mode)
4218 type: File
4219 inputBinding:
4220 position: 5
4221 input_read2_fastq_file:
4222 doc: FASTQ file for read R2 in Paired End mode
4223 type: File?
4224 inputBinding:
4225 position: 6
4226 java_opts:
4227 doc: |-
4228 JVM arguments should be a quoted, space separated list (e.g. "-Xms128m -Xmx512m")
4229 type: string?
4230 inputBinding:
4231 position: 1
4232 shellQuote: false
4233 leading:
4234 doc: |
4235 <quality>
4236 Remove low quality bases from the beginning. As long as a base has a value below this
4237 threshold the base is removed and the next base will be investigated.
4238 <quality>: Specifies the minimum quality required to keep a base.
4239 type: int?
4240 inputBinding:
4241 prefix: 'LEADING:'
4242 position: 14
4243 separate: false
4244 log_filename:
4245 doc: |
4246 <ouptut log file name>
4247 Specifying a trimlog file creates a log of all read trimmings, indicating the following details:
4248 the read name
4249 the surviving sequence length
4250 the location of the first surviving base, aka. the amount trimmed from the start
4251 the location of the last surviving base in the original read
4252 the amount trimmed from the end
4253 <ouptut log file name>: filename for the generated output log file.
4254 type: string?
4255 inputBinding:
4256 prefix: -trimlog
4257 position: 4
4258 maxinfo:
4259 doc: |
4260 <targetLength>:<strictness>
4261 Performs an adaptive quality trim, balancing the benefits of retaining longer reads against the
4262 costs of retaining bases with errors.
4263 <targetLength>: This specifies the read length which is likely to allow the
4264 location of the read within the target sequence to be determined.
4265 <strictness>: This value, which should be set between 0 and 1, specifies the
4266 balance between preserving as much read length as possible vs. removal of incorrect
4267 bases. A low value of this parameter (<0.2) favours longer reads, while a high value
4268 (>0.8) favours read correctness.
4269 type: string?
4270 inputBinding:
4271 prefix: 'MAXINFO:'
4272 position: 15
4273 separate: false
4274 minlen:
4275 doc: |
4276 <length>
4277 This module removes reads that fall below the specified minimal length. If required, it should
4278 normally be after all other processing steps. Reads removed by this step will be counted and
4279 included in the "dropped reads" count presented in the trimmomatic summary.
4280 <length>: Specifies the minimum length of reads to be kept
4281 type: int?
4282 inputBinding:
4283 prefix: 'MINLEN:'
4284 position: 100
4285 separate: false
4286 nthreads:
4287 doc: Number of threads
4288 type: int
4289 default: 1
4290 inputBinding:
4291 prefix: -threads
4292 position: 4
4293 phred:
4294 doc: |
4295 "33"|"64"
4296 -phred33 ("33") or -phred64 ("64") specifies the base quality encoding. Default: -phred64
4297 type: string
4298 default: '64'
4299 inputBinding:
4300 prefix: -phred
4301 position: 4
4302 separate: false
4303 slidingwindow:
4304 doc: |
4305 <windowSize>:<requiredQuality>
4306 Perform a sliding window trimming, cutting once the average quality within the window falls
4307 below a threshold. By considering multiple bases, a single poor quality base will not cause the
4308 removal of high quality data later in the read.
4309 <windowSize>: specifies the number of bases to average across
4310 <requiredQuality>: specifies the average quality required
4311 type: string?
4312 inputBinding:
4313 prefix: 'SLIDINGWINDOW:'
4314 position: 15
4315 separate: false
4316 tophred33:
4317 doc: This (re)encodes the quality part of the FASTQ file to base 33.
4318 type: boolean?
4319 inputBinding:
4320 prefix: TOPHRED33
4321 position: 12
4322 separate: false
4323 tophred64:
4324 doc: This (re)encodes the quality part of the FASTQ file to base 64.
4325 type: boolean?
4326 inputBinding:
4327 prefix: TOPHRED64
4328 position: 12
4329 separate: false
4330 trailing:
4331 doc: |
4332 <quality>
4333 Remove low quality bases from the end. As long as a base has a value below this threshold
4334 the base is removed and the next base (which as trimmomatic is starting from the 3" prime end
4335 would be base preceding the just removed base) will be investigated. This approach can be
4336 used removing the special illumina "low quality segment" regions (which are marked with
4337 quality score of 2), but we recommend Sliding Window or MaxInfo instead
4338 <quality>: Specifies the minimum quality required to keep a base.
4339 type: int?
4340 inputBinding:
4341 prefix: 'TRAILING:'
4342 position: 14
4343 separate: false
4344 trimmomatic_jar_path:
4345 type: string
4346 inputBinding:
4347 prefix: -jar
4348 position: 2
4349
4350 outputs:
4351 output_log_file:
4352 doc: Trimmomatic Log file.
4353 type: File?
4354 outputBinding:
4355 glob: $(inputs.log_filename)
4356 output_read1_trimmed_file:
4357 type: File
4358 outputBinding:
4359 glob: |-
4360 $(inputs.input_read1_fastq_file.path.replace(/^.*[\\\/]/, '').replace(/\.[^/.]+$/, '') + '.trimmed.fastq')
4361 output_read1_trimmed_unpaired_file:
4362 type: File?
4363 outputBinding:
4364 glob: |
4365 ${
4366 if (inputs.end_mode == "PE")
4367 return inputs.input_read1_fastq_file.path.replace(/^.*[\\\/]/, '').replace(/\.[^/.]+$/, '') + '.unpaired.trimmed.fastq';
4368 return null;
4369 }
4370 output_read2_trimmed_paired_file:
4371 type: File?
4372 outputBinding:
4373 glob: |
4374 ${
4375 if (inputs.end_mode == "PE" && inputs.input_read2_fastq_file)
4376 return inputs.input_read2_fastq_file.path.replace(/^.*[\\\/]/, '').replace(/\.[^/.]+$/, '') + '.trimmed.fastq';
4377 return null;
4378 }
4379 output_read2_trimmed_unpaired_file:
4380 type: File?
4381 outputBinding:
4382 glob: |
4383 ${
4384 if (inputs.end_mode == "PE" && inputs.input_read2_fastq_file)
4385 return inputs.input_read2_fastq_file.path.replace(/^.*[\\\/]/, '').replace(/\.[^/.]+$/, '') + '.unpaired.trimmed.fastq';
4386 return null;
4387 }
4388
4389 baseCommand: java
4390 arguments:
4391 - position: 1
4392 valueFrom: $("-Djava.io.tmpdir="+runtime.tmpdir)
4393 shellQuote: false
4394 - position: 7
4395 valueFrom: |-
4396 $(inputs.input_read1_fastq_file.path.replace(/^.*[\\\/]/, '').replace(/\.[^/.]+$/, '') + '.trimmed.fastq')
4397 - position: 8
4398 valueFrom: |
4399 ${
4400 if (inputs.end_mode == "PE" && inputs.input_read2_fastq_file)
4401 return inputs.input_read1_fastq_file.path.replace(/^.*[\\\/]/, '').replace(/\.[^/.]+$/, '') + '.trimmed.unpaired.fastq';
4402 return null;
4403 }
4404 - position: 9
4405 valueFrom: |
4406 ${
4407 if (inputs.end_mode == "PE" && inputs.input_read2_fastq_file)
4408 return inputs.input_read2_fastq_file.path.replace(/^.*[\\\/]/, '').replace(/\.[^/.]+$/, '') + '.trimmed.fastq';
4409 return null;
4410 }
4411 - position: 10
4412 valueFrom: |
4413 ${
4414 if (inputs.end_mode == "PE" && inputs.input_read2_fastq_file)
4415 return inputs.input_read2_fastq_file.path.replace(/^.*[\\\/]/, '').replace(/\.[^/.]+$/, '') + '.trimmed.unpaired.fastq';
4416 return null;
4417 }
4418 - position: 11
4419 valueFrom: $("ILLUMINACLIP:" + inputs.input_adapters_file.path + ":"+
4420 inputs.illuminaclip)
4421
4422 hints:
4423 DockerRequirement:
4424 dockerPull: dukegcb/trimmomatic
4425 out:
4426 - output_read1_trimmed_file
4427 out:
4428 - output_data_fastq_trimmed_files
4429 - output_trimmed_fastq_read_count
4430 id: |-
4431 https://api.sbgenomics.com/v2/apps/kghosesbg/sbpla-31744/ATAC-seq-pipeline-se/2/raw/
4432 sbg:appVersion:
4433 - v1.0
4434 sbg:content_hash: ad9474546d1d7aba5aa20e3c7a03b5429e5f8ec1d18be92cbab7315600a6bce48
4435 sbg:contributors:
4436 - kghosesbg
4437 sbg:createdBy: kghosesbg
4438 sbg:createdOn: 1580500895
4439 sbg:id: kghosesbg/sbpla-31744/ATAC-seq-pipeline-se/2
4440 sbg:image_url: |-
4441 https://igor.sbgenomics.com/ns/brood/images/kghosesbg/sbpla-31744/ATAC-seq-pipeline-se/2.png
4442 sbg:latestRevision: 2
4443 sbg:modifiedBy: kghosesbg
4444 sbg:modifiedOn: 1581699121
4445 sbg:project: kghosesbg/sbpla-31744
4446 sbg:projectName: SBPLA-31744
4447 sbg:publisher: sbg
4448 sbg:revision: 2
4449 sbg:revisionNotes: |-
4450 Uploaded using sbpack v2020.02.14.
4451 Source: https://raw.githubusercontent.com/Duke-GCB/GGR-cwl/master/v1.0/ATAC-seq_pipeline/pipeline-se.cwl
4452 sbg:revisionsInfo:
4453 - sbg:modifiedBy: kghosesbg
4454 sbg:modifiedOn: 1580500895
4455 sbg:revision: 0
4456 sbg:revisionNotes: |-
4457 Uploaded using sbpack. Source: https://raw.githubusercontent.com/Duke-GCB/GGR-cwl/master/v1.0/ATAC-seq_pipeline/pipeline-se.cwl
4458 - sbg:modifiedBy: kghosesbg
4459 sbg:modifiedOn: 1580742764
4460 sbg:revision: 1
4461 sbg:revisionNotes: Just moved a node
4462 - sbg:modifiedBy: kghosesbg
4463 sbg:modifiedOn: 1581699121
4464 sbg:revision: 2
4465 sbg:revisionNotes: |-
4466 Uploaded using sbpack v2020.02.14.
4467 Source: https://raw.githubusercontent.com/Duke-GCB/GGR-cwl/master/v1.0/ATAC-seq_pipeline/pipeline-se.cwl
4468 sbg:sbgMaintained: false
4469 sbg:validationErrors:
4470 - 'Required input is not set: #qc.input_fastq_files'
4471 - 'Required input is not set: #qc.default_adapters_file'
4472 - 'Required input is not set: #qc.nthreads'
4473 - 'Required input is not set: #trimm.input_fastq_files'
4474 - 'Required input is not set: #trimm.input_adapters_files'
4475 - 'Required input is not set: #map.input_fastq_files'
4476 - 'Required input is not set: #map.genome_sizes_file'
4477 - 'Required input is not set: #map.genome_ref_first_index_file'
4478 - 'Required input is not set: #peak_call.input_bam_files'
4479 - 'Required input is not set: #peak_call.input_genome_sizes'
4480 - 'Required input is not set: #peak_call.as_narrowPeak_file'
4481 - 'Required input is not set: #quant.input_bam_files'
4482 - 'Required input is not set: #quant.input_genome_sizes'