comparison complete.sh @ 5:3287f7b9c47d draft

Uploaded
author davidvanzessen
date Fri, 05 Sep 2014 04:19:58 -0400
parents 778a9d130904
children 8b46fca04595
comparison
equal deleted inserted replaced
4:24d5d9120d93 5:3287f7b9c47d
1 #!/bin/bash 1 #!/bin/bash
2 2 set -e
3 inputFiles=($1) 3 inputFiles=($1)
4 outputDir=$3 4 outputDir=$3
5 outputFile=$3/index.html #$1 5 outputFile=$3/index.html #$1
6 clonalType=$4 6 clonalType=$4
7 species=$5 7 species=$5
29 echo "<tr><td>Finished parse of sample $3 of patient $2</td></tr>" >> $html 29 echo "<tr><td>Finished parse of sample $3 of patient $2</td></tr>" >> $html
30 } 30 }
31 31
32 function imgtConvert { 32 function imgtConvert {
33 echo "<tr><td>Starting imgt convert of sample $3 of patient $2</td></tr>" >> $html 33 echo "<tr><td>Starting imgt convert of sample $3 of patient $2</td></tr>" >> $html
34 bash $dir/imgtconvert.sh $1 $2 $3 $4 34 bash $dir/imgt_loader.sh $1 $4 $5
35 echo "<tr><td>Finished conversion of sample $3 of patient $2</td></tr>" >> $html 35 echo "<tr><td>Finished conversion of sample $3 of patient $2</td></tr>" >> $html
36 36
37 } 37 }
38 38
39 id="" 39 id=""
57 zipType="Zip archive" 57 zipType="Zip archive"
58 if [[ "$f" == *"$zipType"* ]] 58 if [[ "$f" == *"$zipType"* ]]
59 then 59 then
60 echo "<tr><td>Sample $count of patient $id is a zip file, using IMGT Loader</td></tr>" >> $html 60 echo "<tr><td>Sample $count of patient $id is a zip file, using IMGT Loader</td></tr>" >> $html
61 fileName=$(basename $current) 61 fileName=$(basename $current)
62 imgtConvert $current $id $count $parsedFileName & 62 imgtConvert $current $id $count $parsedFileName "${id}_${count}" &
63 else 63 else
64 echo "<tr><td>Sample $count of patient $id is not a zip file, using igBLASTn</td></tr>" >> $html 64 echo "<tr><td>Sample $count of patient $id is not a zip file, using igBLASTn</td></tr>" >> $html
65 blastAndParse $current $id $count $fileName $parsedFileName & 65 blastAndParse $current $id $count $fileName $parsedFileName &
66 fi 66 fi
67 mergerInput+=($parsedFileName) 67 mergerInput+=($parsedFileName)
72 echo "after loop" 72 echo "after loop"
73 73
74 echo "<tr><td>-----------------------------------</td></tr>" >> $html 74 echo "<tr><td>-----------------------------------</td></tr>" >> $html
75 echo "<tr><td>merging</td></tr>" >> $html 75 echo "<tr><td>merging</td></tr>" >> $html
76 76
77 python $dir/experimental_design.py ${mergerInput[*]} --output $PWD/merged.txt 77 python $dir/experimental_design.py ${mergerInput[*]} --output $PWD/merged.txt
78 78
79 echo "<tr><td>done</td></tr>" >> $html 79 echo "<tr><td>done</td></tr>" >> $html
80 echo "<tr><td>-----------------------------------</td></tr>" >> $html 80 echo "<tr><td>-----------------------------------</td></tr>" >> $html
81 echo "<tr><td>plotting</td></tr>" >> $html 81 echo "<tr><td>plotting</td></tr>" >> $html
82
83 echo "after ED"
82 84
83 if [ "$locus" == "igh" ] || [ "$locus" == "igk" ] || [ "$locus" == "igl" ]; then 85 if [ "$locus" == "igh" ] || [ "$locus" == "igk" ] || [ "$locus" == "igl" ]; then
84 bash $dir/r_wrapper_b.sh $PWD/merged.txt $2 $outputDir $clonalType $species $locus $selection 86 bash $dir/r_wrapper_b.sh $PWD/merged.txt $2 $outputDir $clonalType $species $locus $selection
85 else 87 else
86 bash $dir/r_wrapper_t.sh $PWD/merged.txt $2 $outputDir $clonalType $species $locus $selection 88 bash $dir/r_wrapper_t.sh $PWD/merged.txt $2 $outputDir $clonalType $species $locus $selection