/
fasta-from-bed.cwl
67 lines (58 loc) · 1.61 KB
/
fasta-from-bed.cwl
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
64
65
66
67
#!/usr/bin/env cwl-runner
cwlVersion: v1.0
class: Workflow
requirements:
InlineJavascriptRequirement: {}
StepInputExpressionRequirement: {}
label: "Creates FASTA file from BED coordinates"
doc: "This workflow creates FASTA file from BED coordinates"
inputs:
fasta: File
bed: File
fasta_out: string
outputs:
output:
outputSource: samtools_faidx/output
type: File
steps:
remove_comments:
run: ../../tools/basic/grep.cwl
in:
v: {default: True}
pattern: {default: '^#'}
outFileName:
valueFrom: ${ return inputs.file.nameroot + ".grep";}
file: bed
out: [output]
bedtocoord:
run: ../../tools/basic/awk.cwl
in:
outFileName:
valueFrom: ${ return inputs.file.nameroot + ".coord";}
file: remove_comments/output
text: { default: '{printf("%s:%d-%d\n",$1,$2,$3)}'}
out: [output]
sort:
run: ../../tools/basic/sort.cwl
in:
u: { default: True}
outFileName:
valueFrom: ${ return inputs.file.nameroot + ".sort";}
file: bedtocoord/output
out: [output]
samtools_faidx:
run: ../../tools/samtools/samtools-faidx.cwl
in:
o: fasta_out
input: fasta
r: sort/output
out: [output]
$namespaces:
s: http://schema.org/
s:author:
- class: s:Person
s:identifier: https://orcid.org/0000-0002-4108-5982
s:email: mailto:r78v10a07@gmail.com
s:name: Roberto Vera Alvarez
$schemas:
- https://schema.org/version/latest/schemaorg-current-http.rdf