From 8b708fbefd4d5a489c6d99af3fc23737a4be436e Mon Sep 17 00:00:00 2001 From: emmarousseau Date: Thu, 30 May 2024 08:50:58 +0100 Subject: [PATCH] change script resource to samtools_fastq script, with dummy argument to specify the command --- src/samtools/samtools_fasta/config.vsh.yaml | 7 +++- src/samtools/samtools_fasta/script.sh | 40 --------------------- 2 files changed, 6 insertions(+), 41 deletions(-) delete mode 100644 src/samtools/samtools_fasta/script.sh diff --git a/src/samtools/samtools_fasta/config.vsh.yaml b/src/samtools/samtools_fasta/config.vsh.yaml index e5651789..46cccb0b 100644 --- a/src/samtools/samtools_fasta/config.vsh.yaml +++ b/src/samtools/samtools_fasta/config.vsh.yaml @@ -26,6 +26,11 @@ argument_groups: direction: output - name: Options arguments: + - name: --command + type: string + description: | + This is a dummy argument to use the same script for multiple samtools commands. + default: fasta - name: --no_suffix alternatives: -n type: boolean_true @@ -170,7 +175,7 @@ argument_groups: resources: - type: bash_script - path: script.sh + path: ../samtools_fasta/script.sh test_resources: - type: bash_script path: test.sh diff --git a/src/samtools/samtools_fasta/script.sh b/src/samtools/samtools_fasta/script.sh deleted file mode 100644 index a3eb50e6..00000000 --- a/src/samtools/samtools_fasta/script.sh +++ /dev/null @@ -1,40 +0,0 @@ -#!/bin/bash - -## VIASH START -## VIASH END - -set -e - -[[ "$par_no_suffix" == "false" ]] && unset par_no_suffix -[[ "$par_suffix" == "false" ]] && unset par_suffix -[[ "$par_use_oq" == "false" ]] && unset par_use_oq -[[ "$par_copy_tags" == "false" ]] && unset par_copy_tags -[[ "$par_casava" == "false" ]] && unset par_casava - -samtools fasta \ - ${par_no_suffix:+-n} \ - ${par_suffix:+-N} \ - ${par_use_oq:+-O} \ - ${par_singleton:+-s "$par_singleton"} \ - ${par_copy_tags:+-t} \ - ${par_copy_tags_list:+-T "$par_copy_tags_list"} \ - ${par_read1:+-1 "$par_read1"} \ - ${par_read2:+-2 "$par_read2"} \ - ${par_output_reads:+-o "$par_output_reads"} \ - ${par_output_reads_both:+-0 "$par_output_reads_both"} \ - ${par_filter_flags:+-f "$par_filter_flags"} \ - ${par_excl_flags:+-F "$par_excl_flags"} \ - ${par_incl_flags:+--rf "$par_incl_flags"} \ - ${par_excl_flags_all:+-G "$par_excl_flags_all"} \ - ${par_aux_tag:+-d "$par_aux_tag"} \ - ${par_aux_tag_file:+-D "$par_aux_tag_file"} \ - ${par_casava:+-i} \ - ${par_compression:+-c "$par_compression"} \ - ${par_index1:+--i1 "$par_index1"} \ - ${par_index2:+--i2 "$par_index2"} \ - ${par_barcode_tag:+--barcode-tag "$par_barcode_tag"} \ - ${par_quality_tag:+--quality-tag "$par_quality_tag"} \ - ${par_index_format:+--index-format "$par_index_format"} \ - "$par_input" \ - > "$par_output" -