Skip to content

Commit

Permalink
address pr comments
Browse files Browse the repository at this point in the history
  • Loading branch information
dorien-er committed Aug 20, 2024
1 parent 44b40e8 commit 9489b1b
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 24 deletions.
3 changes: 0 additions & 3 deletions src/qualimap/qualimap_rnaseq/config.vsh.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,11 @@ argument_groups:
type: string
required: false
choices: ["uniquely-mapped-reads", "proportional"]
default: uniquely-mapped-reads
description: Counting algorithm (uniquely-mapped-reads (default) or proportional).
- name: "--sequencing_protocol"
type: string
required: false
choices: ["non-strand-specific", "strand-specific-reverse", "strand-specific-forward"]
default: non-strand-specific
description: Sequencing library protocol (strand-specific-forward, strand-specific-reverse or non-strand-specific (default)).
- name: "--paired"
type: boolean_true
Expand All @@ -82,7 +80,6 @@ argument_groups:
- name: "--java_memory_size"
type: string
required: false
default: 4G
description: maximum Java heap memory size, default = 4G.

resources:
Expand Down
28 changes: 14 additions & 14 deletions src/qualimap/qualimap_rnaseq/script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ set -eo pipefail
tmp_dir=$(mktemp -d -p "$meta_temp_dir" qualimap_XXXXXXXXX)

# Handle output parameters
if [ -n "$par_output_report" ]; then
outfile=$(basename "$par_output_report")
if [ -n "$par_report" ]; then
outfile=$(basename "$par_report")
report_extension="${outfile##*.}"
fi

if [ -n "$par_output_counts" ]; then
counts=$(basename "$par_output_counts")
if [ -n "$par_counts" ]; then
counts=$(basename "$par_counts")
fi

# disable flags
Expand All @@ -28,23 +28,23 @@ qualimap rnaseq \
-outdir "$tmp_dir" \
${par_num_pr_bases:+--num-pr-bases $par_num_pr_bases} \
${par_num_tr_bias:+--num-tr-bias $par_num_tr_bias} \
${par_output_report:+-outformat $report_extension} \
${par_report:+-outformat $report_extension} \
${par_paired:+--paired} \
${par_sorted:+--sorted} \
${par_output_report:+-outfile "$outfile"} \
${par_output_counts:+-oc "$counts"}
${par_report:+-outfile "$outfile"} \
${par_counts:+-oc "$counts"}

# Move output files
mv "$tmp_dir/rnaseq_qc_results.txt" "$par_output"
mv "$tmp_dir/rnaseq_qc_results.txt" "$par_qc_results"

if [ -n "$par_output_report" ] && [ $report_extension = "html" ]; then
mv "$tmp_dir/qualimapReport.html" "$par_output_report"
if [ -n "$par_report" ] && [ $report_extension = "html" ]; then
mv "$tmp_dir/qualimapReport.html" "$par_report"
fi

if [ -n "$par_output_report" ] && [ $report_extension = "pdf" ]; then
mv "$tmp_dir/$outfile" "$par_output_report"
if [ -n "$par_report" ] && [ $report_extension = "pdf" ]; then
mv "$tmp_dir/$outfile" "$par_report"
fi

if [ -n "$par_output_counts" ]; then
mv "$tmp_dir/$counts" "$par_output_counts"
if [ -n "$par_counts" ]; then
mv "$tmp_dir/$counts" "$par_counts"
fi
14 changes: 7 additions & 7 deletions src/qualimap/qualimap_rnaseq/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ echo "> Running qualimap with html output report"
"$meta_executable" \
--bam $test_dir/a.bam \
--gtf $test_dir/annotation.gtf \
--output_report report.html \
--output_counts counts.txt \
--output output.txt
--report report.html \
--counts counts.txt \
--qc_results output.txt

echo ">> Checking output"
assert_file_exists "report.html"
Expand Down Expand Up @@ -71,9 +71,9 @@ echo "> Running qualimap with pdf output report"
"$meta_executable" \
--bam $test_dir/a.bam \
--gtf $test_dir/annotation.gtf \
--output_report report.pdf \
--output_counts counts.txt \
--output output.txt
--report report.pdf \
--counts counts.txt \
--qc_results output.txt

echo ">> Checking output"
assert_file_exists "report.pdf"
Expand All @@ -97,7 +97,7 @@ echo "> Running qualimap without report and counts output"
"$meta_executable" \
--bam $test_dir/a.bam \
--gtf $test_dir/annotation.gtf \
--output output.txt
--qc_results output.txt

echo ">> Checking output"
assert_file_doesnt_exist "report.pdf"
Expand Down

0 comments on commit 9489b1b

Please sign in to comment.