Skip to content

Commit

Permalink
get rid of multiple_sep fields in configs
Browse files Browse the repository at this point in the history
  • Loading branch information
emmarousseau committed Jul 5, 2024
1 parent 6cc4f94 commit 6b471ca
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 27 deletions.
5 changes: 1 addition & 4 deletions src/gffread/config.vsh.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ links:
references:
doi: 10.12688/f1000research.23297.2
license: MIT
requirements:
commands: [ gffread ]
argument_groups:
- name: Inputs
arguments:
Expand Down Expand Up @@ -52,7 +50,7 @@ argument_groups:
required: true
description: |
Write the output records into <outfile>.
default: output.gff
example: output.gff
- name: --force_exons
type: boolean_true
description: |
Expand Down Expand Up @@ -154,7 +152,6 @@ argument_groups:
- name: --table
type: string
multiple: true
multiple_sep: ","
description: |
Output a simple tab delimited format instead of GFF, with columns having the values
of GFF attributes given in <attrlist>; special pseudo-attributes (prefixed by @) are
Expand Down
2 changes: 2 additions & 0 deletions src/gffread/script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@
[[ "$par_expose_dups" == "false" ]] && unset par_expose_dups
[[ "$par_cluster_only" == "false" ]] && unset par_cluster_only

# if par_table is not empty, replace ";" with ","
par_table=$(echo "$par_table" | tr ';' ',')

$(which gffread) \
"$par_input" \
Expand Down
2 changes: 1 addition & 1 deletion src/gffread/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ diff "$expected_output_dir/transcripts.fa" "$test_output_dir/transcripts.fa" ||
echo "> Test 4 - Generate table from GFF annotation file"

"$meta_executable" \
--table @id,@chr,@start,@end,@strand,@exons,Name,gene,product \
--table "@id;@chr;@start;@end;@strand;@exons;Name;gene;product" \
--outfile "$test_output_dir/annotation.tbl" \
--input "$test_dir/sequence.gff3"

Expand Down
41 changes: 20 additions & 21 deletions src/samtools/samtools_stats/config.vsh.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,10 @@ argument_groups:
Reference file the CRAM was created with.
- name: --coverage
alternatives: -c
type: integer
type: string
description: |
Coverage distribution min,max,step [1,1000,1].
multiple: true
multiple_sep: ','
Coverage distribution min;max;step. Default: `1;1000;1`.
example: '1;1000;1'
- name: --remove_dups
alternatives: -d
type: boolean_true
Expand All @@ -48,25 +47,25 @@ argument_groups:
alternatives: -f
type: string
description: |
Required flag, 0 for unset. See also `samtools flags`.
default: "0"
Required flag, 0 for unset. See also `samtools flags`. Default: `"0"`.
example: "0"
- name: --filtering_flag
alternatives: -F
type: string
description: |
Filtering flag, 0 for unset. See also `samtools flags`.
default: "0"
Filtering flag, 0 for unset. See also `samtools flags`. Default: `0`.
example: "0"
- name: --GC_depth
type: double
description: |
The size of GC-depth bins (decreasing bin size increases memory requirement).
default: 20000.0
The size of GC-depth bins (decreasing bin size increases memory requirement). Default: `20000`.
example: 20000.0
- name: --insert_size
alternatives: -i
type: integer
description: |
Maximum insert size.
default: 8000
Maximum insert size. Default: `8000`.
example: 8000
- name: --id
alternatives: -I
type: string
Expand All @@ -76,14 +75,14 @@ argument_groups:
alternatives: -l
type: integer
description: |
Include in the statistics only reads with the given read length.
default: -1
Include in the statistics only reads with the given read length. Default: `-1`.
example: -1
- name: --most_inserts
alternatives: -m
type: double
description: |
Report only the main part of inserts.
default: 0.99
Report only the main part of inserts. Default: `0.99`.
example: 0.99
- name: --split_prefix
alternatives: -P
type: string
Expand All @@ -93,8 +92,8 @@ argument_groups:
alternatives: -q
type: integer
description: |
The BWA trimming parameter.
default: 0
The BWA trimming parameter. Default: `0`.
example: 0
- name: --ref_seq
alternatives: -r
type: file
Expand Down Expand Up @@ -124,8 +123,8 @@ argument_groups:
alternatives: -g
type: integer
description: |
Only bases with coverage above this value will be included in the target percentage computation.
default: 0
Only bases with coverage above this value will be included in the target percentage computation. Default: `0`.
example: 0
- name: --input_fmt_option
type: string
description: |
Expand All @@ -141,7 +140,7 @@ argument_groups:
type: file
description: |
Output file.
default: "out.txt"
example: "out.txt"
required: true
direction: output

Expand Down
3 changes: 3 additions & 0 deletions src/samtools/samtools_stats/script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ set -e
[[ "$par_sparse" == "false" ]] && unset par_sparse
[[ "$par_remove_overlaps" == "false" ]] && unset par_remove_overlaps

# change the coverage input from X;X;X to X,X,X
par_coverage=$(echo "$par_coverage" | tr ';' ',')

samtools stats \
${par_coverage:+-c "$par_coverage"} \
${par_remove_dups:+-d} \
Expand Down
2 changes: 1 addition & 1 deletion src/samtools/samtools_stats/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ echo ">>> Checking whether output is non-empty"
[ ! -s "$test_dir/test.paired_end.sorted.txt" ] && echo "File 'test.paired_end.sorted.txt' is empty!" && exit 1

echo ">>> Checking whether output is correct"
# compare using diff, ignoring the line stating the command that was passed.
# compare using diff, ignoring the line stating the command that was passed.
diff <(grep -v "^# The command" "$test_dir/test.paired_end.sorted.txt") \
<(grep -v "^# The command" "$test_dir/ref.paired_end.sorted.txt") || \
(echo "Output file ref.paired_end.sorted.txt does not match expected output" && exit 1)
Expand Down

0 comments on commit 6b471ca

Please sign in to comment.