<commit_before>#!/bin/tcsh

source /broad/tools/scripts/useuse

reuse Python-2.5
use R-2.11

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
setenv GATK_RELEASE_VERSION `ls -l /humgen/gsa-hpprojects/GATK/bin/current | sed 's/.*GenomeAnalysisTK-//'`
setenv REPORT_TXT $DIR/report.txt

rm -f $REPORT_TXT 

cd $DIR

echo "\n####################\nArchiving recently submitted jobs" >> $REPORT_TXT
python $GATK/python/analyzeRunReports.py archive $DIR/submitted -o $ARCHIVE.gz -D >> $REPORT_TXT

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

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

#echo "Archive directory contents"
#du -sh $ARCHIVE_DIR

if (1 == 0) then
foreach maxDays ( 30 360 ) 
    echo "Creating table"
    setenv table $ARCHIVE.${maxDays}_days.table
    python $GATK/python/analyzeRunReports.py table $ARCHIVE_DIR/*.gz -o $table --max_days $maxDays 

    echo "Creating summary"
    Rscript $GATK/R/GATKRunReport.R $table $SUMMARY.${maxDays}_days.pdf "of previous $maxDays days" 

    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<commit_msg>A bit better echos<commit_after>#!/bin/tcsh

source /broad/tools/scripts/useuse

reuse Python-2.5
use R-2.11

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
setenv GATK_RELEASE_VERSION `ls -l /humgen/gsa-hpprojects/GATK/bin/current | sed 's/.*GenomeAnalysisTK-//'`
setenv REPORT_TXT $DIR/report.txt

rm -f $REPORT_TXT 

cd $DIR

echo "\n####################\nArchiving recently submitted jobs" >> $REPORT_TXT
python $GATK/python/analyzeRunReports.py archive $DIR/submitted -o $ARCHIVE.gz -D >> $REPORT_TXT

echo "\n####################\nReleased version ($GATK_RELEASE_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

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

#echo "Archive directory contents"
#du -sh $ARCHIVE_DIR

if (1 == 0) then
foreach maxDays ( 30 360 ) 
    echo "Creating table"
    setenv table $ARCHIVE.${maxDays}_days.table
    python $GATK/python/analyzeRunReports.py table $ARCHIVE_DIR/*.gz -o $table --max_days $maxDays 

    echo "Creating summary"
    Rscript $GATK/R/GATKRunReport.R $table $SUMMARY.${maxDays}_days.pdf "of previous $maxDays days" 

    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
{'fraction_non_alphanumeric': 0.1551137849856134, 'fraction_numerical': 0.0073240910279884905, 'mean_word_length': 4.733133433283358, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 35, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3707808', 'n_tokens_mistral': 1520, 'n_tokens_neox': 1395, 'n_words': 321}