Adding helper files and updating readme
[arvados-tutorial.git] / RNA-Seq / cwl / helper / samtools_index.cwl
diff --git a/RNA-Seq/cwl/helper/samtools_index.cwl b/RNA-Seq/cwl/helper/samtools_index.cwl
new file mode 100755 (executable)
index 0000000..3ae2e9b
--- /dev/null
@@ -0,0 +1,42 @@
+#!/usr/bin/env cwl-runner
+cwlVersion: v1.0
+class: CommandLineTool
+
+doc: |
+  Indexing BAM.
+
+requirements:
+  InitialWorkDirRequirement:
+    listing: 
+      - $(inputs.bam_sorted)
+hints:
+  ResourceRequirement:
+    coresMin: 1
+    ramMin: 20000
+  DockerRequirement:
+    dockerPull: quay.io/biocontainers/samtools:1.14--hb421002_0
+
+baseCommand: ["samtools", "index"]
+arguments:
+  - valueFrom: -b  # specifies that index is created in bai format
+    position: 1
+
+inputs:
+  bam_sorted:
+    doc: sorted bam input file
+    type: File
+    inputBinding:
+      position: 2
+
+outputs:
+  bam_sorted_indexed:
+    type: File
+    secondaryFiles: .bai
+    format: edam:format_2572  # BAM 
+    outputBinding:
+      glob: $(inputs.bam_sorted.basename)
+      
+$namespaces:
+  edam: https://edamontology.org/
+$schemas:
+  - https://edamontology.org/EDAM_1.18.owl