Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ See `utils/template.nf` for a process template which uses the following guidelin
- Use the original tool version numbering
- Use CamelCase for tool, command and process names
- Use lowercase with words separated by underscores for params, inputs, outputs and scripts.
- Use 4 spaces per indentation level.
- All input and output identifiers should reflect their conceptual identity. Use informative names like unaligned_sequences, reference_genome, phylogeny, or aligned_sequences instead of foo_input, foo_file, result, input, output, and so forth.
- Define two labels for each process, containing toolname, version and command separated by an underscore.
- BWA_0.7.17
Expand All @@ -42,16 +43,16 @@ See `utils/template.nf` for a process template which uses the following guidelin
- Use separate process input channels as much as possible. Use tuples for linked inputs only.
```
input:
tuple sample_id, rg_id, bam, bai
path genome_fasta
val(analysis_id)
tuple(sample_id, path(bam), path(bai))
```
- Define named process output channels. This ensures that outputs can be referenced in external scope by their respective names. Indicate whether an output channel is optional.
```
output:
path "my_file.txt", emit: my_file
path "my_optional_file.txt", optional: my_optional_file, emit: my_optional_file
......
path("my_file.txt", emit: my_file)
path("my_optional_file.txt", optional: my_optional_file, emit: my_optional_file)
```
- Use `params` for resource files, for example `genome.fasta`, `database.vcf`.

## GUIX
1. Creating squashfs immage
Expand Down
6 changes: 3 additions & 3 deletions Utils/template.nf
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ process Command {
shell = ['/bin/bash', '-euo', 'pipefail']

input:
val(analysis_id)
tuple(sample_id, path(input_file))

output:
tuple(sample_id, path(output_file), emit: output_file)
path("*.{tsv,txt}", emit: my_output)
path("log.txt", emit: log)


script:
"""
tool command ${params.optional}
tool command ${params.optional} ${analysis_id} ${params.resource_file} ${input_file}
"""
}