CWL bwa create index to bwa mem alignment workflow
1
0
Entering edit mode
6.8 years ago
Biowoogles ▴ 20

Hi,

My question is about whether there exists any examples of how to create a workflow in CWL consisting of two steps:

  1. Create BWA indexes from input FASTA using BWA INDEX
  2. Pass indexes from step 1 to BWA MEM to perform an alignment

The issue I foresee is that BWA MEM in Step 2 expects a single reference FASTA as the command line input, and yet Step 1 creates a number of files which must be placed in the correct directory such that BWA MEM can access them. So, how does one cleanly pass the output of Step 1 into Step 2?

Thanks

Common-Workflow-Language CWL • 2.9k views
ADD COMMENT
3
Entering edit mode
6.7 years ago
well309 ▴ 70

There are examples available at official repository (https://github.com/common-workflow-language/workflows).

I also have publicly available CWL files for BWA made by myself here: https://github.com/labbcb/tool-bwa. I didd't find any example of workflow that uses these CWL files. Here an example using my CWL files (from a workflow I am working):

cwlVersion: v1.0
class: Workflow

requirements:
  ScatterFeatureRequirement: {}
  StepInputExpressionRequirement: {}
  InlineJavascriptRequirement: {}

inputs:
  files_R1: File[]
  files_R2: File[]
  ref: File
  M: boolean
  workers: int

outputs:
  aligned-files:
    type: File[]
    outputSource: align/output-file

steps:
  index:
    run: https://raw.githubusercontent.com/labbcb/tool-bwa/master/bwa-index.cwl
    in:
      file: ref
    out: [output]
  align:
    run: https://raw.githubusercontent.com/labbcb/tool-bwa/master/bwa-mem.cwl
    scatter: [file_R1, file_R2]
    scatterMethod: dotproduct
    in:
      file_R1: files_R1
      file_R2: files_R2
      output:
        valueFrom: $(inputs.file_R1.basename).sam
      idxbase: index/output
      M: M
      t: workers
    out: [output-file]

Input data:

files_R1:
  - class: File
    path: Sample_1_R1.fastq.gz
  - class: File
    path: Sample_2_R1.fastq.gz
files_R2:
  - class: File
    path: Sample_1_R2.fastq.gz
  - class: File
    path: Sample_2_R2.fastq.gz
workers: 4
ref:
  class: File
  path: genome.fasta
M: true
ADD COMMENT

Login before adding your answer.

Traffic: 2199 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6