comparison wrapper.sh @ 34:d436daae9d68 draft

Uploaded
author davidvanzessen
date Thu, 18 Jun 2015 03:10:11 -0400
parents 2a7343e4be5a
children 8dba36531e6e
comparison
equal deleted inserted replaced
33:ac9a4307861a 34:d436daae9d68
5 method=$2 5 method=$2
6 output=$3 6 output=$3
7 outdir=$4 7 outdir=$4
8 title=$5 8 title=$5
9 include_fr1=$6 9 include_fr1=$6
10 functionality=$7
11 unique=$8
10 mkdir $outdir 12 mkdir $outdir
11 13
12 unzip $input -d $PWD/files/ > $PWD/unziplog.log 14 unzip $input -d $PWD/files/ > $PWD/unziplog.log
13 cat $PWD/files/*/1_* > $PWD/summary.txt 15 cat $PWD/files/*/1_* > $PWD/summary.txt
14 cat $PWD/files/*/7_* > $PWD/mutationanalysis.txt 16 cat $PWD/files/*/7_* > $PWD/mutationanalysis.txt
38 fi 40 fi
39 41
40 42
41 43
42 echo "merging" 44 echo "merging"
43 Rscript $dir/merge_and_filter.r $PWD/summary.txt $PWD/mutationanalysis.txt $PWD/mutationstats.txt $PWD/hotspots.txt $outdir/identified_genes.txt $outdir/merged.txt $outdir/unmatched.txt $method 45 Rscript $dir/merge_and_filter.r $PWD/summary.txt $PWD/mutationanalysis.txt $PWD/mutationstats.txt $PWD/hotspots.txt $outdir/identified_genes.txt $outdir/merged.txt $outdir/unmatched.txt $method $functionality $unique
44 46
45 genes="ca,ca1,ca2,cg,cg1,cg2,cg3,cg4,cm" 47 genes="ca,ca1,ca2,cg,cg1,cg2,cg3,cg4,cm"
46 echo "R mutation analysis" 48 echo "R mutation analysis"
47 Rscript $dir/mutation_analysis.r $outdir/merged.txt $genes $outdir ${include_fr1} 2>&1 49 Rscript $dir/mutation_analysis.r $outdir/merged.txt $genes $outdir ${include_fr1} 2>&1
48 echo "python mutation analysis" 50 echo "python mutation analysis"
72 else 74 else
73 echo "<tr><td>$name</td><td>${cax}/${cay} (${caz}%)</td><td>${ca1x}/${ca1y} (${ca1z}%)</td><td>${ca2x}/${ca2y} (${ca2z}%)</td><td>${cgx}/${cgy} (${cgz}%)</td><td>${cg1x}/${cg1y} (${cg1z}%)</td><td>${cg2x}/${cg2y} (${cg2z}%)</td><td>${cg3x}/${cg3y} (${cg3z}%)</td><td>${cg4x}/${cg4y} (${cg4z}%)</td><td>${cmx}/${cmy} (${cmz}%)</td><td>${allx}/${ally} (${allz}%)</td></tr>" >> $output 75 echo "<tr><td>$name</td><td>${cax}/${cay} (${caz}%)</td><td>${ca1x}/${ca1y} (${ca1z}%)</td><td>${ca2x}/${ca2y} (${ca2z}%)</td><td>${cgx}/${cgy} (${cgz}%)</td><td>${cg1x}/${cg1y} (${cg1z}%)</td><td>${cg2x}/${cg2y} (${cg2z}%)</td><td>${cg3x}/${cg3y} (${cg3z}%)</td><td>${cg4x}/${cg4y} (${cg4z}%)</td><td>${cmx}/${cmy} (${cmz}%)</td><td>${allx}/${ally} (${allz}%)</td></tr>" >> $output
74 fi 76 fi
75 done < $outdir/result.txt 77 done < $outdir/result.txt
76 echo "</table>" >> $output 78 echo "</table>" >> $output
77 echo "<a href='unmatched.txt'>unmatched</a><br /><a href='motif_per_seq.txt'>motif per sequence</a><br />" >> $output 79 echo "<a href='unmatched.txt'>unmatched</a><br /><a href='motif_per_seq.txt'>motif per sequence</a><br /><a href='merged.txt'>all data</a><br />" >> $output
78 80
79 81
80 echo "<img src='all.png'/><br />" >> $output 82 echo "<img src='all.png'/><br />" >> $output
81 echo "<a href='all.txt'>download data</a><br />" >> $output 83 echo "<a href='all.txt'>download data</a><br />" >> $output
82 if [ -a $outdir/ca.png ] 84 if [ -a $outdir/ca.png ]