Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dorien-er committed Jan 30, 2024
1 parent 12722d1 commit dd97b4f
Show file tree
Hide file tree
Showing 6 changed files with 53 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/busco/busco/config.vsh.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ functionality:
required: false
direction: output
type: file
example: missing_list.tsv
example: missing_busco_list.tsv
description: |
Missing list output in TSV format.
- name: --output_dir
Expand Down
2 changes: 1 addition & 1 deletion src/busco/busco/script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ if [[ -n "$par_full_table" ]]; then
find "$tmp_dir/$prefix" -maxdepth 1 -type d -name 'run_*' -exec cp {}/full_table.tsv "$par_full_table" \;
fi
if [[ -n "$par_missing_busco_list" ]]; then
find "$tmp_dir/$prefix" -maxdepth 1 -type d -name 'run_*' -exec cp {}/missing_busco_list.txt "$par_missing_busco_list" \;
find "$tmp_dir/$prefix" -maxdepth 1 -type d -name 'run_*' -exec cp {}/missing_busco_list.tsv "$par_missing_busco_list" \;
fi
if [[ -n "$par_output_dir" ]]; then
cp -r $tmp_dir/$prefix/run_* $par_output_dir
Expand Down
19 changes: 9 additions & 10 deletions src/busco/busco/test.sh
Original file line number Diff line number Diff line change
@@ -1,25 +1,24 @@
test_dir="$meta_resources_dir/test_data"

echo "> Running busco"
echo "$(busco --version 2>&1 | sed -n 's/BUSCO \([0-9.]*\)/\1/p')"

"$meta_executable" \
--input $test_dir/protein.fasta \
--mode protein \
--lineage_dataset stramenopiles_odb10 \
--output_dir output
ls -la output/run_stramenopiles_odb10

echo ">> Checking output"
[ ! -f "output/run_stramenopiles_odb10/full_table.tsv" ] && echo "full_table.tsv does not exist" && exit 1
[ ! -f "output/run_stramenopiles_odb10/missing_busco_list.tsv" ] && echo "missing_busco_list.tsv does not exist" && exit 1
[ ! -f "output/run_stramenopiles_odb10/short_summary.json" ] && echo "short_summary.json does not exist" && exit 1
[ ! -f "output/run_stramenopiles_odb10/short_summary.txt" ] && echo "short_summary.txt does not exist" && exit 1
[ ! -f "output/full_table.tsv" ] && echo "full_table.tsv does not exist" && exit 1
[ ! -f "output/missing_busco_list.tsv" ] && echo "missing_busco_list.tsv does not exist" && exit 1
[ ! -f "output/short_summary.json" ] && echo "short_summary.json does not exist" && exit 1
[ ! -f "output/short_summary.txt" ] && echo "short_summary.txt does not exist" && exit 1

echo ">> Checking if output is empty"
[ ! -s "output/run_stramenopiles_odb10/full_table.tsv" ] && echo "full_table.tsv is empty" && exit 1
[ ! -s "output/run_stramenopiles_odb10/missing_busco_list.tsv" ] && echo "missing_busco_list.tsv is empty" && exit 1
[ ! -s "output/run_stramenopiles_odb10/short_summary.json" ] && echo "short_summary.json is empty" && exit 1
[ ! -s "output/run_stramenopiles_odb10/short_summary.txt" ] && echo "short_summary.txt is empty" && exit 1

[ ! -s "output/full_table.tsv" ] && echo "full_table.tsv is empty" && exit 1
[ ! -s "output/missing_busco_list.tsv" ] && echo "missing_busco_list.tsv is empty" && exit 1
[ ! -s "output/short_summary.json" ] && echo "short_summary.json is empty" && exit 1
[ ! -s "output/short_summary.txt" ] && echo "short_summary.txt is empty" && exit 1

rm -r output/
36 changes: 36 additions & 0 deletions src/busco/busco_list_datasets/config.vsh.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
functionality:
name: busco
description: Lists the available busco datasets
info:
keywords: [lineage datasets]
homepage: https://busco.ezlab.org/
documentation: https://busco.ezlab.org/busco_userguide.html
repository: https://gitlab.com/ezlab/busco
reference: "10.1007/978-1-4939-9173-0_14"
licence: MIT
argument_groups:
- name: Outputs
arguments:
- name: --output
alternatives: ["-o"]
direction: output
type: file
description: |
Output file of the available busco datasets
required: false
default: busco_dataset_list.txt
example: file.txt
resources:
- type: bash_script
path: script.sh
test_resources:
- type: bash_script
path: test.sh
platforms:
- type: docker
image: quay.io/biocontainers/busco:5.6.1--pyhdfd78af_0
setup:
- type: docker
run: |
busco --version | sed 's/BUSCO\s\(.*\)/busco: "\1"/' > /var/software_versions.txt
- type: nextflow
6 changes: 6 additions & 0 deletions src/busco/busco_list_datasets/script.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash

## VIASH START
## VIASH END

busco --list-datasets > $par_output
Empty file.

0 comments on commit dd97b4f

Please sign in to comment.