-
Notifications
You must be signed in to change notification settings - Fork 1
/
gaps_or_not.cwl
75 lines (69 loc) · 1.69 KB
/
gaps_or_not.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
68
69
70
71
72
73
74
75
#!usr/bin/env cwl-runner
cwlVersion: v1.2
class: Workflow
requirements:
- class: SubworkflowFeatureRequirement
steps:
delete_id:
in:
fasta_file: fasta_file
out: [id_deleted_file]
run:
class: CommandLineTool
requirements:
- class: InlineJavascriptRequirement
- class: InitialWorkDirRequirement
listing:
${
var LIST = [(inputs.fasta_file)];
return LIST;
}
stdout: id_deleted_file.txt
baseCommand: grep
arguments:
- position: 1
prefix: -v
valueFrom: ">"
- position: 2
valueFrom: $(inputs.fasta_file.basename)
inputs:
fasta_file:
type: File
outputs:
id_deleted_file:
type: stdout
gaps-or-not:
in:
id_deleted_file: delete_id/id_deleted_file
out: [gap_lines]
run:
class: CommandLineTool
requirements:
- class: InlineJavascriptRequirement
- class: InitialWorkDirRequirement
listing:
${
var LIST = [(inputs.id_deleted_file)];
return LIST;
}
stdout: lines-contain-N.txt
baseCommand: perl
arguments:
- position: 1
prefix: -ne
valueFrom: 'print if /N/'
- position: 2
valueFrom: $(inputs.id_deleted_file.basename)
inputs:
id_deleted_file:
type: File
outputs:
gap_lines:
type: stdout
inputs:
fasta_file:
type: File
outputs:
gap_lines:
type: File
outputSource: gaps-or-not/gap_lines