Skip to content

Commit

Permalink
Add extra arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
Grifs committed Jan 30, 2024
1 parent 76f6009 commit 4a4ed79
Show file tree
Hide file tree
Showing 2 changed files with 75 additions and 15 deletions.
87 changes: 72 additions & 15 deletions src/bgzip/config.vsh.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,28 +9,85 @@ functionality:
requirements:
cpus: 1
commands: [ bgzip ]
arguments:
- name: --input
type: file
direction: input
description: file to be compressed or decompressed
required: true
- name: --output
type: file
direction: output
description: compressed or decompressed output
required: true
- name: --decompress
alternatives: -d
type: boolean_true
description: decompress the input file
argument_groups:
- name: Inputs
arguments:
- name: --input
type: file
direction: input
description: file to be compressed or decompressed
required: true
- name: Outputs
arguments:
- name: --output
type: file
direction: output
description: compressed or decompressed output
required: true
- name: --index_name
alternatives: -I
type: file
direction: output
description: name of BGZF index file [file.gz.gzi]
- name: Arguments
arguments:
- name: offset
alternatives: -b
type: integer
description: decompress at virtual file pointer (0-based uncompressed offset)
- name: --decompress
alternatives: -d
type: boolean_true
description: decompress the input file
- name: --rebgzip
alternatives: -g
type: boolean_true
description: use an index file to bgzip a file
- name: --index
alternatives: -i
type: boolean_true
description: compress and create BGZF index
- name: --compress_level
alternatives: -l
type: integer
description: compression level to use when compressing; 0 to 9, or -1 for default [-1]
min: -1
max: 9
- name: --reindex
alternatives: -r
type: boolean_true
description: (re)index the output file
- name: --size
alternatives: -s
type: integer
description: decompress INT bytes (uncompressed size)
min: 0
- name: --test
alternatives: -t
type: boolean_true
description: test integrity of compressed file
- name: --binary
type: boolean_true
description: Don't align blocks with text lines
resources:
- type: bash_script
text: |
[[ "$par_decompress" == "false" ]] && unset par_decompress
[[ "$par_rebgzip" == "false" ]] && unset par_rebgzip
[[ "$par_index" == "false" ]] && unset par_index
[[ "$par_reindex" == "false" ]] && unset par_reindex
[[ "$par_test" == "false" ]] && unset par_test
[[ "$par_binary" == "false" ]] && unset par_binary
bgzip -c \
${meta_cpus:+--threads "${meta_cpus}"} \
${par_decompress:+-d} \
${par_rebgzip:+-g} \
${par_index:+-i} \
${par_index_name:+-I "${par_index_name}"} \
${par_compress_level:+-l "${par_compress_level}"} \
${par_reindex:+-r} \
${par_size:+-s "${par_size}"} \
${par_test:+-t} \
"$par_input" > "$par_output"
test_resources:
- type: bash_script
Expand Down
3 changes: 3 additions & 0 deletions src/bgzip/help.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
```bash
bgzip -h
```

Version: 1.19
Usage: bgzip [OPTIONS] [FILE] ...
Expand Down

0 comments on commit 4a4ed79

Please sign in to comment.