From 31f8199b638555323246347ff26112cb02023671 Mon Sep 17 00:00:00 2001 From: Guillaume Poirier-Morency Date: Thu, 9 May 2024 15:54:53 -0700 Subject: [PATCH] Add a script for synchronizing the MultiQC reports --- scripts/sync-multiqc-reports | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100755 scripts/sync-multiqc-reports diff --git a/scripts/sync-multiqc-reports b/scripts/sync-multiqc-reports new file mode 100755 index 0000000..79012ca --- /dev/null +++ b/scripts/sync-multiqc-reports @@ -0,0 +1,22 @@ +#!/bin/bash + +set -e + +PIPELINE_OUTPUT_DIR=/cosmos/data/pipeline-output/rnaseq +GEMMA_DATA_DIR=/space/gemmaData + +human_reference_id=$(grep 'human_reference_id=' luigi.cfg | sed 's/human_reference_id=//') +mouse_reference_id=$(grep 'mouse_reference_id=' luigi.cfg | sed 's/mouse_reference_id=//') +rat_reference_id=$(grep 'rat_reference_id=' luigi.cfg | sed 's/rat_reference_id=//') + +echo $human_reference_id $mouse_reference_id $rat_reference_id + +echo "Copying MultiQC reports for the following references: $human_reference_id, $mouse_reference_id, $rat_reference_id" + +for f in $PIPELINE_OUTPUT_DIR/report/{$human_reference_id,$mouse_reference_id,$rat_reference_id}/*; do + experiment_id=$(basename $f) + destdir=$GEMMA_DATA_DIR/metadata/$experiment_id/MultiQCReports + echo "Copying MultiQC report for $experiment_id from $f to $destdir..." + mkdir -p "$destdir" + rsync -a "$f/" "$destdir/" +done