-
Notifications
You must be signed in to change notification settings - Fork 1
/
annotation_template.yaml
66 lines (57 loc) · 2.62 KB
/
annotation_template.yaml
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
pattern: # List of file patterns to match with the current annotation; required
- string
- string
- ...
format: string # Output format "tsv" or "csv"; default: "tsv"
delimiter: string # Delimiter of input files: t - tabular, c - coma; default: "t"
columns: # A list of columns that we want as an output; optional (otherwise it will show all the annotation fields)
- string
- string
- ...
annotation: # Columns to parse
# Required attributes in each annotation element:
# 'type': Describe the type of field that will be parsed.
# Could be: static, internal, filename, dirname, mapping, plugin
# 'field': The name of the column that will be parsed
# The value will be parsed to all the rows of the output file
- type: 'static'
field: string
value: string | number # Value that it will be written to the output file; required
# The values of `fieldSource` columns that appears on the input files will
# be extracted and parsed as values in the output
- type: 'internal'
field: string
value: string # Text to represent multiple fieldSource; optional
fieldSource: # Columns to look for in the input files; required
- string
- string
- ...
function: string # Function to apply to internal value; optional
# Annotation based on the filename of the input file
- type: 'filename'
field: string
function: string # Function to apply to filename; optional
regex: string # Regular expression to apply to filename, after function; optional
# Annotation based on the dirname that input file is located
- type: 'dirname'
field: string
function: string # Function to apply to dirname; optional
regex: string # Regular expression to apply to dirname, after function; optional
# Mapping annotation allows to use a mapping file to add a new column base on a many-to-one relation
- type: 'mapping'
field: string
fieldSource: # Fields (from annotation file) to look and map in the input file; required
- string
- string
- ...
fieldMapping: string # Field to map in the mapping file; required
fileMapping: string # File name to make the mapping; required
fieldValue: string # Field of the final output value; required
# Apply plugin transformation in each row of the input file.
- type: 'plugin'
plugin: string # Plugin to apply, could be internal, located into 'plugin' folder, or customized by the user
field: string
exclude: # List of field and value that allows to filter out all the rows that have specific value; optional
- field: string # Field to apply the exclusion
value: string # Value that will be discarded
- ...