# This is the Makefile for testing the secondary structure predictor # predict-2nd 2ND = /projects/compbio/usr/cbarrett/predict-2nd 2ND-TESTING = ${2ND}/testing QUALITY-REPORTS = ${2ND-TESTING}/quality-reports RUN-SCRIPTS = ${2ND-TESTING}/run-scripts NETS = ${2ND-TESTING}/networks LOGS = ${2ND-TESTING}/logs TRAINING-DATA = ${2ND-TESTING}/training-data PLOTS = ${2ND-TESTING}/plots SCRIPTS = ${2ND-TESTING}/scripts .PHONY: default clean-tests clean-logs %-both.quality .PRECIOUS: ${QUALITY-REPORTS}/%.quality ${QUALITY-REPORTS}/%-both.quality \ %.quality %.script %.net .DELETE_ON_ERROR: %.script %.net # Training data sets test = ${TRAINING-DATA}/test.training-data phdset = ${TRAINING-DATA}/phdset.training-data default: @echo There is no default behavior for this makefile # Need to figure out a way to incorporate error checking into this %.script: @echo "Creating $@";\ @echo "ReadNeuralNet ${NETS}/$*.net" > ${RUN-SCRIPTS}/$@ @echo "" >> ${RUN-SCRIPTS}/$@ @if echo $* | egrep -q comp;\ then \ echo "WeightingRegularizer /projects/compbio/lib/recode2.20comp" \ >> ${RUN-SCRIPTS}/$@;\ echo "SequenceWeight EntropyWeight 1.0 10.0" >> ${RUN-SCRIPTS}/$@;\ echo "ReRegularizer /projects/compbio/lib/recode2.20comp" \ >> ${RUN-SCRIPTS}/$@;\ echo "" >> ${RUN-SCRIPTS}/$@;\ fi @echo "ReportNetQualityForCrossTrainTo ${QUALITY-REPORTS}/$*.quality" \ >> ${RUN-SCRIPTS}/$@ @echo "" >> ${RUN-SCRIPTS}/$@ @echo "ReportNetQualityForTrainTo ${QUALITY-REPORTS}/$*-t.quality" \ >> ${RUN-SCRIPTS}/$@ @echo "" >> ${RUN-SCRIPTS}/$@ @if echo $* | egrep -q test;\ then \ cat ${test} >> ${RUN-SCRIPTS}/$@;\ elif echo $* | egrep -q phdset;\ then \ cat ${phdset} >> ${RUN-SCRIPTS}/$@;\ else \ echo "ERROR: Don't know what training set in ${TRAINING-DATA}\ to use for $@";\ fi @echo "" >> ${RUN-SCRIPTS}/$@ @echo "TrainNet 200" >> ${RUN-SCRIPTS}/$@ @echo "ReportNeuralNet ${NETS}/$*-trained.net" >> ${RUN-SCRIPTS}/$@ @echo "Quit" >> ${RUN-SCRIPTS}/$@ ${QUALITY-REPORTS}/%-both.quality: %-aa.quality %-comp.quality @echo "Making $^" ${QUALITY-REPORTS}/%.quality: %.script %.net ${2ND}/predict-2nd < ${RUN-SCRIPTS}/$< %.quality: ${QUALITY-REPORTS}/%.quality @echo "Making $^" %.net: ${SCRIPTS}/make-network @echo "Creating ${NETS}/$*.net" @${SCRIPTS}/make-network $* > ${NETS}/$*.net clean-logs: rm -f ${LOGS}/* clean-tests: rm -f ${2ND-TESTING}/*/test* # # The following targets are for creating gnuplot plots # all-onelayer-%-q3.ps: ${QUALITY-REPORTS}/phdset-5-3-%.quality \ ${QUALITY-REPORTS}/phdset-7-3-%.quality \ ${QUALITY-REPORTS}/phdset-9-3-%.quality \ ${QUALITY-REPORTS}/phdset-11-3-%.quality \ ${QUALITY-REPORTS}/phdset-13-3-%.quality \ ${QUALITY-REPORTS}/phdset-15-3-%.quality \ ${QUALITY-REPORTS}/phdset-17-3-%.quality \ ${QUALITY-REPORTS}/phdset-19-3-%.quality @echo Creating $@ @echo set ylabel \"Q3\"\; \ set xlabel \"Iteration\"\; \ set yrange \[.4\:.75\]\; \ set title \"all onelayer-$*-q3 for different window sizes\"\; \ set data style lines\; \ set term postscript color\; \ set output \"${PLOTS}/$@\"\; \ plot \"${QUALITY-REPORTS}/phdset-7-3-$*.quality\" \ using 3 title \"7\"\, \ \"${QUALITY-REPORTS}/phdset-9-3-$*.quality\" \ using 3 title \"9\"\, \ \"${QUALITY-REPORTS}/phdset-11-3-$*.quality\" \ using 3 title \"11\"\, \ \"${QUALITY-REPORTS}/phdset-13-3-$*.quality\" \ using 3 title \"13\"\, \ \"${QUALITY-REPORTS}/phdset-15-3-$*.quality\" \ using 3 title \"15\"\; quit | gnuplot %-both.ps: ${QUALITY-REPORTS}/%-aa.quality ${QUALITY-REPORTS}/%-comp.quality %-q3.ps: ${QUALITY-REPORTS}/%.quality @echo Creating $@ @echo set ylabel \"Q3\"\; \ set xlabel \"Iteration\"\; \ set yrange \[0\:1\]\; \ set title \"$*-q3\"\; \ set data style lines\; \ set term postscript color\; \ set output \"${PLOTS}/$@\"\; \ plot \"${QUALITY-REPORTS}/$*.quality\" using 3 title \"Q3\"\; \ quit | gnuplot %-rms.ps: ${QUALITY-REPORTS}/%.quality @echo Creating $@ @echo set ylabel \"RMS\"\; \ set xlabel \"Iteration\"\; \ set title \"$*-rms\"\; \ set data style lines\; \ set term postscript color\; \ set output \"${PLOTS}/$@\"\; \ plot \"${QUALITY-REPORTS}/$*.quality\" using 8 title \ \"rms_sum\"\, \"${QUALITY-REPORTS}/$*.quality\" \ using 9 title \"rms_weight\"\; \ quit | gnuplot %-rms-q3.ps: ${QUALITY-REPORTS}/%.quality @echo Creating $@ @echo set logscale y \; \ set ylabel \"RMS and Q3\"\; \ set xlabel \"Iteration\"\; \ set title \"$*-rms-q3\"\; \ set data style lines\; \ set term postscript color\; \ set output \"${PLOTS}/$@\"\; \ plot \"${QUALITY-REPORTS}/$*.quality\" using 8 title \ \"rms_sum\"\, \"${QUALITY-REPORTS}/$*.quality\" \ using 9 title \"rms_weight\"\, \ \"${QUALITY-REPORTS}/$*.quality\" using 3 title \ \"Q3\"\; \ quit | gnuplot %-rates.ps: ${QUALITY-REPORTS}/%.quality @echo Creating $@ @echo set ylabel \"Rates\"\; \ set xlabel \"Iteration\"\; \ set title \"$*-rates\"\; \ set data style lines\; \ set term postscript color\; \ set output \"${PLOTS}/$@\"\; \ plot \"${QUALITY-REPORTS}/$*.quality\" using 10 title \ \"WeightRate\"\, \"${QUALITY-REPORTS}/$*.quality\" \ using 11 title \"PseudoRate\"\; \ quit | gnuplot %-q3-both.ps: ${QUALITY-REPORTS}/%-aa.quality \ ${QUALITY-REPORTS}/%-comp.quality @echo Creating $@ @echo set ylabel \"Q3\"\; \ set xlabel \"Iteration\"\; \ set yrange \[0\:1\]\; \ set title \"$*-q3-both\"\; \ set data style lines\; \ set term postscript color\; \ set output \"${PLOTS}/$@\"\; \ plot \"${QUALITY-REPORTS}/$*-aa.quality\" using 3 title \ \"aa\"\, \"${QUALITY-REPORTS}/$*-comp.quality\" \ using 3 title \"comp\"\; \ quit | gnuplot