Skip to content

Commit e5e6b89

Browse files
committed
Add docstring for merge_inputs.smk
1 parent 2be6364 commit e5e6b89

1 file changed

Lines changed: 46 additions & 3 deletions

File tree

rules/merge_inputs.smk

Lines changed: 46 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,49 @@
1-
# ------------- helper functions to collect, merge & download input files ------------------- #
1+
"""
2+
This part of the workflow merges inputs based on what is defined in the config.
3+
4+
OUTPUTS:
5+
6+
metadata = results/metadata.tsv
7+
sequences = results/sequences_{segment}.fasta
8+
9+
The config dict is expected to have a top-level `inputs` list that defines the
10+
separate inputs' name, metadata, and sequences. Optionally, the config can have
11+
a top-level `additional-inputs` list that is used to define additional data that
12+
are combined with the default inputs:
13+
14+
```yaml
15+
inputs:
16+
- name: default
17+
metadata: <path-or-url>
18+
sequences: <path-or-url>
19+
20+
additional_inputs:
21+
- name: private
22+
metadata: <path-or-url>
23+
sequences: <path-or-url>
24+
```
25+
26+
Sequences can also be a defined a dict with keys for specific segments:
27+
28+
```yaml
29+
inputs:
30+
- name: default
31+
metadata: <path-or-url>
32+
sequences:
33+
ha: <path-or-url>
34+
na: <path-or-url>
35+
36+
additional_inputs:
37+
- name: private
38+
metadata: <path-or-url>
39+
sequences:
40+
ha: <path-or-url>
41+
na: <path-or-url>
42+
```
43+
44+
Supports any of the compression formats that are supported by `augur read-file`,
45+
see <https://docs.nextstrain.org/projects/augur/page/usage/cli/read-file.html>
46+
"""
247

348
def _parse_config_input(input):
449
"""
@@ -126,5 +171,3 @@ rule merge_sequences:
126171
--output-sequences {output.sequences:q}
127172
fi
128173
"""
129-
130-
# -------------------------------------------------------------------------------------------- #

0 commit comments

Comments
 (0)