annotate phylostatistics/SHtest.pl @ 0:5b9a38ec4a39 draft default tip

First commit of old repositories
author osiris_phylogenetics <ucsb_phylogenetics@lifesci.ucsb.edu>
date Tue, 11 Mar 2014 12:19:13 -0700
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
5b9a38ec4a39 First commit of old repositories
osiris_phylogenetics <ucsb_phylogenetics@lifesci.ucsb.edu>
parents:
diff changeset
1 #! /usr/bin/perl -w
5b9a38ec4a39 First commit of old repositories
osiris_phylogenetics <ucsb_phylogenetics@lifesci.ucsb.edu>
parents:
diff changeset
2
5b9a38ec4a39 First commit of old repositories
osiris_phylogenetics <ucsb_phylogenetics@lifesci.ucsb.edu>
parents:
diff changeset
3 use strict;
5b9a38ec4a39 First commit of old repositories
osiris_phylogenetics <ucsb_phylogenetics@lifesci.ucsb.edu>
parents:
diff changeset
4 use warnings;
5b9a38ec4a39 First commit of old repositories
osiris_phylogenetics <ucsb_phylogenetics@lifesci.ucsb.edu>
parents:
diff changeset
5
5b9a38ec4a39 First commit of old repositories
osiris_phylogenetics <ucsb_phylogenetics@lifesci.ucsb.edu>
parents:
diff changeset
6 ##For debugging command line pass, uncomment next
5b9a38ec4a39 First commit of old repositories
osiris_phylogenetics <ucsb_phylogenetics@lifesci.ucsb.edu>
parents:
diff changeset
7 #for (my $i=0; $i < @ARGV; $i++){
5b9a38ec4a39 First commit of old repositories
osiris_phylogenetics <ucsb_phylogenetics@lifesci.ucsb.edu>
parents:
diff changeset
8 # print "Parameter #$i ".$ARGV[$i]."\n\n";
5b9a38ec4a39 First commit of old repositories
osiris_phylogenetics <ucsb_phylogenetics@lifesci.ucsb.edu>
parents:
diff changeset
9 #}
5b9a38ec4a39 First commit of old repositories
osiris_phylogenetics <ucsb_phylogenetics@lifesci.ucsb.edu>
parents:
diff changeset
10 #exit;
5b9a38ec4a39 First commit of old repositories
osiris_phylogenetics <ucsb_phylogenetics@lifesci.ucsb.edu>
parents:
diff changeset
11
5b9a38ec4a39 First commit of old repositories
osiris_phylogenetics <ucsb_phylogenetics@lifesci.ucsb.edu>
parents:
diff changeset
12 my $datatype = shift(@ARGV); #0 datatype
5b9a38ec4a39 First commit of old repositories
osiris_phylogenetics <ucsb_phylogenetics@lifesci.ucsb.edu>
parents:
diff changeset
13 my $data_file= shift(@ARGV); #1 input a phylip file
5b9a38ec4a39 First commit of old repositories
osiris_phylogenetics <ucsb_phylogenetics@lifesci.ucsb.edu>
parents:
diff changeset
14 my $part_file = shift(@ARGV); #2 optional partition file
5b9a38ec4a39 First commit of old repositories
osiris_phylogenetics <ucsb_phylogenetics@lifesci.ucsb.edu>
parents:
diff changeset
15 my $best_tree = shift(@ARGV); #3 best tree for SH comparison
5b9a38ec4a39 First commit of old repositories
osiris_phylogenetics <ucsb_phylogenetics@lifesci.ucsb.edu>
parents:
diff changeset
16 my $alt_trees = shift(@ARGV); #4 Alternative tree(s) for SH comparison
5b9a38ec4a39 First commit of old repositories
osiris_phylogenetics <ucsb_phylogenetics@lifesci.ucsb.edu>
parents:
diff changeset
17 my $model;
5b9a38ec4a39 First commit of old repositories
osiris_phylogenetics <ucsb_phylogenetics@lifesci.ucsb.edu>
parents:
diff changeset
18
5b9a38ec4a39 First commit of old repositories
osiris_phylogenetics <ucsb_phylogenetics@lifesci.ucsb.edu>
parents:
diff changeset
19 #ADD OPTIONS TO BUILD FULL RAXML COMMANDLINE ARGUMENT
5b9a38ec4a39 First commit of old repositories
osiris_phylogenetics <ucsb_phylogenetics@lifesci.ucsb.edu>
parents:
diff changeset
20
5b9a38ec4a39 First commit of old repositories
osiris_phylogenetics <ucsb_phylogenetics@lifesci.ucsb.edu>
parents:
diff changeset
21 my $build_command;
5b9a38ec4a39 First commit of old repositories
osiris_phylogenetics <ucsb_phylogenetics@lifesci.ucsb.edu>
parents:
diff changeset
22 #First CALL RAXML THROUGH PATH with 8 threads
5b9a38ec4a39 First commit of old repositories
osiris_phylogenetics <ucsb_phylogenetics@lifesci.ucsb.edu>
parents:
diff changeset
23 $build_command = "raxmlHPC-PTHREADS-SSE3 ";
5b9a38ec4a39 First commit of old repositories
osiris_phylogenetics <ucsb_phylogenetics@lifesci.ucsb.edu>
parents:
diff changeset
24 #Add SH Test Option and Thread number for PThreads
5b9a38ec4a39 First commit of old repositories
osiris_phylogenetics <ucsb_phylogenetics@lifesci.ucsb.edu>
parents:
diff changeset
25 $build_command = $build_command."-f h -T 4";
5b9a38ec4a39 First commit of old repositories
osiris_phylogenetics <ucsb_phylogenetics@lifesci.ucsb.edu>
parents:
diff changeset
26 #Next add call to input phylip file
5b9a38ec4a39 First commit of old repositories
osiris_phylogenetics <ucsb_phylogenetics@lifesci.ucsb.edu>
parents:
diff changeset
27 $build_command = $build_command." -s ".$data_file;
5b9a38ec4a39 First commit of old repositories
osiris_phylogenetics <ucsb_phylogenetics@lifesci.ucsb.edu>
parents:
diff changeset
28 #model is passed directly with xml
5b9a38ec4a39 First commit of old repositories
osiris_phylogenetics <ucsb_phylogenetics@lifesci.ucsb.edu>
parents:
diff changeset
29 $model = $datatype;
5b9a38ec4a39 First commit of old repositories
osiris_phylogenetics <ucsb_phylogenetics@lifesci.ucsb.edu>
parents:
diff changeset
30 $build_command = $build_command." -m ".$model;
5b9a38ec4a39 First commit of old repositories
osiris_phylogenetics <ucsb_phylogenetics@lifesci.ucsb.edu>
parents:
diff changeset
31 #Add call to partition file name
5b9a38ec4a39 First commit of old repositories
osiris_phylogenetics <ucsb_phylogenetics@lifesci.ucsb.edu>
parents:
diff changeset
32 unless($part_file eq 'None'){
5b9a38ec4a39 First commit of old repositories
osiris_phylogenetics <ucsb_phylogenetics@lifesci.ucsb.edu>
parents:
diff changeset
33 $build_command = $build_command." -q ".$part_file;
5b9a38ec4a39 First commit of old repositories
osiris_phylogenetics <ucsb_phylogenetics@lifesci.ucsb.edu>
parents:
diff changeset
34 }
5b9a38ec4a39 First commit of old repositories
osiris_phylogenetics <ucsb_phylogenetics@lifesci.ucsb.edu>
parents:
diff changeset
35 #Next add call to input best tree file
5b9a38ec4a39 First commit of old repositories
osiris_phylogenetics <ucsb_phylogenetics@lifesci.ucsb.edu>
parents:
diff changeset
36 $build_command = $build_command." -t ".$best_tree;
5b9a38ec4a39 First commit of old repositories
osiris_phylogenetics <ucsb_phylogenetics@lifesci.ucsb.edu>
parents:
diff changeset
37 #Next add call to input best tree file
5b9a38ec4a39 First commit of old repositories
osiris_phylogenetics <ucsb_phylogenetics@lifesci.ucsb.edu>
parents:
diff changeset
38 $build_command = $build_command." -z ".$alt_trees;
5b9a38ec4a39 First commit of old repositories
osiris_phylogenetics <ucsb_phylogenetics@lifesci.ucsb.edu>
parents:
diff changeset
39 #name output files galaxy
5b9a38ec4a39 First commit of old repositories
osiris_phylogenetics <ucsb_phylogenetics@lifesci.ucsb.edu>
parents:
diff changeset
40 $build_command = $build_command." -n SH";
5b9a38ec4a39 First commit of old repositories
osiris_phylogenetics <ucsb_phylogenetics@lifesci.ucsb.edu>
parents:
diff changeset
41
5b9a38ec4a39 First commit of old repositories
osiris_phylogenetics <ucsb_phylogenetics@lifesci.ucsb.edu>
parents:
diff changeset
42 print "Galaxy COMMAND BUILD WAS: $build_command\n";
5b9a38ec4a39 First commit of old repositories
osiris_phylogenetics <ucsb_phylogenetics@lifesci.ucsb.edu>
parents:
diff changeset
43
5b9a38ec4a39 First commit of old repositories
osiris_phylogenetics <ucsb_phylogenetics@lifesci.ucsb.edu>
parents:
diff changeset
44 #Uncomment to actually call raxml
5b9a38ec4a39 First commit of old repositories
osiris_phylogenetics <ucsb_phylogenetics@lifesci.ucsb.edu>
parents:
diff changeset
45 system $build_command;
5b9a38ec4a39 First commit of old repositories
osiris_phylogenetics <ucsb_phylogenetics@lifesci.ucsb.edu>
parents:
diff changeset
46