diff --git a/submit_trio_wes_archive_project.sh b/submit_trio_wes_archive_project.sh new file mode 100755 index 0000000000000000000000000000000000000000..a0577aa4bb41f81016776aba39703018e66f3c6a --- /dev/null +++ b/submit_trio_wes_archive_project.sh @@ -0,0 +1,59 @@ +#!/bin/bash +#PBS -l walltime=24:00:00 +#PBS -l ncpus=1,mem=2gb +#PBS -q uv2000 +#PBS -N trio_whole_exome_archive_project +#PBS -j oe + +# Expects environment variables to be set +# PROJECT_ID - e.g. 12345_LastnameFirstname +# PRIORITY_DIRS - e.g. 05122019,07122019 (colon delimited if more than one) +# CONFIG_SH - absolute path to configuration script setting environment variables + +#Â Source the configuration file +source $CONFIG_SH + +# Move to the output directory +cd $OUTPUT_DIR + +# Copy bcbio output files +rsync -av *_$PROJECT_DIR* $ARCHIVE_DIR/ + +# Copy qc files +cd qc +mkdir -p $ARCHIVE_DIR/qc +rsync -av $PROJECT_DIR* $ARCHIVE_DIR/qc/ + +# Copy prioritization files +cd ../prioritization +mkdir -p $ARCHIVE_DIR/prioritization + +DIRS=$(echo $PRIORITY_DIRS | tr ":" "\n") + +for dir in $DIRS +do + rsync -av $DIR $ARCHIVE_DIR/prioritization/ +done + +# move to the archive area and check the md5s +cd $ARCHIVE_DIR + +for family_dir in *_$PROJECT_DIR* +do + cd $family_dir + md5sum --check md5sum.txt + cd .. +done + +cd qc +md5sum --check ${PROJECT_ID}_qc_report.md5sum.txt + +cd ../prioritization + +for dir in $DIRS +do + cd $dir + md5sum --check ../$dir.md5sum.txt + cd .. +done + diff --git a/submit_trio_wes_priority_and_qc_checksums.sh b/submit_trio_wes_priority_and_qc_checksums.sh new file mode 100755 index 0000000000000000000000000000000000000000..984367b27d74a7a4f76ad64dd2deee49fc49331d --- /dev/null +++ b/submit_trio_wes_priority_and_qc_checksums.sh @@ -0,0 +1,46 @@ +#!/bin/bash +#PBS -l walltime=48:00:00 +#PBS -l ncpus=1,mem=2gb +#PBS -q sgp +#PBS -N trio_whole_exome_priority_and_qc_checksums +#PBS -j oe + +# Expects environment variables to be set +# PROJECT_ID - e.g. 12345_LastnameFirstname +# PRIORITY_DIRS - e.g. 05122019,07122019 (colon delimited if more than one) +# CONFIG_SH - absolute path to configuration script setting environment variables + +source $CONFIG_SH + +# calculate checksums on the qc files for this project + +cd $OUTPUT_DIR/qc + +md5sum ${PROJECT_ID}_qc_report.html > ${PROJECT_ID}_qc_report.md5sum.txt + +for file in `find ${PROJECT_ID}_qc_report_data -type f` +do + md5sum $file >> ${PROJECT_ID}_qc_report.md5sum.txt +done + +#Â calculate checksusms on the prioritization files for this project + +cd $OUTPUT_DIR/prioritization + +DIRS=$(echo $PRIORITY_DIRS | tr ":" "\n") + +for dir in $DIRS +do + cd $dir + + rm ../$dir.md5sum.txt 2> /dev/null + + for file in `find . -type f` + do + md5sum $file >> ../$dir.md5sum.txt + done + + cd .. +done + + diff --git a/trio_whole_exome_config.sh b/trio_whole_exome_config.sh index 74d8afa3af1c8bffffed21d8b596accef3801946..7c0e7145e384bdf026e0dc1608c34a05b8965df6 100644 --- a/trio_whole_exome_config.sh +++ b/trio_whole_exome_config.sh @@ -16,4 +16,6 @@ CONFIG_DIR=$BASE/config WORK_DIR=$BASE/work OUTPUT_DIR=$BASE/output +ARCHIVE_DIR=/archive/u027/trio_whole_exome + export PATH=/home/u027/project/software/bcbio/tools/bin:$PATH