Skip to content

Commit

Permalink
Merge branch 'viash-hub:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
emmarousseau authored Jul 2, 2024
2 parents 44b3fcc + ec69d9a commit 6cc4f94
Show file tree
Hide file tree
Showing 9 changed files with 72 additions and 11 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@

* `pear`: fix component not exiting with the correct exitcode when PEAR fails.

* `cutadapt`: fix `--par_quality_cutoff_r2` argument.

* `cutadapt`: demultiplexing is now disabled by default. It can be re-enabled by using `demultiplex_mode`.

## MINOR CHANGES

* `busco` components: update BUSCO to `5.7.1`.

# biobox 0.1.0

## BREAKING CHANGES
Expand All @@ -12,6 +20,7 @@
Viash 0.9.0 in order to avoid issues with the current default separator `:` unintentionally
splitting up certain file paths.


## NEW FEATURES

* `arriba`: Detect gene fusions from RNA-seq data (PR #1).
Expand Down
2 changes: 1 addition & 1 deletion src/busco/busco_download_datasets/config.vsh.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ test_resources:
path: test.sh
engines:
- type: docker
image: quay.io/biocontainers/busco:5.6.1--pyhdfd78af_0
image: quay.io/biocontainers/busco:5.7.1--pyhdfd78af_0
setup:
- type: docker
run: |
Expand Down
2 changes: 1 addition & 1 deletion src/busco/busco_list_datasets/config.vsh.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ test_resources:
path: test.sh
engines:
- type: docker
image: quay.io/biocontainers/busco:5.6.1--pyhdfd78af_0
image: quay.io/biocontainers/busco:5.7.1--pyhdfd78af_0
setup:
- type: docker
run: |
Expand Down
6 changes: 5 additions & 1 deletion src/busco/busco_run/config.vsh.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,10 @@ argument_groups:
- name: MetaEuk Settings
arguments:
- name: --metaeuk
type: boolean_true
description: |
Use Metaeuk gene predictor.
- name: --metaeuk_parameters
type: string
description: |
Expand All @@ -204,7 +208,7 @@ test_resources:
path: test_data
engines:
- type: docker
image: quay.io/biocontainers/busco:5.6.1--pyhdfd78af_0
image: quay.io/biocontainers/busco:5.7.1--pyhdfd78af_0
setup:
- type: docker
run: |
Expand Down
9 changes: 6 additions & 3 deletions src/busco/busco_run/help.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
busco -h
```

Welcome to BUSCO 5.6.1: the Benchmarking Universal Single-Copy Ortholog assessment tool.
usage: busco -i [SEQUENCE_FILE] -l [LINEAGE] -o [OUTPUT_NAME] -m [MODE] [OTHER OPTIONS]

Welcome to BUSCO 5.7.1: the Benchmarking Universal Single-Copy Ortholog assessment tool.
For more detailed usage information, please review the README file provided with this distribution and the BUSCO user guide. Visit this page https://gitlab.com/ezlab/busco#how-to-cite-busco to see how to cite BUSCO

optional arguments:
Expand All @@ -18,7 +20,7 @@ optional arguments:
-l LINEAGE, --lineage_dataset LINEAGE
Specify the name of the BUSCO lineage to be used.
--augustus Use augustus gene predictor for eukaryote runs
--augustus_parameters --PARAM1=VALUE1,--PARAM2=VALUE2
--augustus_parameters "--PARAM1=VALUE1,--PARAM2=VALUE2"
Pass additional arguments to Augustus. All arguments should be contained within a single string with no white space, with each argument separated by a comma.
--augustus_species AUGUSTUS_SPECIES
Specify a species for Augustus training.
Expand All @@ -42,11 +44,12 @@ optional arguments:
--limit N How many candidate regions (contig or transcript) to consider per BUSCO (default: 3)
--list-datasets Print the list of available BUSCO datasets
--long Optimization Augustus self-training mode (Default: Off); adds considerably to the run time, but can improve results for some non-model organisms
--metaeuk Use Metaeuk gene predictor
--metaeuk_parameters "--PARAM1=VALUE1,--PARAM2=VALUE2"
Pass additional arguments to Metaeuk for the first run. All arguments should be contained within a single string with no white space, with each argument separated by a comma.
--metaeuk_rerun_parameters "--PARAM1=VALUE1,--PARAM2=VALUE2"
Pass additional arguments to Metaeuk for the second run. All arguments should be contained within a single string with no white space, with each argument separated by a comma.
--miniprot Use miniprot gene predictor
--miniprot Use Miniprot gene predictor
--skip_bbtools Skip BBTools for assembly statistics
--offline To indicate that BUSCO cannot attempt to download files
--opt-out-run-stats Opt out of data collection. Information on the data collected is available in the user guide.
Expand Down
1 change: 1 addition & 0 deletions src/busco/busco_run/script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ busco \
${par_force:+--force} \
${par_limit:+--limit "$par_limit"} \
${par_long:+--long} \
${par_metaeuk:+--metaeuk} \
${par_metaeuk_parameters:+--metaeuk_parameters "$par_metaeuk_parameters"} \
${par_metaeuk_rerun_parameters:+--metaeuk_rerun_parameters "$par_metaeuk_rerun_parameters"} \
${par_miniprot:+--miniprot} \
Expand Down
18 changes: 18 additions & 0 deletions src/cutadapt/config.vsh.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,24 @@ argument_groups:
Check both the read and its reverse complement for adapter
matches. If match is on reverse-complemented version,
output that one.
####################################################################
- name: "Demultiplexing options"
arguments:
- name: "--demultiplex_mode"
type: string
choices: ["single", "unique_dual", "combinatorial_dual"]
required: false
description: |
Enable demultiplexing and set the mode for it.
With mode 'unique_dual', adapters from the first and second read are used,
and the indexes from the reads are only used in pairs. This implies
--pair_adapters.
Enabling mode 'combinatorial_dual' allows all combinations of the sets of indexes
on R1 and R2. It is necessary to write each read pair to an output
file depending on the adapters found on both R1 and R2.
Mode 'single', uses indexes or barcodes located at the 5'
end of the R1 read (single).
####################################################################
- name: Read modifications
Expand Down
31 changes: 26 additions & 5 deletions src/cutadapt/script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ mod_args=$(echo \
${par_cut_r2:+--cut_r2 "${par_cut_r2}"} \
${par_nextseq_trim:+--nextseq-trim "${par_nextseq_trim}"} \
${par_quality_cutoff:+--quality-cutoff "${par_quality_cutoff}"} \
${par_quality_cutoff_r2:+--quality-cutoff_r2 "${par_quality_cutoff_r2}"} \
${par_quality_cutoff_r2:+-Q "${par_quality_cutoff_r2}"} \
${par_quality_base:+--quality-base "${par_quality_base}"} \
${par_poly_a:+--poly-a} \
${par_length:+--length "${par_length}"} \
Expand Down Expand Up @@ -196,14 +196,35 @@ else
ext="fasta"
fi

if [ $mode = "se" ]; then
demultiplex_mode="$par_demultiplex_mode"
if [[ $mode == "se" ]]; then
if [[ "$demultiplex_mode" == "unique_dual" ]] || [[ "$demultiplex_mode" == "combinatorial_dual" ]]; then
echo "Demultiplexing dual indexes is not possible with single-end data."
exit 1
fi
prefix="trimmed_"
if [[ ! -z "$demultiplex_mode" ]]; then
prefix="{name}_"
fi
output_args=$(echo \
--output "$output_dir/{name}_001.$ext" \
--output "$output_dir/${prefix}001.$ext" \
)
else
demultiplex_indicator_r1='{name}_'
demultiplex_indicator_r2=$demultiplex_indicator_r1
if [[ "$demultiplex_mode" == "combinatorial_dual" ]]; then
demultiplex_indicator_r1='{name1}_{name2}_'
demultiplex_indicator_r2='{name1}_{name2}_'
fi
prefix_r1="trimmed_"
prefix_r2="trimmed_"
if [[ ! -z "$demultiplex_mode" ]]; then
prefix_r1=$demultiplex_indicator_r1
prefix_r2=$demultiplex_indicator_r2
fi
output_args=$(echo \
--output "$output_dir/{name}_R1_001.$ext" \
--paired-output "$output_dir/{name}_R2_001.$ext" \
--output "$output_dir/${prefix_r1}R1_001.$ext" \
--paired-output "$output_dir/${prefix_r2}R2_001.$ext" \
)
fi

Expand Down
5 changes: 5 additions & 0 deletions src/cutadapt/test.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/bin/bash

set -e
set -eo pipefail

#############################################
# helper functions
Expand Down Expand Up @@ -57,6 +58,7 @@ EOF
--adapter ADAPTER \
--input example.fa \
--fasta \
--demultiplex_mode single \
--no_match_adapter_wildcards \
--json

Expand Down Expand Up @@ -101,6 +103,7 @@ EOF
--output "out_test1/*.fasta" \
--adapter ADAPTER \
--input example.fa \
--demultiplex_mode single \
--fasta \
--no_match_adapter_wildcards \
--json
Expand Down Expand Up @@ -160,6 +163,7 @@ EOF
--adapter AAAAA \
--adapter_fasta adapters1.fasta \
--adapter_fasta adapters2.fasta \
--demultiplex_mode single \
--input example.fa \
--fasta \
--json
Expand Down Expand Up @@ -224,6 +228,7 @@ EOF
--input example_R1.fastq \
--input_r2 example_R2.fastq \
--quality_cutoff 20 \
--demultiplex_mode unique_dual \
--json \
---cpus 1

Expand Down

0 comments on commit 6cc4f94

Please sign in to comment.