-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdefine_cohort.task.yaml
More file actions
executable file
·83 lines (69 loc) · 2.75 KB
/
Copy pathdefine_cohort.task.yaml
File metadata and controls
executable file
·83 lines (69 loc) · 2.75 KB
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
76
77
78
79
80
81
82
83
name: Define Cohort
description: Create or update a cohort definition file specifying the name, series, included samples, filtering rules, and annotation track parameters.
agent_requirements:
cpu_cores: 0
memory_gb: 0
parameters:
- name: cohort_name
type: string
label: Cohort Name
help: The name of the cohort to create
value: "Cohort"
- name: series_name
type: string
label: Series Name
help: The name of the series to create
value: "cohort"
- name: sample_name_threshold
type: integer
label: Sample Name Threshold
help: The maximum number of sample names to list for rare variants
value: 20
- name: merge_step_file_count
type: integer
label: The number of files to merge at a time in each vcf merge step
help: This can be adjusted to ensure that the performance stays within the bounds of the runner
value: 128
- name: info_filter
type: string
label: Filter Expression (INFO fields)
help: INFO field symbol names, comparisons (>, <, >=, <=, ==, !=), (and, or), operators (/ , +, - , * , ~) and values
value: 'all( FILTER == "MLrejected" )'
optional: true
- name: format_filter
type: string
label: Filter Expression (FORMAT fields)
help: FORMAT field symbol names, comparisons (>, <, >=, <=, ==, !=), (and, or), operators (/ , +, - , * , ~) and values
value: "DP > 2"
optional: true
steps:
- name: create_cohort
description: Create the initial cohort
type: cmd
command: bash
args:
- |- # shell
#!/usr/bin/env bash
set -e
cohorts_folder="AppData/Common Data/UserAnnotations/cohorts"
#
# Parameters for track being created
#
sourceName="${cohort_name} Variant Frequencies"
seriesName="${series_name}"
#
# Choose an output file base name and path. The base name will be extended with the current date and time.
#
out_file="${seriesName}.tsf"
out_file="${cohorts_folder}/${out_file}"
mkdir -p "${WORKSPACE_DIR}/${cohorts_folder}"
out_parameter_file="${WORKSPACE_DIR}/${cohorts_folder}/${seriesName}-${cohort_name}.params.txt"
echo "cohort_name=${cohort_name}" > "${out_parameter_file}"
echo "series_name=${series_name}" >> "${out_parameter_file}"
echo "out_file=${out_file}" >> "${out_parameter_file}"
echo "sample_name_threshold=${sample_name_threshold}" >> "${out_parameter_file}"
echo "info_filter=${info_filter}" >> "${out_parameter_file}"
echo "format_filter=${format_filter}" >> "${out_parameter_file}"
echo "merge_step_file_count=${merge_step_file_count}" >> "${out_parameter_file}"
echo "Settings file created ${out_parameter_file}:"
cat "${out_parameter_file}"