Mercurial > repos > davidvanzessen > mutation_analysis
comparison wrapper.sh @ 26:2433a1e110e1 draft
Uploaded
| author | davidvanzessen |
|---|---|
| date | Wed, 08 Apr 2015 05:25:52 -0400 |
| parents | 58a62d2c0377 |
| children | c623690e3b81 |
comparison
equal
deleted
inserted
replaced
| 25:58a62d2c0377 | 26:2433a1e110e1 |
|---|---|
| 13 cat $PWD/files/*/1_* > $PWD/summary.txt | 13 cat $PWD/files/*/1_* > $PWD/summary.txt |
| 14 cat $PWD/files/*/7_* > $PWD/mutationanalysis.txt | 14 cat $PWD/files/*/7_* > $PWD/mutationanalysis.txt |
| 15 cat $PWD/files/*/8_* > $PWD/mutationstats.txt | 15 cat $PWD/files/*/8_* > $PWD/mutationstats.txt |
| 16 cat $PWD/files/*/10_* > $PWD/hotspots.txt | 16 cat $PWD/files/*/10_* > $PWD/hotspots.txt |
| 17 | 17 |
| 18 BLASTN_DIR="/home/galaxy/tmp/blast/ncbi-blast-2.2.30+/bin" | 18 #BLASTN_DIR="/home/galaxy/tmp/blast/ncbi-blast-2.2.30+/bin" |
| 19 | 19 |
| 20 echo "${BLASTN_DIR}" | 20 echo "${BLASTN_DIR}" |
| 21 | |
| 22 | |
| 23 | |
| 24 | 21 |
| 25 echo "identification ($method)" | 22 echo "identification ($method)" |
| 26 | 23 |
| 27 if [[ "${method}" == "custom" ]] ; then | 24 if [[ "${method}" == "custom" ]] ; then |
| 28 python $dir/gene_identification.py --input $PWD/summary.txt --output $outdir/identified_genes.txt | 25 python $dir/gene_identification.py --input $PWD/summary.txt --output $outdir/identified_genes.txt |
| 48 genes="ca,ca1,ca2,cg,cg1,cg2,cg3,cg4,cm" | 45 genes="ca,ca1,ca2,cg,cg1,cg2,cg3,cg4,cm" |
| 49 echo "R mutation analysis" | 46 echo "R mutation analysis" |
| 50 Rscript $dir/mutation_analysis.r $outdir/merged.txt $genes $outdir ${include_fr1} 2>&1 | 47 Rscript $dir/mutation_analysis.r $outdir/merged.txt $genes $outdir ${include_fr1} 2>&1 |
| 51 echo "python mutation analysis" | 48 echo "python mutation analysis" |
| 52 python $dir/mutation_analysis.py --input $outdir/merged.txt --genes $genes --output $outdir/hotspot_analysis.txt | 49 python $dir/mutation_analysis.py --input $outdir/merged.txt --genes $genes --output $outdir/hotspot_analysis.txt |
| 50 echo "R AA histogram" | |
| 51 Rscript $dir/aa_histogram.r $outdir/aa_mutations.txt $outdir/aa_histogram.png 2>&1 | |
| 53 | 52 |
| 54 cat $outdir/mutations.txt $outdir/hotspot_analysis.txt > $outdir/result.txt | 53 cat $outdir/mutations.txt $outdir/hotspot_analysis.txt > $outdir/result.txt |
| 55 | 54 |
| 56 genes=(ca ca1 ca2 cg cg1 cg2 cg3 cg4 cm) | 55 genes=(ca ca1 ca2 cg cg1 cg2 cg3 cg4 cm) |
| 57 | 56 |
| 77 echo "</table>" >> $output | 76 echo "</table>" >> $output |
| 78 echo "<a href='unmatched.txt'>unmatched</a><br /><a href='motif_per_seq.txt'>motif per sequence</a><br />" >> $output | 77 echo "<a href='unmatched.txt'>unmatched</a><br /><a href='motif_per_seq.txt'>motif per sequence</a><br />" >> $output |
| 79 | 78 |
| 80 | 79 |
| 81 echo "<img src='all.png'/><br />" >> $output | 80 echo "<img src='all.png'/><br />" >> $output |
| 81 echo "<a href='all.txt'>download data</a><br />" >> $output | |
| 82 if [ -a $outdir/ca.png ] | 82 if [ -a $outdir/ca.png ] |
| 83 then | 83 then |
| 84 echo "<img src='ca.png'/><br />" >> $output | 84 echo "<img src='ca.png'/><br />" >> $output |
| 85 echo "<a href='ca.txt'>download data</a><br />" >> $output | |
| 85 fi | 86 fi |
| 86 if [ -a $outdir/cg.png ] | 87 if [ -a $outdir/cg.png ] |
| 87 then | 88 then |
| 88 echo "<img src='cg.png'/><br />" >> $output | 89 echo "<img src='cg.png'/><br />" >> $output |
| 90 echo "<a href='cg.txt'>download data</a><br />" >> $output | |
| 89 fi | 91 fi |
| 90 if [ -a $outdir/scatter.png ] | 92 if [ -a $outdir/scatter.png ] |
| 91 then | 93 then |
| 92 echo "<img src='scatter.png'/><br />" >> $output | 94 echo "<img src='scatter.png'/><br />" >> $output |
| 95 echo "<a href='scatter.txt'>download data</a><br />" >> $output | |
| 96 fi | |
| 97 if [ -a $outdir/aa_histogram.png ] | |
| 98 then | |
| 99 echo "<img src='aa_histogram.png'/><br />" >> $output | |
| 100 echo "<a href='aa_histogram.txt'>download data</a><br />" >> $output | |
| 93 fi | 101 fi |
| 94 | 102 |
| 95 for gene in ${genes[@]} | 103 for gene in ${genes[@]} |
| 96 do | 104 do |
| 97 echo "<table border='1'><caption>$gene transition table</caption>" >> $output | 105 echo "<table border='1'><caption>$gene transition table</caption>" >> $output |
