aboutsummaryrefslogtreecommitdiff
path: root/workflows/fastq2fasta/fastq2fasta.cwl
blob: d529d99b92bfdd1a6a85fdbc1b9420dc2c74bb8e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
cwlVersion: v1.1
class: Workflow
requirements:
  SubworkflowFeatureRequirement: {}
hints:
  ResourceRequirement:
    ramMin: 3000

inputs:
  fastq_forward: File
  fastq_reverse: File?
  ref_fasta:
    type: File
    secondaryFiles:
      - .amb
      - .ann
      - .bwt
      - .pac
      - .sa
      - .fai
  threads:
    type: int
    default: 4
  metadata: File?
  sample_id: string

outputs:
  out_fasta:
    type: File
    outputSource: bam2fasta/out_fasta
  out_metadata:
    type: File?
    outputSource: metadata

steps:
  bwa-mem:
    in:
      threads: threads
      fastq_forward: fastq_forward
      fastq_reverse: fastq_reverse
      index_base: ref_fasta
    out: [output]
    run: bwa-mem.cwl
  samtools-view:
    in:
      threads: threads
      input_file: bwa-mem/output
    out: [bam]
    run: samtools-view.cwl
  samtools-sort:
    in:
      input_bamfile: samtools-view/bam
      threads: threads
    out: [sorted_bam]
    run: samtools-sort.cwl
  bam2fasta:
    in:
      bam: samtools-sort/sorted_bam
      fasta: ref_fasta
      threads: threads
      sample_id: sample_id
    out: [out_fasta]
    run: bam2fasta.cwl