You'll need to modify the scripts a little, since my TPP directory (/home/TPP/tpp) is hardcoded in the scripts, along with a couple of other minor things. On the protein script, depending on what all you want displayed you'll need to modify things there also. Both of the scripts below will print out the commands needed to generate all of the files. So you redirect them to a file and run the resulting file to generate the spreadsheets in the TPP directory. I know these can easily be made more elegant, but the do the job for me. The peptide prophet script will need to be modified to pull out the fields that you actually want to see in the spreadsheet. The way to do this is to go into a run, set all of the columns how you would like and then convert it to excel manually. Grab that resulting URL and substitute it for the one I have taking care to change the filename to the variable $file. The same can be done for Protein Prophet, except you want to make all of your changes, select the export to excel all in one step and grab that resulting URL if you don't like the options that I have set. The ProteinProphet script is more refined, as you can turn on and off the peptides and annotations. These should be a good starting point for you though.
PeptideProphet (This takes the arguments directory and a list of mzXML files corresponding to the runs you want to convert) :
#!/usr/bin/perl
$dir = $ARGV[0];
$xml = $ARGV[1];
open(XML, "< $xml") or die "Couldn't open filelist: $xml\n";
while ($line=<XML>) {
@val = split /\./,$line;
$file = @val[0];
close(XML);
exit;
Protein Prophet (This one will convert all of the Protein Prophet runs in a directory to .xls):
#!/usr/bin/perl
$dir = 'directory_under_tpp_with_experiments;
opendir (SHTML, "/home/TPP/tpp/$dir") || die ("can't open /home/TPP/tpp/$dir");
@protxml = grep { /.prot.xml$/} readdir (SHTML);
closedir SHTML;
$showpep = 'hide';
$showannot = 'show';
#$showpep = 'show';
print <<EOF1;
#!/bin/tcsh
setenv REQUEST_METHOD GET
EOF1
foreach $xml (@protxml) {
open(XML, "< /home/TPP/tpp/$dir/$xml") or die "Couldn't open database: /home/TPP/tpp/$dir/$xml\n";
$found = 0;
while (!($found) && ($line = <XML>)) {
if ($line =~ /^\s+<protein_summary_data_filter min_probability=\"(.*)\" sensitivity=\"(.*)\" false_positive_error_rate=\"(.*)\" predicted_num_correct=\"(.*)\" predicted_num_incorrect=\"(.*)\"/) {
$prob = $1;
if (($4/($4+$5)) > 0.9499) {
$found = 1;
}
}
}
close (XML);
print <<EOL;
setenv QUERY_STRING 'restore=yes\&xmlfile=/home/TPP/tpp/$dir/$xml'
/home/TPP/tpp/cgi-bin/
protxml2html.pl > /dev/null
setenv QUERY_STRING 'sort=coverage\&min_prob=$prob\&show_groups=hide\&show_annot=$showannot\&show_peps=$showpep\&min_pep_prob=\&min_ntt=\&pep_aa=\&mark_aa=\&text1=\&excel=yes\&restore=no\&xmlfile=%2Fhome%2FTPP%2Ftpp%2F$dir%2F$xml\&exclusions=\&inclusions=\&pexclusions=\&pinclusions=\&xml_input=1\&coverage=\&initial_probability=\&xpress=\&n_instances=\&weight=\&group_number=\&protlen=\&molweight=\&prot_number=\&num_tol_term=\&peptide_group_designator=\&libra=\&peptide_sequence=\&protein=\&n_sibling_peptides_bin=\&nsp_adjusted_probability=\&annotation=\&quant_light2heavy=true\&num_unique_peps=show\&tot_num_peps=show\&xpress_display=show\&asap_display=hide'
/home/TPP/tpp/cgi-bin/
protxml2html.pl > /dev/null
EOL
}
exit;