Mercurial > repos > iracooke > tpp_prophets
annotate protein_prophet_wrapper.sh @ 9:c04896f31ff7
Added bash wrapper scripts and protxml to table
author | Ira Cooke <iracooke@gmail.com> |
---|---|
date | Mon, 10 Jun 2013 04:58:03 -0500 |
parents | |
children |
rev | line source |
---|---|
9
c04896f31ff7
Added bash wrapper scripts and protxml to table
Ira Cooke <iracooke@gmail.com>
parents:
diff
changeset
|
1 #!/usr/bin/env bash |
c04896f31ff7
Added bash wrapper scripts and protxml to table
Ira Cooke <iracooke@gmail.com>
parents:
diff
changeset
|
2 # |
c04896f31ff7
Added bash wrapper scripts and protxml to table
Ira Cooke <iracooke@gmail.com>
parents:
diff
changeset
|
3 |
c04896f31ff7
Added bash wrapper scripts and protxml to table
Ira Cooke <iracooke@gmail.com>
parents:
diff
changeset
|
4 actual_output_path_string=$1;shift |
c04896f31ff7
Added bash wrapper scripts and protxml to table
Ira Cooke <iracooke@gmail.com>
parents:
diff
changeset
|
5 original_input_file=$1;shift |
c04896f31ff7
Added bash wrapper scripts and protxml to table
Ira Cooke <iracooke@gmail.com>
parents:
diff
changeset
|
6 |
c04896f31ff7
Added bash wrapper scripts and protxml to table
Ira Cooke <iracooke@gmail.com>
parents:
diff
changeset
|
7 # Before doing anything we append create a link to the input file in our working dir with ".pep.xml" appended to the input |
c04896f31ff7
Added bash wrapper scripts and protxml to table
Ira Cooke <iracooke@gmail.com>
parents:
diff
changeset
|
8 # name because peptide prophet can't handle anything else |
c04896f31ff7
Added bash wrapper scripts and protxml to table
Ira Cooke <iracooke@gmail.com>
parents:
diff
changeset
|
9 |
c04896f31ff7
Added bash wrapper scripts and protxml to table
Ira Cooke <iracooke@gmail.com>
parents:
diff
changeset
|
10 wd=`pwd` |
c04896f31ff7
Added bash wrapper scripts and protxml to table
Ira Cooke <iracooke@gmail.com>
parents:
diff
changeset
|
11 |
c04896f31ff7
Added bash wrapper scripts and protxml to table
Ira Cooke <iracooke@gmail.com>
parents:
diff
changeset
|
12 actual_input_path_string=$wd/`basename $original_input_file`.pep.xml |
c04896f31ff7
Added bash wrapper scripts and protxml to table
Ira Cooke <iracooke@gmail.com>
parents:
diff
changeset
|
13 |
c04896f31ff7
Added bash wrapper scripts and protxml to table
Ira Cooke <iracooke@gmail.com>
parents:
diff
changeset
|
14 ln -s $original_input_file $actual_input_path_string |
c04896f31ff7
Added bash wrapper scripts and protxml to table
Ira Cooke <iracooke@gmail.com>
parents:
diff
changeset
|
15 |
c04896f31ff7
Added bash wrapper scripts and protxml to table
Ira Cooke <iracooke@gmail.com>
parents:
diff
changeset
|
16 rvm 1.9.3@protk-1.2.2 do protein_prophet.rb $actual_input_path_string $@ -o protein_prophet_results.prot.xml |
c04896f31ff7
Added bash wrapper scripts and protxml to table
Ira Cooke <iracooke@gmail.com>
parents:
diff
changeset
|
17 |
c04896f31ff7
Added bash wrapper scripts and protxml to table
Ira Cooke <iracooke@gmail.com>
parents:
diff
changeset
|
18 if [ -f protein_prophet_results.prot.xml ]; then |
c04896f31ff7
Added bash wrapper scripts and protxml to table
Ira Cooke <iracooke@gmail.com>
parents:
diff
changeset
|
19 sed -i.bak s%$actual_input_path_string%$original_input_file.pep.xml%g protein_prophet_results.prot.xml |
c04896f31ff7
Added bash wrapper scripts and protxml to table
Ira Cooke <iracooke@gmail.com>
parents:
diff
changeset
|
20 fi |
c04896f31ff7
Added bash wrapper scripts and protxml to table
Ira Cooke <iracooke@gmail.com>
parents:
diff
changeset
|
21 |