From 51c69e9d1d5a6233e3d9e8f954b2a4d792d19646 Mon Sep 17 00:00:00 2001 From: jakubmajercik Date: Fri, 5 Jul 2024 14:56:54 +0200 Subject: [PATCH] reorganized seqtk namespace + added seqtk subseq config and script --- src/seqtk/seqtk_sample/config.vsh.yaml | 2 +- src/seqtk/seqtk_sample/script.sh | 2 +- src/seqtk/seqtk_sample/test.sh | 2 +- src/seqtk/seqtk_subseq/config.vsh.yaml | 60 ++++++++++++++++++ src/seqtk/seqtk_subseq/help.txt | 7 ++ src/seqtk/seqtk_subseq/script.sh | 11 ++++ .../test_data/reads/a.1.fastq.gz | Bin .../test_data/reads/a.2.fastq.gz | Bin .../test_data/reads/a.fastq | 0 .../test_data/reads/a.fastq.gz | Bin .../test_data/reads/id.list | 0 .../{seqtk_sample => }/test_data/script.sh | 4 +- 12 files changed, 83 insertions(+), 5 deletions(-) create mode 100644 src/seqtk/seqtk_subseq/config.vsh.yaml create mode 100644 src/seqtk/seqtk_subseq/help.txt create mode 100644 src/seqtk/seqtk_subseq/script.sh rename src/seqtk/{seqtk_sample => }/test_data/reads/a.1.fastq.gz (100%) rename src/seqtk/{seqtk_sample => }/test_data/reads/a.2.fastq.gz (100%) rename src/seqtk/{seqtk_sample => }/test_data/reads/a.fastq (100%) rename src/seqtk/{seqtk_sample => }/test_data/reads/a.fastq.gz (100%) rename src/seqtk/{seqtk_sample => }/test_data/reads/id.list (100%) rename src/seqtk/{seqtk_sample => }/test_data/script.sh (61%) diff --git a/src/seqtk/seqtk_sample/config.vsh.yaml b/src/seqtk/seqtk_sample/config.vsh.yaml index 9f82c03a..63c3271a 100644 --- a/src/seqtk/seqtk_sample/config.vsh.yaml +++ b/src/seqtk/seqtk_sample/config.vsh.yaml @@ -44,7 +44,7 @@ test_resources: - type: bash_script path: test.sh - type: file - path: test_data + path: ../test_data engines: - type: docker diff --git a/src/seqtk/seqtk_sample/script.sh b/src/seqtk/seqtk_sample/script.sh index 3ac9ca71..01d981b3 100644 --- a/src/seqtk/seqtk_sample/script.sh +++ b/src/seqtk/seqtk_sample/script.sh @@ -4,7 +4,7 @@ ## VIASH END seqtk sample \ - ${par_2_pass_mode:+-2} \ + ${par_two_pass_mode:+-2} \ ${par_seed:+-s "$par_seed"} \ "$par_input" \ "$par_fraction_number" \ diff --git a/src/seqtk/seqtk_sample/test.sh b/src/seqtk/seqtk_sample/test.sh index f9d942eb..304c2f31 100644 --- a/src/seqtk/seqtk_sample/test.sh +++ b/src/seqtk/seqtk_sample/test.sh @@ -4,7 +4,7 @@ set -e ## VIASH START meta_executable="target/executable/seqtk/seqtk_sample" -meta_resources_dir="src/seqtk/seqtk_sample" +meta_resources_dir="src/seqtk" ## VIASH END ######################################################################################### diff --git a/src/seqtk/seqtk_subseq/config.vsh.yaml b/src/seqtk/seqtk_subseq/config.vsh.yaml new file mode 100644 index 00000000..0cec1761 --- /dev/null +++ b/src/seqtk/seqtk_subseq/config.vsh.yaml @@ -0,0 +1,60 @@ +name: seqtk_subseq +namespace: seqtk +description: +keywords: [tag1, tag2] +links: + repository: https://github.com/lh3/seqtk/tree/v1.4 +license: MIT + +argument_groups: + - name: Inputs + arguments: + - name: --input + type: file + description: The input FASTA/Q file. + required: true + - name: "--regions_file" + type: file + description: | + File with regions to extract. Can be either a list file + with one sequence name per line or a bed file. + required: true + + - name: Outputs + arguments: + - name: --output + type: file + description: The output FASTA/Q file. + required: true + direction: output + + - name: Options + arguments: + - name: "--tab" + type: boolean + description: Output in tab-delimited format. + default: false + - name: "--strand_aware" + type: boolean + description: Strand-aware mode. + default: false + - name: "--line_length" + type: integer + description: Number of bases per line. + default: 60 + +resources: + - type: bash_script + path: script.sh +test_resources: + - type: bash_script + path: test.sh + - type: file + path: ../test_data + +engines: + - type: docker + image: quay.io/biocontainers/seqtk:1.4--he4a0461_2 +runners: + - type: executable + - type: nextflow \ No newline at end of file diff --git a/src/seqtk/seqtk_subseq/help.txt b/src/seqtk/seqtk_subseq/help.txt new file mode 100644 index 00000000..1ca78811 --- /dev/null +++ b/src/seqtk/seqtk_subseq/help.txt @@ -0,0 +1,7 @@ +``` +seqtk_sample +``` +Usage: seqtk sample [-2] [-s seed=11] | > + +Options: -s INT RNG seed [11] + -2 2-pass mode: twice as slow but with much reduced memory diff --git a/src/seqtk/seqtk_subseq/script.sh b/src/seqtk/seqtk_subseq/script.sh new file mode 100644 index 00000000..a04ebbaa --- /dev/null +++ b/src/seqtk/seqtk_subseq/script.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +## VIASH START +## VIASH END + +seqtk sample \ + ${par_tab:+-t} \ + ${par_strand_aware:+-s} \ + ${par_line_length:+-l "$par_line_length"} \ + "$par_input" \ + > "$par_output" \ No newline at end of file diff --git a/src/seqtk/seqtk_sample/test_data/reads/a.1.fastq.gz b/src/seqtk/test_data/reads/a.1.fastq.gz similarity index 100% rename from src/seqtk/seqtk_sample/test_data/reads/a.1.fastq.gz rename to src/seqtk/test_data/reads/a.1.fastq.gz diff --git a/src/seqtk/seqtk_sample/test_data/reads/a.2.fastq.gz b/src/seqtk/test_data/reads/a.2.fastq.gz similarity index 100% rename from src/seqtk/seqtk_sample/test_data/reads/a.2.fastq.gz rename to src/seqtk/test_data/reads/a.2.fastq.gz diff --git a/src/seqtk/seqtk_sample/test_data/reads/a.fastq b/src/seqtk/test_data/reads/a.fastq similarity index 100% rename from src/seqtk/seqtk_sample/test_data/reads/a.fastq rename to src/seqtk/test_data/reads/a.fastq diff --git a/src/seqtk/seqtk_sample/test_data/reads/a.fastq.gz b/src/seqtk/test_data/reads/a.fastq.gz similarity index 100% rename from src/seqtk/seqtk_sample/test_data/reads/a.fastq.gz rename to src/seqtk/test_data/reads/a.fastq.gz diff --git a/src/seqtk/seqtk_sample/test_data/reads/id.list b/src/seqtk/test_data/reads/id.list similarity index 100% rename from src/seqtk/seqtk_sample/test_data/reads/id.list rename to src/seqtk/test_data/reads/id.list diff --git a/src/seqtk/seqtk_sample/test_data/script.sh b/src/seqtk/test_data/script.sh similarity index 61% rename from src/seqtk/seqtk_sample/test_data/script.sh rename to src/seqtk/test_data/script.sh index cd3f2360..049093cd 100755 --- a/src/seqtk/seqtk_sample/test_data/script.sh +++ b/src/seqtk/test_data/script.sh @@ -4,6 +4,6 @@ if [ ! -d /tmp/snakemake-wrappers ]; then fi # copy test data -cp -r /tmp/snakemake-wrappers/bio/seqtk/test/* src/seqtk/seqtk_sample/test_data +cp -r /tmp/snakemake-wrappers/bio/seqtk/test/* src/seqtk/test_data -rm src/seqtk/seqtk_sample/test_data/Snakefile +rm src/seqtk/test_data/Snakefile