Mercurial > repos > davidvanzessen > mutation_analysis
comparison wrapper.sh @ 63:a7381fd96dad draft
Uploaded
author | davidvanzessen |
---|---|
date | Fri, 25 Mar 2016 07:50:12 -0400 |
parents | 4262e880472d |
children | 0fdd90f7c654 |
comparison
equal
deleted
inserted
replaced
62:4262e880472d | 63:a7381fd96dad |
---|---|
12 naive_output=$9 | 12 naive_output=$9 |
13 filter_unique=${10} | 13 filter_unique=${10} |
14 mkdir $outdir | 14 mkdir $outdir |
15 | 15 |
16 echo "---------------- read parameters ----------------" | 16 echo "---------------- read parameters ----------------" |
17 echo "---------------- read parameters ----------------" > $output | 17 echo "---------------- read parameters ----------------<br />" > $output |
18 | 18 |
19 echo "unpacking IMGT file" | 19 echo "unpacking IMGT file" |
20 | 20 |
21 type="`file $input`" | 21 type="`file $input`" |
22 if [[ "$type" == *"Zip archive"* ]] ; then | 22 if [[ "$type" == *"Zip archive"* ]] ; then |
41 #BLASTN_DIR="/home/galaxy/tmp/blast/ncbi-blast-2.2.30+/bin" | 41 #BLASTN_DIR="/home/galaxy/tmp/blast/ncbi-blast-2.2.30+/bin" |
42 | 42 |
43 echo "${BLASTN_DIR}" | 43 echo "${BLASTN_DIR}" |
44 | 44 |
45 echo "identification ($method)" | 45 echo "identification ($method)" |
46 echo "identification ($method)" >> $output | 46 echo "identification ($method)<br />" >> $output |
47 | 47 |
48 echo "blast or custom" | 48 echo "blast or custom" |
49 | 49 |
50 if [[ "${method}" == "custom" ]] ; then | 50 if [[ "${method}" == "custom" ]] ; then |
51 echo "custom" | 51 echo "custom" |
64 echo -e "qseqid\tsseqid\tpident\tlength\tmismatch\tgapopen\tqstart\tqend\tsstart\tsend\tevalue\tbitscore" > $outdir/identified_genes.txt | 64 echo -e "qseqid\tsseqid\tpident\tlength\tmismatch\tgapopen\tqstart\tqend\tsstart\tsend\tevalue\tbitscore" > $outdir/identified_genes.txt |
65 ${BLASTN_DIR}/blastn -task blastn -db $dir/subclass_definition.db -query $PWD/sequences.fasta -outfmt 6 >> $outdir/identified_genes.txt | 65 ${BLASTN_DIR}/blastn -task blastn -db $dir/subclass_definition.db -query $PWD/sequences.fasta -outfmt 6 >> $outdir/identified_genes.txt |
66 fi | 66 fi |
67 | 67 |
68 echo "---------------- merge_and_filter.r ----------------" | 68 echo "---------------- merge_and_filter.r ----------------" |
69 echo "---------------- merge_and_filter.r ----------------" >> $output | 69 echo "---------------- merge_and_filter.r ----------------<br />" >> $output |
70 | 70 |
71 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/unmatched.txt $method $functionality $unique ${filter_unique} | 71 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/unmatched.txt $method $functionality $unique ${filter_unique} |
72 | 72 |
73 echo "---------------- mutation_analysis.r ----------------" | 73 echo "---------------- mutation_analysis.r ----------------" |
74 echo "---------------- mutation_analysis.r ----------------" >> $output | 74 echo "---------------- mutation_analysis.r ----------------<br />" >> $output |
75 | 75 |
76 genes="ca,ca1,ca2,cg,cg1,cg2,cg3,cg4,cm" | 76 genes="ca,ca1,ca2,cg,cg1,cg2,cg3,cg4,cm" |
77 echo "R mutation analysis" | 77 echo "R mutation analysis" |
78 Rscript $dir/mutation_analysis.r $outdir/merged.txt $genes $outdir ${include_fr1} 2>&1 | 78 Rscript $dir/mutation_analysis.r $outdir/merged.txt $genes $outdir ${include_fr1} 2>&1 |
79 | 79 |
81 #exit 0 | 81 #exit 0 |
82 | 82 |
83 | 83 |
84 | 84 |
85 echo "---------------- mutation_analysis.py ----------------" | 85 echo "---------------- mutation_analysis.py ----------------" |
86 echo "---------------- mutation_analysis.py ----------------" >> $output | 86 echo "---------------- mutation_analysis.py ----------------<br />" >> $output |
87 | 87 |
88 python $dir/mutation_analysis.py --input $outdir/merged.txt --genes $genes --includefr1 "${include_fr1}" --output $outdir/hotspot_analysis.txt | 88 python $dir/mutation_analysis.py --input $outdir/merged.txt --genes $genes --includefr1 "${include_fr1}" --output $outdir/hotspot_analysis.txt |
89 echo "R AA histogram" | 89 echo "R AA histogram" |
90 | 90 |
91 echo "---------------- aa_histogram.r ----------------" | 91 echo "---------------- aa_histogram.r ----------------" |
92 echo "---------------- aa_histogram.r ----------------" >> $output | 92 echo "---------------- aa_histogram.r ----------------<br />" >> $output |
93 | 93 |
94 Rscript $dir/aa_histogram.r $outdir/aa_mutations.txt $outdir/aa_histogram.png 2>&1 | 94 Rscript $dir/aa_histogram.r $outdir/aa_mutations.txt $outdir/aa_histogram.png 2>&1 |
95 | 95 |
96 genes=(ca ca1 ca2 cg cg1 cg2 cg3 cg4 cm) | 96 genes=(ca ca1 ca2 cg cg1 cg2 cg3 cg4 cm) |
97 | 97 |