# Author: Robert Waterhouse #!/usr/local/bin/perl use strict; # list the BUSCO trimmed alignment files in busco_alns my @usc_buscos=split(/\s+/,`ls busco_alns/*.trm`); # make directory to keep all your trees if(-d "busco_trees") { `rm -r busco_trees`; } `mkdir busco_trees`; # cycle through each and launch a tree estimation using RAxML my $counter=0; foreach my $busco (@usc_buscos) { my $out=$busco; $out=~s/.aln.trm//; $out=~s/busco_alns\///; `raxmlHPC-SSE3 -s $busco -n $out -m PROTGAMMAJTT -p 12345 -w /home/student/rmw2/busco_trees`; $counter++; if( ($counter % 10) == 0) { print "Built $counter trees\n"; } if($counter==30) { print "Stopping after 30 trees\n"; last; } } print "DONE - built $counter trees\n";