2010-12-15 22:56:12 +08:00
#!/bin/tcsh
source /broad/tools/scripts/useuse
2010-12-23 04:17:04 +08:00
reuse Python-2.5
use R-2.11
2010-12-15 22:56:12 +08:00
setenv DIR /humgen/gsa-hpprojects/GATK/reports
setenv ARCHIVE_DIR $DIR /archive
setenv SUMMARY_DIR $DIR /summaries
setenv DATE ` date +"%m_%d_%Y" `
setenv ARCHIVE $ARCHIVE_DIR /$DATE
setenv SUMMARY $SUMMARY_DIR /$DATE
setenv GATK ~/dev/GenomeAnalysisTK/trunk
2011-02-01 20:58:48 +08:00
setenv GATK_RELEASE_VERSION ` ls -l /humgen/gsa-hpprojects/GATK/bin/current | sed 's/.*GenomeAnalysisTK-//' `
2011-02-10 21:02:24 +08:00
setenv REPORT_TXT $DIR /report.txt
2011-02-01 20:58:48 +08:00
2011-02-10 21:02:24 +08:00
rm -f $REPORT_TXT
2010-12-15 22:56:12 +08:00
cd $DIR
2011-02-10 21:02:24 +08:00
echo "\n####################\nArchiving recently submitted jobs" >> $REPORT_TXT
python $GATK /python/analyzeRunReports.py archive $DIR /submitted -o $ARCHIVE .gz -D >> $REPORT_TXT
2011-02-01 20:58:48 +08:00
2011-02-10 21:02:24 +08:00
echo "\n####################\nReleased version, all runs" >> $REPORT_TXT
python $GATK /python/analyzeRunReports.py summary $ARCHIVE_DIR /*.gz --rev $GATK_RELEASE_VERSION >> $REPORT_TXT
python $GATK /python/analyzeRunReports.py exceptions $ARCHIVE_DIR /*.gz -E sting --rev $GATK_RELEASE_VERSION >> $REPORT_TXT
2010-12-15 22:56:12 +08:00
2011-02-10 21:02:24 +08:00
echo "\n####################\nLast day, all versions" >> $REPORT_TXT
python $GATK /python/analyzeRunReports.py summary $ARCHIVE .gz --max_days 1 --no-dev >> $REPORT_TXT
python $GATK /python/analyzeRunReports.py exceptions $ARCHIVE .gz --max_days 1 -E sting --no-dev >> $REPORT_TXT
2010-12-15 22:56:12 +08:00
2011-02-01 20:58:48 +08:00
#echo "Archive directory contents"
#du -sh $ARCHIVE_DIR
2010-12-15 22:56:12 +08:00
2011-02-10 21:02:24 +08:00
if ( 1 = = 0) then
2011-02-01 20:58:48 +08:00
foreach maxDays ( 30 360 )
2010-12-15 22:56:12 +08:00
echo "Creating table"
setenv table $ARCHIVE .${ maxDays } _days.table
2011-02-01 20:58:48 +08:00
python $GATK /python/analyzeRunReports.py table $ARCHIVE_DIR /*.gz -o $table --max_days $maxDays
2010-12-15 22:56:12 +08:00
echo "Creating summary"
2011-02-10 21:02:24 +08:00
Rscript $GATK /R/GATKRunReport.R $table $SUMMARY .${ maxDays } _days.pdf "of previous $maxDays days"
2010-12-15 22:56:12 +08:00
echo "Creating exception report"
python $GATK /python/analyzeRunReports.py exceptions $ARCHIVE_DIR /*.gz -o $SUMMARY .${ maxDays } _days.sting.exceptions.txt --max_days $maxDays -E sting --no-dev
python $GATK /python/analyzeRunReports.py exceptions $ARCHIVE_DIR /*.gz -o $SUMMARY .${ maxDays } _days.user.exceptions.txt --max_days $maxDays -E user --no-dev
rm $table
end
2011-02-01 20:58:48 +08:00
endif
#echo "GATK daily run report" | mutt -a $SUMMARY.30_days.pdf -a $SUMMARY.360_days.pdf -a $SUMMARY.7_days.pdf -s "GATK Run report PDFs for $DATE" gsamembers
2011-02-19 22:51:33 +08:00
#cat $REPORT_TXT | mutt -a $REPORT_TXT -a $SUMMARY.30_days.pdf -a $SUMMARY.360_days.pdf -s "GATK run report for $DATE" gsamembers
cat $REPORT_TXT | mutt -a $REPORT_TXT -s "GATK run report for $DATE" gsamembers
2010-12-15 22:56:12 +08:00