#!/bin/bash for Method in Method* do if [ -f $Method ]; then rm Method*; fi done for input in ranks_coc81_* do cat $input | malign | sort -n -k 4 | sed 's/ //g' | gawk 'BEGIN{FS=","; OFS="\t";} {if ($1 != "wrapper") print NR,$1"-"$2"-"$3,$4;}' > tieInput_$input; cat $input | malign | sort -n -k 4 | sed 's/ //g' | gawk 'BEGIN{FS=","; OFS="\t";} {if ($1 != "wrapper") { if ($1=="None" && $2 == "precise" && $3 == "lc") {print NR,$4,$1"-"$2"-"$3 >> Method1; print 15,$4,$1"-"$2"-"$3 >> Method1VerticalLine; } if ($1=="NewCOCOMINWrapperMedian" && $2 == "precise" && $3 == "lc") {print NR,$4,$1"-"$2"-"$3 >> Method2; print 30,$4,$1"-"$2"-"$3 >> Method2VerticalLine; } if ($1=="NewCOCOMINWrapperMedian" && $2 == "precise" && $3 == "dynamicLocomoMean") {print NR,$4,$1"-"$2"-"$3 >> Method3; print 45,$4,$1"-"$2"-"$3 >> Method3VerticalLine; } if ($1=="None" && $2 == "precise" && $3 == "dynamicLocomoMean") {print NR,$4,$1"-"$2"-"$3 >> Method4; print 60,$4,$1"-"$2"-"$3 >> Method4VerticalLine; } if ($1=="None" && $2 == "precise" && $3 == "lcManualStratification") {print NR,$4,$1"-"$2"-"$3 >> Method5; print 75,$4,$1"-"$2"-"$3 >> Method5VerticalLine; } if ($1=="M5PWrapper" && $2 == "precise" && $3 == "m5p") {print NR,$4,$1"-"$2"-"$3 >> Method6; print 90,$4,$1"-"$2"-"$3 >> Method6VerticalLine; } if ($1=="LocalWrapper" && $2 == "precise" && $3 == "lc") {print NR,$4,$1"-"$2"-"$3 >> Method7; print 105,$4,$1"-"$2"-"$3 >> Method7VerticalLine; } if ($1=="LSRWrapper" && $2 == "precise" && $3 == "lsr") {print NR,$4,$1"-"$2"-"$3 >> Method8; print 120,$4,$1"-"$2"-"$3 >> Method8VerticalLine; } if ($1=="None" && $2 == "precise" && $3 == "nearestNeighborMre") {print NR,$4,$1"-"$2"-"$3 >> Method9; print 135,$4,$1"-"$2"-"$3 >> Method9VerticalLine; } }}' Method1=Method1TieCoc81 Method2=Method2TieCoc81 Method3=Method3TieCoc81 Method4=Method4TieCoc81 Method5=Method5TieCoc81 Method6=Method6TieCoc81 Method7=Method7TieCoc81 Method8=Method8TieCoc81 Method9=Method9TieCoc81 Method1VerticalLine=Method1TieCoc81VerticalLine Method2VerticalLine=Method2TieCoc81VerticalLine Method3VerticalLine=Method3TieCoc81VerticalLine Method4VerticalLine=Method4TieCoc81VerticalLine Method5VerticalLine=Method5TieCoc81VerticalLine Method6VerticalLine=Method6TieCoc81VerticalLine Method7VerticalLine=Method7TieCoc81VerticalLine Method8VerticalLine=Method8TieCoc81VerticalLine Method9VerticalLine=Method9TieCoc81VerticalLine; cat $input | malign | sort -n -k 5 | sed 's/ //g' | gawk 'BEGIN{FS=","; OFS="\t";} {if ($1 != "wrapper") print NR,$1"-"$2"-"$3,$5;}' > winInput_$input; cat $input | malign | sort -n -k 5 | sed 's/ //g' | gawk 'BEGIN{FS=","; OFS="\t";} {if ($1 != "wrapper") { if ($1=="None" && $2 == "precise" && $3 == "lc") {print NR,$5,$1"-"$2"-"$3 >> Method1; print 15,$5,$1"-"$2"-"$3 >> Method1VerticalLine; } if ($1=="NewCOCOMINWrapperMedian" && $2 == "precise" && $3 == "lc") {print NR,$5,$1"-"$2"-"$3 >> Method2; print 30,$5,$1"-"$2"-"$3 >> Method2VerticalLine; } if ($1=="NewCOCOMINWrapperMedian" && $2 == "precise" && $3 == "dynamicLocomoMean") {print NR,$5,$1"-"$2"-"$3 >> Method3; print 45,$5,$1"-"$2"-"$3 >> Method3VerticalLine; } if ($1=="None" && $2 == "precise" && $3 == "dynamicLocomoMean") {print NR,$5,$1"-"$2"-"$3 >> Method4; print 60,$5,$1"-"$2"-"$3 >> Method4VerticalLine; } if ($1=="None" && $2 == "precise" && $3 == "lcManualStratification") {print NR,$5,$1"-"$2"-"$3 >> Method5; print 75,$5,$1"-"$2"-"$3 >> Method5VerticalLine; } if ($1=="M5PWrapper" && $2 == "precise" && $3 == "m5p") {print NR,$5,$1"-"$2"-"$3 >> Method6; print 90,$5,$1"-"$2"-"$3 >> Method6VerticalLine; } if ($1=="LocalWrapper" && $2 == "precise" && $3 == "lc") {print NR,$5,$1"-"$2"-"$3 >> Method7; print 105,$5,$1"-"$2"-"$3 >> Method7VerticalLine; } if ($1=="LSRWrapper" && $2 == "precise" && $3 == "lsr") {print NR,$5,$1"-"$2"-"$3 >> Method8; print 120,$5,$1"-"$2"-"$3 >> Method8VerticalLine; } if ($1=="None" && $2 == "precise" && $3 == "nearestNeighborMre") {print NR,$5,$1"-"$2"-"$3 >> Method9; print 135,$5,$1"-"$2"-"$3 >> Method9VerticalLine; } }}' Method1=Method1WinCoc81 Method2=Method2WinCoc81 Method3=Method3WinCoc81 Method4=Method4WinCoc81 Method5=Method5WinCoc81 Method6=Method6WinCoc81 Method7=Method7WinCoc81 Method8=Method8WinCoc81 Method9=Method9WinCoc81 Method1VerticalLine=Method1WinCoc81VerticalLine Method2VerticalLine=Method2WinCoc81VerticalLine Method3VerticalLine=Method3WinCoc81VerticalLine Method4VerticalLine=Method4WinCoc81VerticalLine Method5VerticalLine=Method5WinCoc81VerticalLine Method6VerticalLine=Method6WinCoc81VerticalLine Method7VerticalLine=Method7WinCoc81VerticalLine Method8VerticalLine=Method8WinCoc81VerticalLine Method9VerticalLine=Method9WinCoc81VerticalLine; cat $input | malign | sort -n -k 6 | sed 's/ //g' | gawk 'BEGIN{FS=","; OFS="\t";} {if ($1 != "wrapper") print NR,$1"-"$2"-"$3,$6;}' > lossInput_$input; cat $input | malign | sort -n -k 6 | sed 's/ //g' | gawk 'BEGIN{FS=","; OFS="\t";} {if ($1 != "wrapper") { if ($1=="None" && $2 == "precise" && $3 == "lc") {print NR,$6,$1"-"$2"-"$3 >> Method1; print 15,$6,$1"-"$2"-"$3 >> Method1VerticalLine; } if ($1=="NewCOCOMINWrapperMedian" && $2 == "precise" && $3 == "lc") {print NR,$6,$1"-"$2"-"$3 >> Method2; print 30,$6,$1"-"$2"-"$3 >> Method2VerticalLine; } if ($1=="NewCOCOMINWrapperMedian" && $2 == "precise" && $3 == "dynamicLocomoMean") {print NR,$6,$1"-"$2"-"$3 >> Method3; print 45,$6,$1"-"$2"-"$3 >> Method3VerticalLine; } if ($1=="None" && $2 == "precise" && $3 == "dynamicLocomoMean") {print NR,$6,$1"-"$2"-"$3 >> Method4; print 60,$6,$1"-"$2"-"$3 >> Method4VerticalLine; } if ($1=="None" && $2 == "precise" && $3 == "lcManualStratification") {print NR,$6,$1"-"$2"-"$3 >> Method5; print 75,$6,$1"-"$2"-"$3 >> Method5VerticalLine; } if ($1=="M5PWrapper" && $2 == "precise" && $3 == "m5p") {print NR,$6,$1"-"$2"-"$3 >> Method6; print 90,$6,$1"-"$2"-"$3 >> Method6VerticalLine; } if ($1=="LocalWrapper" && $2 == "precise" && $3 == "lc") {print NR,$6,$1"-"$2"-"$3 >> Method7; print 105,$6,$1"-"$2"-"$3 >> Method7VerticalLine; } if ($1=="LSRWrapper" && $2 == "precise" && $3 == "lsr") {print NR,$6,$1"-"$2"-"$3 >> Method8; print 120,$6,$1"-"$2"-"$3 >> Method8VerticalLine; } if ($1=="None" && $2 == "precise" && $3 == "nearestNeighborMre") {print NR,$6,$1"-"$2"-"$3 >> Method9; print 135,$6,$1"-"$2"-"$3 >> Method9VerticalLine; } }}' Method1=Method1LossCoc81 Method2=Method2LossCoc81 Method3=Method3LossCoc81 Method4=Method4LossCoc81 Method5=Method5LossCoc81 Method6=Method6LossCoc81 Method7=Method7LossCoc81 Method8=Method8LossCoc81 Method9=Method9LossCoc81 Method1VerticalLine=Method1LossCoc81VerticalLine Method2VerticalLine=Method2LossCoc81VerticalLine Method3VerticalLine=Method3LossCoc81VerticalLine Method4VerticalLine=Method4LossCoc81VerticalLine Method5VerticalLine=Method5LossCoc81VerticalLine Method6VerticalLine=Method6LossCoc81VerticalLine Method7VerticalLine=Method7LossCoc81VerticalLine Method8VerticalLine=Method8LossCoc81VerticalLine Method9VerticalLine=Method9LossCoc81VerticalLine; cat $input | gawk 'BEGIN{FS=","; OFS="\t";} {if ($1 != "wrapper") print $1,$2,$3,$4+$5;}' | sort -n -k 4 > sumInputTemp_$input; cat sumInputTemp_$input | gawk 'BEGIN{FS="\t"; OFS="\t";} {if ($1 != "wrapper") { if ($1=="None" && $2 == "precise" && $3 == "lc") {print NR,$4,$1"-"$2"-"$3 >> Method1; print 15,$4,$1"-"$2"-"$3 >> Method1VerticalLine; } if ($1=="NewCOCOMINWrapperMedian" && $2 == "precise" && $3 == "lc") {print NR,$4,$1"-"$2"-"$3 >> Method2; print 30,$4,$1"-"$2"-"$3 >> Method2VerticalLine; } if ($1=="NewCOCOMINWrapperMedian" && $2 == "precise" && $3 == "dynamicLocomoMean") {print NR,$4,$1"-"$2"-"$3 >> Method3; print 45,$4,$1"-"$2"-"$3 >> Method3VerticalLine; } if ($1=="None" && $2 == "precise" && $3 == "dynamicLocomoMean") {print NR,$4,$1"-"$2"-"$3 >> Method4; print 60,$4,$1"-"$2"-"$3 >> Method4VerticalLine; } if ($1=="None" && $2 == "precise" && $3 == "lcManualStratification") {print NR,$4,$1"-"$2"-"$3 >> Method5; print 75,$4,$1"-"$2"-"$3 >> Method5VerticalLine; } if ($1=="M5PWrapper" && $2 == "precise" && $3 == "m5p") {print NR,$4,$1"-"$2"-"$3 >> Method6; print 90,$4,$1"-"$2"-"$3 >> Method6VerticalLine; } if ($1=="LocalWrapper" && $2 == "precise" && $3 == "lc") {print NR,$4,$1"-"$2"-"$3 >> Method7; print 105,$4,$1"-"$2"-"$3 >> Method7VerticalLine; } if ($1=="LSRWrapper" && $2 == "precise" && $3 == "lsr") {print NR,$4,$1"-"$2"-"$3 >> Method8; print 120,$4,$1"-"$2"-"$3 >> Method8VerticalLine; } if ($1=="None" && $2 == "precise" && $3 == "nearestNeighborMre") {print NR,$4,$1"-"$2"-"$3 >> Method9; print 135,$4,$1"-"$2"-"$3 >> Method9VerticalLine; } }}' Method1=Method1SumCoc81 Method2=Method2SumCoc81 Method3=Method3SumCoc81 Method4=Method4SumCoc81 Method5=Method5SumCoc81 Method6=Method6SumCoc81 Method7=Method7SumCoc81 Method8=Method8SumCoc81 Method9=Method9SumCoc81 Method1VerticalLine=Method1SumCoc81VerticalLine Method2VerticalLine=Method2SumCoc81VerticalLine Method3VerticalLine=Method3SumCoc81VerticalLine Method4VerticalLine=Method4SumCoc81VerticalLine Method5VerticalLine=Method5SumCoc81VerticalLine Method6VerticalLine=Method6SumCoc81VerticalLine Method7VerticalLine=Method7SumCoc81VerticalLine Method8VerticalLine=Method8SumCoc81VerticalLine Method9VerticalLine=Method9SumCoc81VerticalLine; cat sumInputTemp_$input | gawk 'BEGIN{FS="\t"; OFS="\t"} {print NR,$1"-"$2"-"$3,$4;}' > sumInput_$input; cat $input | gawk 'BEGIN{FS=","; OFS="\t";} {if ($1 != "wrapper") print $1,$2,$3,$5-$6;}' | sort -n -k 4 > diffInputTemp_$input; cat diffInputTemp_$input | gawk 'BEGIN{FS="\t"; OFS="\t";} {if ($1 != "wrapper") { if ($1=="None" && $2 == "precise" && $3 == "lc") {print NR,$4,$1"-"$2"-"$3 >> Method1; print 15,$4,$1"-"$2"-"$3 >> Method1VerticalLine; } if ($1=="NewCOCOMINWrapperMedian" && $2 == "precise" && $3 == "lc") {print NR,$4,$1"-"$2"-"$3 >> Method2; print 30,$4,$1"-"$2"-"$3 >> Method2VerticalLine; } if ($1=="NewCOCOMINWrapperMedian" && $2 == "precise" && $3 == "dynamicLocomoMean") {print NR,$4,$1"-"$2"-"$3 >> Method3; print 45,$4,$1"-"$2"-"$3 >> Method3VerticalLine; } if ($1=="None" && $2 == "precise" && $3 == "dynamicLocomoMean") {print NR,$4,$1"-"$2"-"$3 >> Method4; print 60,$4,$1"-"$2"-"$3 >> Method4VerticalLine; } if ($1=="None" && $2 == "precise" && $3 == "lcManualStratification") {print NR,$4,$1"-"$2"-"$3 >> Method5; print 75,$4,$1"-"$2"-"$3 >> Method5VerticalLine; } if ($1=="M5PWrapper" && $2 == "precise" && $3 == "m5p") {print NR,$4,$1"-"$2"-"$3 >> Method6; print 90,$4,$1"-"$2"-"$3 >> Method6VerticalLine; } if ($1=="LocalWrapper" && $2 == "precise" && $3 == "lc") {print NR,$4,$1"-"$2"-"$3 >> Method7; print 105,$4,$1"-"$2"-"$3 >> Method7VerticalLine; } if ($1=="LSRWrapper" && $2 == "precise" && $3 == "lsr") {print NR,$4,$1"-"$2"-"$3 >> Method8; print 120,$4,$1"-"$2"-"$3 >> Method8VerticalLine; } if ($1=="None" && $2 == "precise" && $3 == "nearestNeighborMre") {print NR,$4,$1"-"$2"-"$3 >> Method9; print 135,$4,$1"-"$2"-"$3 >> Method9VerticalLine; } }}' Method1=Method1DiffCoc81 Method2=Method2DiffCoc81 Method3=Method3DiffCoc81 Method4=Method4DiffCoc81 Method5=Method5DiffCoc81 Method6=Method6DiffCoc81 Method7=Method7DiffCoc81 Method8=Method8DiffCoc81 Method9=Method9DiffCoc81 Method1VerticalLine=Method1DiffCoc81VerticalLine Method2VerticalLine=Method2DiffCoc81VerticalLine Method3VerticalLine=Method3DiffCoc81VerticalLine Method4VerticalLine=Method4DiffCoc81VerticalLine Method5VerticalLine=Method5DiffCoc81VerticalLine Method6VerticalLine=Method6DiffCoc81VerticalLine Method7VerticalLine=Method7DiffCoc81VerticalLine Method8VerticalLine=Method8DiffCoc81VerticalLine Method9VerticalLine=Method9DiffCoc81VerticalLine; cat diffInputTemp_$input | gawk 'BEGIN{FS="\t"; OFS="\t"} {print NR,$1"-"$2"-"$3,$4;}' > diffInput_$input; done for input in ranks_nasa93_* do cat $input | malign | sort -n -k 4 | sed 's/ //g' | gawk 'BEGIN{FS=","; OFS="\t";} {if ($1 != "wrapper") print NR,$1"-"$2"-"$3,$4;}' > tieInput_$input; cat $input | malign | sort -n -k 4 | sed 's/ //g' | gawk 'BEGIN{FS=","; OFS="\t";} {if ($1 != "wrapper") { if ($1=="None" && $2 == "precise" && $3 == "lc") {print NR,$4,$1"-"$2"-"$3 >> Method1; print 15,$4,$1"-"$2"-"$3 >> Method1VerticalLine; } if ($1=="NewCOCOMINWrapperMedian" && $2 == "precise" && $3 == "lc") {print NR,$4,$1"-"$2"-"$3 >> Method2; print 30,$4,$1"-"$2"-"$3 >> Method2VerticalLine; } if ($1=="NewCOCOMINWrapperMedian" && $2 == "precise" && $3 == "dynamicLocomoMean") {print NR,$4,$1"-"$2"-"$3 >> Method3; print 45,$4,$1"-"$2"-"$3 >> Method3VerticalLine; } if ($1=="None" && $2 == "precise" && $3 == "dynamicLocomoMean") {print NR,$4,$1"-"$2"-"$3 >> Method4; print 60,$4,$1"-"$2"-"$3 >> Method4VerticalLine; } if ($1=="None" && $2 == "precise" && $3 == "lcManualStratification") {print NR,$4,$1"-"$2"-"$3 >> Method5; print 75,$4,$1"-"$2"-"$3 >> Method5VerticalLine; } if ($1=="M5PWrapper" && $2 == "precise" && $3 == "m5p") {print NR,$4,$1"-"$2"-"$3 >> Method6; print 90,$4,$1"-"$2"-"$3 >> Method6VerticalLine; } if ($1=="LocalWrapper" && $2 == "precise" && $3 == "lc") {print NR,$4,$1"-"$2"-"$3 >> Method7; print 105,$4,$1"-"$2"-"$3 >> Method7VerticalLine; } if ($1=="LSRWrapper" && $2 == "precise" && $3 == "lsr") {print NR,$4,$1"-"$2"-"$3 >> Method8; print 120,$4,$1"-"$2"-"$3 >> Method8VerticalLine; } if ($1=="None" && $2 == "precise" && $3 == "nearestNeighborMre") {print NR,$4,$1"-"$2"-"$3 >> Method9; print 135,$4,$1"-"$2"-"$3 >> Method9VerticalLine; } }}' Method1=Method1TieNasa93 Method2=Method2TieNasa93 Method3=Method3TieNasa93 Method4=Method4TieNasa93 Method5=Method5TieNasa93 Method6=Method6TieNasa93 Method7=Method7TieNasa93 Method8=Method8TieNasa93 Method9=Method9TieNasa93 Method1VerticalLine=Method1TieNasa93VerticalLine Method2VerticalLine=Method2TieNasa93VerticalLine Method3VerticalLine=Method3TieNasa93VerticalLine Method4VerticalLine=Method4TieNasa93VerticalLine Method5VerticalLine=Method5TieNasa93VerticalLine Method6VerticalLine=Method6TieNasa93VerticalLine Method7VerticalLine=Method7TieNasa93VerticalLine Method8VerticalLine=Method8TieNasa93VerticalLine Method9VerticalLine=Method9TieNasa93VerticalLine; cat $input | malign | sort -n -k 5 | sed 's/ //g' | gawk 'BEGIN{FS=","; OFS="\t";} {if ($1 != "wrapper") print NR,$1"-"$2"-"$3,$5;}' > winInput_$input; cat $input | malign | sort -n -k 5 | sed 's/ //g' | gawk 'BEGIN{FS=","; OFS="\t";} {if ($1 != "wrapper") { if ($1=="None" && $2 == "precise" && $3 == "lc") {print NR,$5,$1"-"$2"-"$3 >> Method1; print 15,$5,$1"-"$2"-"$3 >> Method1VerticalLine; } if ($1=="NewCOCOMINWrapperMedian" && $2 == "precise" && $3 == "lc") {print NR,$5,$1"-"$2"-"$3 >> Method2; print 30,$5,$1"-"$2"-"$3 >> Method2VerticalLine; } if ($1=="NewCOCOMINWrapperMedian" && $2 == "precise" && $3 == "dynamicLocomoMean") {print NR,$5,$1"-"$2"-"$3 >> Method3; print 45,$5,$1"-"$2"-"$3 >> Method3VerticalLine; } if ($1=="None" && $2 == "precise" && $3 == "dynamicLocomoMean") {print NR,$5,$1"-"$2"-"$3 >> Method4; print 60,$5,$1"-"$2"-"$3 >> Method4VerticalLine; } if ($1=="None" && $2 == "precise" && $3 == "lcManualStratification") {print NR,$5,$1"-"$2"-"$3 >> Method5; print 75,$5,$1"-"$2"-"$3 >> Method5VerticalLine; } if ($1=="M5PWrapper" && $2 == "precise" && $3 == "m5p") {print NR,$5,$1"-"$2"-"$3 >> Method6; print 90,$5,$1"-"$2"-"$3 >> Method6VerticalLine; } if ($1=="LocalWrapper" && $2 == "precise" && $3 == "lc") {print NR,$5,$1"-"$2"-"$3 >> Method7; print 105,$5,$1"-"$2"-"$3 >> Method7VerticalLine; } if ($1=="LSRWrapper" && $2 == "precise" && $3 == "lsr") {print NR,$5,$1"-"$2"-"$3 >> Method8; print 120,$5,$1"-"$2"-"$3 >> Method8VerticalLine; } if ($1=="None" && $2 == "precise" && $3 == "nearestNeighborMre") {print NR,$5,$1"-"$2"-"$3 >> Method9; print 135,$5,$1"-"$2"-"$3 >> Method9VerticalLine; } }}' Method1=Method1WinNasa93 Method2=Method2WinNasa93 Method3=Method3WinNasa93 Method4=Method4WinNasa93 Method5=Method5WinNasa93 Method6=Method6WinNasa93 Method7=Method7WinNasa93 Method8=Method8WinNasa93 Method9=Method9WinNasa93 Method1VerticalLine=Method1WinNasa93VerticalLine Method2VerticalLine=Method2WinNasa93VerticalLine Method3VerticalLine=Method3WinNasa93VerticalLine Method4VerticalLine=Method4WinNasa93VerticalLine Method5VerticalLine=Method5WinNasa93VerticalLine Method6VerticalLine=Method6WinNasa93VerticalLine Method7VerticalLine=Method7WinNasa93VerticalLine Method8VerticalLine=Method8WinNasa93VerticalLine Method9VerticalLine=Method9WinNasa93VerticalLine; cat $input | malign | sort -n -k 6 | sed 's/ //g' | gawk 'BEGIN{FS=","; OFS="\t";} {if ($1 != "wrapper") print NR,$1"-"$2"-"$3,$6;}' > lossInput_$input; cat $input | malign | sort -n -k 6 | sed 's/ //g' | gawk 'BEGIN{FS=","; OFS="\t";} {if ($1 != "wrapper") { if ($1=="None" && $2 == "precise" && $3 == "lc") {print NR,$6,$1"-"$2"-"$3 >> Method1; print 15,$6,$1"-"$2"-"$3 >> Method1VerticalLine; } if ($1=="NewCOCOMINWrapperMedian" && $2 == "precise" && $3 == "lc") {print NR,$6,$1"-"$2"-"$3 >> Method2; print 30,$6,$1"-"$2"-"$3 >> Method2VerticalLine; } if ($1=="NewCOCOMINWrapperMedian" && $2 == "precise" && $3 == "dynamicLocomoMean") {print NR,$6,$1"-"$2"-"$3 >> Method3; print 45,$6,$1"-"$2"-"$3 >> Method3VerticalLine; } if ($1=="None" && $2 == "precise" && $3 == "dynamicLocomoMean") {print NR,$6,$1"-"$2"-"$3 >> Method4; print 60,$6,$1"-"$2"-"$3 >> Method4VerticalLine; } if ($1=="None" && $2 == "precise" && $3 == "lcManualStratification") {print NR,$6,$1"-"$2"-"$3 >> Method5; print 75,$6,$1"-"$2"-"$3 >> Method5VerticalLine; } if ($1=="M5PWrapper" && $2 == "precise" && $3 == "m5p") {print NR,$6,$1"-"$2"-"$3 >> Method6; print 90,$6,$1"-"$2"-"$3 >> Method6VerticalLine; } if ($1=="LocalWrapper" && $2 == "precise" && $3 == "lc") {print NR,$6,$1"-"$2"-"$3 >> Method7; print 105,$6,$1"-"$2"-"$3 >> Method7VerticalLine; } if ($1=="LSRWrapper" && $2 == "precise" && $3 == "lsr") {print NR,$6,$1"-"$2"-"$3 >> Method8; print 120,$6,$1"-"$2"-"$3 >> Method8VerticalLine; } if ($1=="None" && $2 == "precise" && $3 == "nearestNeighborMre") {print NR,$6,$1"-"$2"-"$3 >> Method9; print 135,$6,$1"-"$2"-"$3 >> Method9VerticalLine; } }}' Method1=Method1LossNasa93 Method2=Method2LossNasa93 Method3=Method3LossNasa93 Method4=Method4LossNasa93 Method5=Method5LossNasa93 Method6=Method6LossNasa93 Method7=Method7LossNasa93 Method8=Method8LossNasa93 Method9=Method9LossNasa93 Method1VerticalLine=Method1LossNasa93VerticalLine Method2VerticalLine=Method2LossNasa93VerticalLine Method3VerticalLine=Method3LossNasa93VerticalLine Method4VerticalLine=Method4LossNasa93VerticalLine Method5VerticalLine=Method5LossNasa93VerticalLine Method6VerticalLine=Method6LossNasa93VerticalLine Method7VerticalLine=Method7LossNasa93VerticalLine Method8VerticalLine=Method8LossNasa93VerticalLine Method9VerticalLine=Method9LossNasa93VerticalLine; cat $input | gawk 'BEGIN{FS=","; OFS="\t";} {if ($1 != "wrapper") print $1,$2,$3,$4+$5;}' | sort -n -k 4 > sumInputTemp_$input; cat sumInputTemp_$input | gawk 'BEGIN{FS="\t"; OFS="\t";} {if ($1 != "wrapper") { if ($1=="None" && $2 == "precise" && $3 == "lc") {print NR,$4,$1"-"$2"-"$3 >> Method1; print 15,$4,$1"-"$2"-"$3 >> Method1VerticalLine; } if ($1=="NewCOCOMINWrapperMedian" && $2 == "precise" && $3 == "lc") {print NR,$4,$1"-"$2"-"$3 >> Method2; print 30,$4,$1"-"$2"-"$3 >> Method2VerticalLine; } if ($1=="NewCOCOMINWrapperMedian" && $2 == "precise" && $3 == "dynamicLocomoMean") {print NR,$4,$1"-"$2"-"$3 >> Method3; print 45,$4,$1"-"$2"-"$3 >> Method3VerticalLine; } if ($1=="None" && $2 == "precise" && $3 == "dynamicLocomoMean") {print NR,$4,$1"-"$2"-"$3 >> Method4; print 60,$4,$1"-"$2"-"$3 >> Method4VerticalLine; } if ($1=="None" && $2 == "precise" && $3 == "lcManualStratification") {print NR,$4,$1"-"$2"-"$3 >> Method5; print 75,$4,$1"-"$2"-"$3 >> Method5VerticalLine; } if ($1=="M5PWrapper" && $2 == "precise" && $3 == "m5p") {print NR,$4,$1"-"$2"-"$3 >> Method6; print 90,$4,$1"-"$2"-"$3 >> Method6VerticalLine; } if ($1=="LocalWrapper" && $2 == "precise" && $3 == "lc") {print NR,$4,$1"-"$2"-"$3 >> Method7; print 105,$4,$1"-"$2"-"$3 >> Method7VerticalLine; } if ($1=="LSRWrapper" && $2 == "precise" && $3 == "lsr") {print NR,$4,$1"-"$2"-"$3 >> Method8; print 120,$4,$1"-"$2"-"$3 >> Method8VerticalLine; } if ($1=="None" && $2 == "precise" && $3 == "nearestNeighborMre") {print NR,$4,$1"-"$2"-"$3 >> Method9; print 135,$4,$1"-"$2"-"$3 >> Method9VerticalLine; } }}' Method1=Method1SumNasa93 Method2=Method2SumNasa93 Method3=Method3SumNasa93 Method4=Method4SumNasa93 Method5=Method5SumNasa93 Method6=Method6SumNasa93 Method7=Method7SumNasa93 Method8=Method8SumNasa93 Method9=Method9SumNasa93 Method1VerticalLine=Method1SumNasa93VerticalLine Method2VerticalLine=Method2SumNasa93VerticalLine Method3VerticalLine=Method3SumNasa93VerticalLine Method4VerticalLine=Method4SumNasa93VerticalLine Method5VerticalLine=Method5SumNasa93VerticalLine Method6VerticalLine=Method6SumNasa93VerticalLine Method7VerticalLine=Method7SumNasa93VerticalLine Method8VerticalLine=Method8SumNasa93VerticalLine Method9VerticalLine=Method9SumNasa93VerticalLine; cat sumInputTemp_$input | gawk 'BEGIN{FS="\t"; OFS="\t"} {print NR,$1"-"$2"-"$3,$4;}' > sumInput_$input; cat $input | gawk 'BEGIN{FS=","; OFS="\t";} {if ($1 != "wrapper") print $1,$2,$3,$5-$6;}' | sort -n -k 4 > diffInputTemp_$input; cat diffInputTemp_$input | gawk 'BEGIN{FS="\t"; OFS="\t";} {if ($1 != "wrapper") { if ($1=="None" && $2 == "precise" && $3 == "lc") {print NR,$4,$1"-"$2"-"$3 >> Method1; print 15,$4,$1"-"$2"-"$3 >> Method1VerticalLine; } if ($1=="NewCOCOMINWrapperMedian" && $2 == "precise" && $3 == "lc") {print NR,$4,$1"-"$2"-"$3 >> Method2; print 30,$4,$1"-"$2"-"$3 >> Method2VerticalLine; } if ($1=="NewCOCOMINWrapperMedian" && $2 == "precise" && $3 == "dynamicLocomoMean") {print NR,$4,$1"-"$2"-"$3 >> Method3; print 45,$4,$1"-"$2"-"$3 >> Method3VerticalLine; } if ($1=="None" && $2 == "precise" && $3 == "dynamicLocomoMean") {print NR,$4,$1"-"$2"-"$3 >> Method4; print 60,$4,$1"-"$2"-"$3 >> Method4VerticalLine; } if ($1=="None" && $2 == "precise" && $3 == "lcManualStratification") {print NR,$4,$1"-"$2"-"$3 >> Method5; print 75,$4,$1"-"$2"-"$3 >> Method5VerticalLine; } if ($1=="M5PWrapper" && $2 == "precise" && $3 == "m5p") {print NR,$4,$1"-"$2"-"$3 >> Method6; print 90,$4,$1"-"$2"-"$3 >> Method6VerticalLine; } if ($1=="LocalWrapper" && $2 == "precise" && $3 == "lc") {print NR,$4,$1"-"$2"-"$3 >> Method7; print 105,$4,$1"-"$2"-"$3 >> Method7VerticalLine; } if ($1=="LSRWrapper" && $2 == "precise" && $3 == "lsr") {print NR,$4,$1"-"$2"-"$3 >> Method8; print 120,$4,$1"-"$2"-"$3 >> Method8VerticalLine; } if ($1=="None" && $2 == "precise" && $3 == "nearestNeighborMre") {print NR,$4,$1"-"$2"-"$3 >> Method9; print 135,$4,$1"-"$2"-"$3 >> Method9VerticalLine; } }}' Method1=Method1DiffNasa93 Method2=Method2DiffNasa93 Method3=Method3DiffNasa93 Method4=Method4DiffNasa93 Method5=Method5DiffNasa93 Method6=Method6DiffNasa93 Method7=Method7DiffNasa93 Method8=Method8DiffNasa93 Method9=Method9DiffNasa93 Method1VerticalLine=Method1DiffNasa93VerticalLine Method2VerticalLine=Method2DiffNasa93VerticalLine Method3VerticalLine=Method3DiffNasa93VerticalLine Method4VerticalLine=Method4DiffNasa93VerticalLine Method5VerticalLine=Method5DiffNasa93VerticalLine Method6VerticalLine=Method6DiffNasa93VerticalLine Method7VerticalLine=Method7DiffNasa93VerticalLine Method8VerticalLine=Method8DiffNasa93VerticalLine Method9VerticalLine=Method9DiffNasa93VerticalLine; cat diffInputTemp_$input | gawk 'BEGIN{FS="\t"; OFS="\t"} {print NR,$1"-"$2"-"$3,$4;}' > diffInput_$input; done