Skip to content

Commit

Permalink
reorganized seqtk namespace + added seqtk subseq config and script
Browse files Browse the repository at this point in the history
  • Loading branch information
jakubmajercik committed Jul 5, 2024
1 parent 796c3bc commit 51c69e9
Show file tree
Hide file tree
Showing 12 changed files with 83 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/seqtk/seqtk_sample/config.vsh.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ test_resources:
- type: bash_script
path: test.sh
- type: file
path: test_data
path: ../test_data

engines:
- type: docker
Expand Down
2 changes: 1 addition & 1 deletion src/seqtk/seqtk_sample/script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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" \
Expand Down
2 changes: 1 addition & 1 deletion src/seqtk/seqtk_sample/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

#########################################################################################
Expand Down
60 changes: 60 additions & 0 deletions src/seqtk/seqtk_subseq/config.vsh.yaml
Original file line number Diff line number Diff line change
@@ -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
7 changes: 7 additions & 0 deletions src/seqtk/seqtk_subseq/help.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
```
seqtk_sample
```
Usage: seqtk sample [-2] [-s seed=11] <in.fa> <frac>|<number> > <out.fa>

Options: -s INT RNG seed [11]
-2 2-pass mode: twice as slow but with much reduced memory
11 changes: 11 additions & 0 deletions src/seqtk/seqtk_subseq/script.sh
Original file line number Diff line number Diff line change
@@ -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"
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 51c69e9

Please sign in to comment.