Skip to content
Snippets Groups Projects
Commit 47cead98 authored by ameyner2's avatar ameyner2
Browse files

Added scripts for archiving trio whole exomes, archive path in config file

parent 6cc144e5
No related branches found
No related tags found
No related merge requests found
#!/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
#!/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
......@@ -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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment