diff --git a/assets/multiqc_config.yml b/assets/multiqc_config.yml
index 5ad8bf4..16ee327 100644
--- a/assets/multiqc_config.yml
+++ b/assets/multiqc_config.yml
@@ -23,6 +23,11 @@ custom_data:
description: |
RGB map from RAW data versus RGB map after gradient correction. Corpus callosum should be in red.
### **Using the option use_preqc is highly experimental. Please be careful.**
+
+ Be careful: If the colours match the reference image, it is important to ALSO look at the
+ eigenvectors of the tensors from the DTI model located in the folder (
dwi/sub-01_model-tensor_param-v1_dwimap.nii.gz)
+ to ensure that the orientation is correct (see
FAQ).
+
plot_type: "image"
pre_qc_sampling_mqc:
diff --git a/assets/nf-mouse-light-logo.png b/assets/nf-mouse-light-logo.png
index 37c1a99..7750d96 100644
Binary files a/assets/nf-mouse-light-logo.png and b/assets/nf-mouse-light-logo.png differ
diff --git a/assets/reference_rgb_mqc.png b/assets/reference_rgb_mqc.png
new file mode 100644
index 0000000..49c32fe
Binary files /dev/null and b/assets/reference_rgb_mqc.png differ
diff --git a/main.nf b/main.nf
index 794cb3b..ada0a11 100644
--- a/main.nf
+++ b/main.nf
@@ -49,10 +49,12 @@ workflow get_data {
mask_channel = Channel.fromPath("$input/**/*mask.nii.gz")
.map { mask_file -> def sid = mask_file.parent.name
[[id: sid], mask_file] }
+ template_channel = Channel.fromPath("$projectDir/assets/reference_rgb_mqc.png")
emit:
dwi = dwi_channel
mask = mask_channel
+ template_rgb = template_channel
}
workflow {
@@ -77,9 +79,10 @@ workflow {
bval: [meta, bval]
bvec: [meta, bvec]
}
+ ch_ref_rgb = data.template_rgb
if ( params.run_preqc ) {
- PRE_QC(ch_dwi_bvalbvec.dwi.join(ch_dwi_bvalbvec.bvs_files))
+ PRE_QC(ch_dwi_bvalbvec.dwi.join(ch_dwi_bvalbvec.bvs_files).combine(ch_ref_rgb))
ch_multiqc_files = ch_multiqc_files.mix(PRE_QC.out.rgb_mqc)
ch_multiqc_files = ch_multiqc_files.mix(PRE_QC.out.sampling_mqc)
if (params.use_preqc){
@@ -222,5 +225,5 @@ workflow {
return tuple(meta, files)
}
- MULTIQC(ch_multiqc_files, [], ch_multiqc_config.toList(), [], channel.fromPath("${projectDir}/assets/logo_bg.png").toList(), [], [])
+ MULTIQC(ch_multiqc_files, [], ch_multiqc_config.toList(), [], channel.fromPath("${projectDir}/assets/nf-mouse-light-logo.png").toList(), [], [])
}
diff --git a/modules/local/mouse/preqc/main.nf b/modules/local/mouse/preqc/main.nf
index 2170f4e..d69d823 100644
--- a/modules/local/mouse/preqc/main.nf
+++ b/modules/local/mouse/preqc/main.nf
@@ -5,7 +5,7 @@ process PRE_QC {
container "scilus/scilus:2.2.0"
input:
- tuple val(meta), path(dwi), path(bval), path(bvec)
+ tuple val(meta), path(dwi), path(bval), path(bvec), path(ref_rgb)
output:
tuple val(meta), path("*__stride_dwi.nii.gz") , emit: dwi
@@ -115,11 +115,11 @@ process PRE_QC {
${prefix}__sag_slice_\${mid_slice_sagittal}.png \
${prefix}_rgb_\${p}_mqc.png
- convert -annotate +20+230 "RGB \${p}" -fill white -pointsize 30 ${prefix}_rgb_\${p}_mqc.png ${prefix}_rgb_\${p}_mqc.png
+ convert -annotate +20+40 "RGB \${p}" -fill white -pointsize 30 -undercolor black ${prefix}_rgb_\${p}_mqc.png ${prefix}_rgb_\${p}_mqc.png
rm -rf *_slice_*png
done
- convert -append ${prefix}_rgb_pre_mqc.png ${prefix}_rgb_post_mqc.png ${prefix}__rgb_mqc.png
+ convert -append ${prefix}_rgb_pre_mqc.png ${prefix}_rgb_post_mqc.png $ref_rgb ${prefix}__rgb_mqc.png
cat <<-END_VERSIONS > versions.yml
"${task.process}":