Skip to content

Commit 37427e4

Browse files
authored
Merge pull request #58 from broadinstitute/dp-multiqc-hotfix
fix multiqc task in the event of identical file basename inputs
2 parents 10b5656 + 59191a3 commit 37427e4

File tree

1 file changed

+6
-14
lines changed

1 file changed

+6
-14
lines changed

pipes/WDL/tasks/tasks_reports.wdl

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -270,8 +270,6 @@ task MultiQC {
270270
Array[File] input_files = []
271271

272272
Boolean force = false
273-
Boolean dirs = false
274-
Int? dirs_depth
275273
Boolean full_names = false
276274
String? title
277275
String? comment
@@ -282,7 +280,6 @@ task MultiQC {
282280
String? ignore_analysis_files
283281
String? ignore_sample_names
284282
File? sample_names
285-
File? file_with_list_of_input_paths
286283
Array[String]+? exclude_modules
287284
Array[String]+? module_to_use
288285
Boolean data_dir = false
@@ -305,32 +302,29 @@ task MultiQC {
305302
output_data_format: { description: "[tsv|yaml|json] default:tsv" }
306303
}
307304

308-
String input_directory="multiqc-input"
309305
# get the basename in all wdl use the filename specified (sans ".html" extension, if specified)
310306
String report_filename = if (defined(file_name)) then basename(select_first([file_name]), ".html") else "multiqc"
311307

312308
command {
313309
set -ex -o pipefail
314310
315-
mkdir -p ${input_directory} ${out_dir}
316-
317-
ln -s ${sep=' ' input_files} ${input_directory}
311+
echo "${sep='\n' input_files}" > input-filenames.txt
312+
echo "" >> input-filenames.txt
318313
319314
multiqc \
315+
--file-list input-filenames.txt \
316+
--dirs \
317+
--outdir "${out_dir}" \
320318
${true="--force" false="" force} \
321-
${true="--dirs" false="" dirs} \
322-
${"--dirs-depth " + dirs_depth} \
323319
${true="--fullnames" false="" full_names} \
324320
${"--title " + title} \
325321
${"--comment " + comment} \
326322
${"--filename " + file_name} \
327-
${"--outdir " + out_dir} \
328323
${"--template " + template} \
329324
${"--tag " + tag} \
330325
${"--ignore " + ignore_analysis_files} \
331326
${"--ignore-samples" + ignore_sample_names} \
332327
${"--sample-names " + sample_names} \
333-
${"--file-list " + file_with_list_of_input_paths} \
334328
${true="--exclude " false="" defined(exclude_modules)}${sep=" --exclude " exclude_modules} \
335329
${true="--module " false="" defined(module_to_use)}${sep=" --module " module_to_use} \
336330
${true="--data-dir" false="" data_dir} \
@@ -344,14 +338,12 @@ task MultiQC {
344338
${true="--pdf" false="" pdf} \
345339
${false="--no-megaqc-upload" true="" megaQC_upload} \
346340
${"--config " + config} \
347-
${"--cl-config " + config_yaml } \
348-
${input_directory}
341+
${"--cl-config " + config_yaml }
349342
350343
if [ -z "${file_name}" ]; then
351344
mv "${out_dir}/${report_filename}_report.html" "${out_dir}/${report_filename}.html"
352345
fi
353346
354-
#tar -czvf "${report_filename}_data.tar.gz" "${out_dir}/${report_filename}_data"
355347
tar -c "${out_dir}/${report_filename}_data" | gzip -c > "${report_filename}_data.tar.gz"
356348
}
357349

0 commit comments

Comments
 (0)