File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -688,10 +688,20 @@ task MultiQC {
688688 ${"--config " + config } \
689689 ${"--cl-config " + config_yaml }
690690
691+ # Ensure output directory exists (MultiQC may remove it if no results found)
692+ mkdir -p "${out_dir} "
693+
691694 if [ -z "${file_name} " ]; then
692695 mv "${out_dir} /${report_filename} _report.html" "${out_dir} /${report_filename} .html"
693696 fi
694697
698+ # Create placeholder HTML report if MultiQC didn't create one (happens when no valid results found)
699+ if [ ! -f "${out_dir} /${report_filename} .html" ]; then
700+ echo "<!DOCTYPE html><html><head><meta charset=\" UTF-8\" ><title>MultiQC Report</title></head><body><h1>MultiQC Report</h1><p>No analysis results found in input files.</p></body></html>" > "${out_dir} /${report_filename} .html"
701+ fi
702+
703+ # Ensure data directory exists before tarring (MultiQC only creates it when results are found)
704+ mkdir -p "${out_dir} /${report_filename} _data"
695705 tar -c "${out_dir} /${report_filename} _data" | gzip -c > "${report_filename} _data.tar.gz"
696706 }
697707
You can’t perform that action at this time.
0 commit comments