comparison wrapper.sh @ 98:5ffbf40cdd4b draft

Uploaded
author davidvanzessen
date Thu, 16 Jun 2016 05:05:47 -0400
parents a66eb1c5374c
children 86206431cbb0
comparison
equal deleted inserted replaced
97:6e8dfbe164c6 98:5ffbf40cdd4b
75 echo "---------------- merge_and_filter.r ----------------" 75 echo "---------------- merge_and_filter.r ----------------"
76 echo "---------------- merge_and_filter.r ----------------<br />" >> $output 76 echo "---------------- merge_and_filter.r ----------------<br />" >> $output
77 77
78 Rscript $dir/merge_and_filter.r $PWD/summary.txt $PWD/sequences.txt $PWD/mutationanalysis.txt $PWD/mutationstats.txt $PWD/hotspots.txt $outdir/identified_genes.txt $outdir/merged.txt $outdir/before_unique_filter.txt $outdir/unmatched.txt $method $functionality $unique ${filter_unique} ${class_filter} 2>&1 78 Rscript $dir/merge_and_filter.r $PWD/summary.txt $PWD/sequences.txt $PWD/mutationanalysis.txt $PWD/mutationstats.txt $PWD/hotspots.txt $outdir/identified_genes.txt $outdir/merged.txt $outdir/before_unique_filter.txt $outdir/unmatched.txt $method $functionality $unique ${filter_unique} ${class_filter} 2>&1
79 79
80 echo "---------------- creating new IMGT zip ----------------<br />" 80 echo "---------------- creating new IMGT zip ----------------"
81 echo "---------------- creating new IMGT zip ----------------<br />" >> $output 81 echo "---------------- creating new IMGT zip ----------------<br />" >> $output
82 82
83 mkdir $outdir/new_IMGT 83 mkdir $outdir/new_IMGT
84 84
85 cat `find $PWD/files/ -name "1_*"` > "$outdir/new_IMGT/1_Summary.txt" 85 cat `find $PWD/files/ -name "1_*"` > "$outdir/new_IMGT/1_Summary.txt"
148 148
149 echo "<html><center><h1>$title</h1></center>" > $output 149 echo "<html><center><h1>$title</h1></center>" > $output
150 150
151 #display the matched/unmatched for clearity 151 #display the matched/unmatched for clearity
152 152
153 matched_count="`cat $outdir/merged.txt | tail -n +2 | wc -l`" 153 matched_count="`cat $outdir/merged.txt | grep -v 'unmatched' | tail -n +2 | wc -l`"
154 unmatched_count="`cat $outdir/unmatched.txt | tail -n +2 | wc -l`" 154 unmatched_count="`cat $outdir/unmatched.txt | tail -n +2 | wc -l`"
155 total_count=$((matched_count + unmatched_count)) 155 total_count=$((matched_count + unmatched_count))
156 perc_count=$((unmatched_count / total_count * 100)) 156 perc_count=$((unmatched_count / total_count * 100))
157 perc_count=`bc -l <<< "scale=2; ${unmatched_count} / ${total_count} * 100"` 157 perc_count=`bc -l <<< "scale=2; ${unmatched_count} / ${total_count} * 100"`
158 perc_count=`bc -l <<< "scale=2; (${unmatched_count} / ${total_count} * 100 ) / 1"` 158 perc_count=`bc -l <<< "scale=2; (${unmatched_count} / ${total_count} * 100 ) / 1"`
167 167
168 echo "---------------- $func table ----------------" 168 echo "---------------- $func table ----------------"
169 169
170 cat $outdir/mutations_${func}.txt $outdir/hotspot_analysis_${func}.txt > $outdir/data_${func}.txt 170 cat $outdir/mutations_${func}.txt $outdir/hotspot_analysis_${func}.txt > $outdir/data_${func}.txt
171 171
172 echo "<table border='1' width='100%'><caption><h3>${func} table</h3></caption>" >> $output 172 echo "<table border='1' width='100%'><caption><h3><a href='data_${func}.txt'>${func} table</a></h3></caption>" >> $output
173 echo "<tr><th>info</th>" >> $output 173 echo "<tr><th>info</th>" >> $output
174 for gene in ${genes[@]} 174 for gene in ${genes[@]}
175 do 175 do
176 tmp=`cat $outdir/${gene}_${func}_n.txt` 176 tmp=`cat $outdir/${gene}_${func}_n.txt`
177 echo "<th><a href='matched_${gene}_${func}.txt'>${gene} (N = $tmp)</a></th>" >> $output 177 echo "<th><a href='matched_${gene}_${func}.txt'>${gene} (N = $tmp)</a></th>" >> $output