:78 Function create_function() is deprecated [8192]
Filename | |
---|---|
tools/ScalingAnalysis/ORF_RACS-template.sh | |
tools/ScalingAnalysis/ScalingAnalysis.sh | |
tools/ScalingAnalysis/checkResults.sh |
diff --git a/tools/ScalingAnalysis/ORF_RACS-template.sh b/tools/ScalingAnalysis/ORF_RACS-template.sh new file mode 100755 index 0000000..959e03a --- /dev/null +++ b/tools/ScalingAnalysis/ORF_RACS-template.sh @@ -0,0 +1,40 @@ +#!/bin/bash +# +# Shell script template that can be used for running the ORF-RACS pipeline in a +# set of different experiments. +# +# This script will run the RACS scripts in background, which is achieved by +# including the "&" symbol at the end of each call to the RACS script. + +cores=${1:-"1"} + +# define location of the RACS pipeline and script to run, in this case "countReads.sh" +RACSscript="$HOME/RESEARCH/racs/core/countReads.sh" + +# define location of data and reference files +dataDIR="$SCRATCH/TT/DATA/data1_BD1-2" +refsDIR="$SCRATCH/GPC/scratch2/Tetrahymena_Ryerson/REFS" + +# specify reference and annotation files +refsFILE="T_thermophila_June2014.gff3" +fastaFILE="T_thermophila_June2014_assembly.fasta" + +workingDIR="/dev/shm" + +# start tracer... +. $HOME/RESEARCH/STATS/tracer.sh "du -s $workingDIR/$USER" & +trPID=$! + +# run pipeline +$RACSscript \ + $dataDIR/BD1_INPUT.fastq.gz \ + $dataDIR/BD1_IP.fastq.gz \ + $refsDIR/$fastaFILE $refsDIR/$refsFILE \ + $workingDIR \ + $cores + +#wait + +# terminate tracer... +kill -9 $trPID +#pkill watch diff --git a/tools/ScalingAnalysis/ScalingAnalysis.sh b/tools/ScalingAnalysis/ScalingAnalysis.sh new file mode 100755 index 0000000..eecc5fb --- /dev/null +++ b/tools/ScalingAnalysis/ScalingAnalysis.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +# reverse order -- to run first tests faster +#cores="32 16 8 4 2 1" +cores="1 2 4 8 16 32 64" + +for i in $cores; do + dir=${i}"cores"; + echo $i ... $dir; + mkdir $dir; cd $dir; + echo "processing... `pwd`"; + . ../ORF_RACS-template.sh $i ; #> /dev/null 2>&1 ; + cd ..; +done + +./checkResults.sh diff --git a/tools/ScalingAnalysis/checkResults.sh b/tools/ScalingAnalysis/checkResults.sh new file mode 100755 index 0000000..d5b40f7 --- /dev/null +++ b/tools/ScalingAnalysis/checkResults.sh @@ -0,0 +1,38 @@ +#!/bin/bash + +# script for testing results from scaling analysis +# sanity check for results! + +files=`ls -1 *cores/ORF*/FINAL*` + +for i in $files; do + target=`basename $i` +done + +dirs=`ls -d *cores/ORF*` + +nbrTests=0 +nbrFailedTests=0 +nbrPassedTests=0 + +for i in $dirs; do + for j in $dirs; do + nbrTests=$((nbrTests+1)); + echo "comparing $i/$target vs $j/$target"; + comparison=$( diff $i/$target $j/$target ); + exit_code=$?; #echo ${exit_code}; + if [[ $exit_code -eq "0" ]]; then + echo -e "\t >>> test succesful... " + nbrPassedTests=$((nbrPassedTests+1)) + else + echo "***** ERROR !!! when checking results failed at $i/$target VS $j/$target" + nbrFailedTests=$((nbrFailedTests+1)) + fi + done; +done + +echo $target + +echo "Number of Tests Passed: $nbrPassedTests" +echo "Number of Checks Failed: $nbrFailedTests" +echo "Total Number of files compared: $nbrTests"