Skip to content

Commit

Permalink
minimal working script
Browse files Browse the repository at this point in the history
  • Loading branch information
dorien-er committed Feb 23, 2024
1 parent 877b2dd commit 7e7b38f
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 30 deletions.
52 changes: 29 additions & 23 deletions src/multiqc/config.vsh.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,35 @@ functionality:
- name: "--input"
type: file
multiple: true
example: data/,data/*_sample.zip,/tmp/results
multiple_sep: ":"
example: data/results/
description: |
File paths to be searched for analysis results to be included in the report.
- name: "--input_file"
- name: "Ouput"
arguments:
- name: "--output_report"
type: file
example: path/to/input_file.txt
direction: output
required: false
example: multiqc_report.html
description: |
Supply a file containing a list of file paths to be searched, one per row
- name: "--multiqc_custom_config"
Filepath of the generated report.
- name: "--output_data"
type: file
example: path/to/multiqc_config.yml
required: false
direction: output
example: multiqc_data
description: |
Specific config file to load, after those in MultiQC dir / home dir / working dir
Output directory for parsed data files.
- name: "--output_plots"
type: file
required: false
direction: output
example: multiqc_plots
description: |
Output directory for generated plots.
- name: "Modules and analyses to run"
arguments:
- name: "--include_modules"
Expand Down Expand Up @@ -100,6 +115,12 @@ functionality:
type: file
description: Custom CSS file to add to the final report
example: custom_style_sheet.css
- name: "--multiqc_custom_config"
type: file
example: path/to/multiqc_config.yml
description: |
Specific config file to load, after those in MultiQC dir / home dir / working dir

- name: "MultiQC behaviour"
arguments:
Expand Down Expand Up @@ -128,21 +149,6 @@ functionality:
type: boolean_true
description: Disable coloured log output.

- name: "Ouput"
arguments:
- name: "--output"
type: file
direction: output
default: path/to/multiqc_report.html
- name: "--data"
type: file
direction: output
default: multiqc_data
- name: "--plots"
type: file
direction: output
default: multiqc_plots

- name: "Output format"
arguments:
- name: "--flat"
Expand Down
22 changes: 15 additions & 7 deletions src/multiqc/script.sh
Original file line number Diff line number Diff line change
@@ -1,14 +1,22 @@
#!/bin/bash

if [[ -n "$par_input" ]]; then
IFS="," read -ra inputs <<< $par_input
IFS=":" read -ra inputs <<< $par_input
unset IFS
input=()
for path in "${inputs[@]}"; do
input+=("$path")
done
fi


multiqc \
"${input[@]}"
"${inputs[@]}"

if [[ -n "$par_output_report" ]]; then
mv multiqc_report.html "$par_output_report"
fi

# if [[ -n "$par_output_data" ]]; then
# mv "data" "$par_output_data"
# fi


# if [[ -n "$par_output_plots" ]]; then
# mv "plots" "$par_output_data"
# fi
16 changes: 16 additions & 0 deletions src/multiqc/test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash

echo ">>> Testing $meta_functionality_name"
"$meta_executable" \
--input "$meta_resources_dir/multiqc_test_data/" \
--report multiqc_report.html \
--data multiqc_data \
--plots multiqc_plots

echo ">>> Check whether output exists"
[ ! -f multiqc_report.html ] && echo "MultiQC report does not exist!" && exit 1
[ ! -d multiqc_data ] && echo "MultiQC data directory does not exist!" && exit 1
[ ! -d multiqc_plots ] && echo "MultiQC plots directory does not exist!" && exit 1

echo "All tests succeeded!"
exit 0

0 comments on commit 7e7b38f

Please sign in to comment.