7eaf62ee9429b9e62c901b4051f00fd94a935149
[rnaseq-cwl-training.git] / lesson3 / answers / main.cwl
1 cwlVersion: v1.2
2 class: Workflow
3 label: RNAseq CWL practice workflow
4
5 inputs:
6   fq: File
7   genome: Directory
8   gtf: File
9
10 steps:
11   fastqc:
12     run: bio-cwl-tools/fastqc/fastqc_2.cwl
13     in:
14       reads_file: fq
15     out: [html_file]
16
17   STAR:
18     requirements:
19       ResourceRequirement:
20         ramMin: 6000
21     run: bio-cwl-tools/STAR/STAR-Align.cwl
22     in:
23       RunThreadN: {default: 4}
24       GenomeDir: genome
25       ForwardReads: fq
26       OutSAMtype: {default: BAM}
27       OutSAMunmapped: {default: Within}
28     out: [alignment]
29
30   samtools:
31     run: bio-cwl-tools/samtools/samtools_index.cwl
32     in:
33       bam_sorted: STAR/alignment
34     out: [bam_sorted_indexed]
35
36   ### 8. Adding it to the workflow
37   featureCounts:
38     requirements:
39       ResourceRequirement:
40         ramMin: 500
41     run: featureCounts.cwl
42       in:
43         counts_input_bam: samtools/bam_sorted_indexed
44         gtf: gtf
45       out: [featurecounts]
46
47 outputs:
48   qc_html:
49     type: File
50     outputSource: fastqc/html_file
51   bam_sorted_indexed:
52     type: File
53     outputSource: samtools/bam_sorted_indexed
54
55   ### 8. Adding it to the workflow
56   featurecounts:
57     type: File
58       outputSource: featureCounts/featurecounts