Hi, I am trying to parse alignments to Seqboot in the PHYLIP package using Bioperl. as seen here http://doc.bioperl.org/bioperl-run/lib/Bio/Tools/Run/Phylo/Phylip/SeqBoot.html
For some reason it doesnt read in the alignment. I have done exactly as in the example. I have a deadline on my master thesis within days. and I have no idea how to fix this Use of uninitialized value in concatenation (.) or string at /opt/local/lib/perl5/site_perl/5.12.4/Bio/Tools/Run/Phylo/Phylip/SeqBoot.pm line 373. Use of uninitialized value in concatenation (.) or string at /opt/local/lib/perl5/site_perl/5.12.4/Bio/Tools/Run/Phylo/Phylip/SeqBoot.pm line 381. Missing command in piped open at /opt/local/lib/perl5/site_perl/5.12.4/Bio/Tools/Run/Phylo/Phylip/SeqBoot.pm line 381. print() on closed filehandle SeqBoot at /opt/local/lib/perl5/site_perl/5.12.4/Bio/Tools/Run/Phylo/Phylip/SeqBoot.pm line 383. #!/usr/bin/perl -w use strict; use warnings; use BIO::Perl; use Bio::SeqIO; use Bio::AlignIO; use Bio::Tools::Run::Phylo::Phylip::SeqBoot; use Bio::Tools::Phylo::PAML::Result; use Bio::Tools::Phylo::PAML; use Bio::Tools::Run::Alignment::Clustalw; use Bio::Tools::Run::Phylo::PAML::Codeml; BEGIN { $ENV{CLUSTALDIR} = '/usr/local/bin/clustalw2/'} BEGIN { $ENV{PALMDIR} = '~/paml3.14/codelm'}; eval { # Multiple Sequence Alignment programs require Bio::Tools::Run::Alignment::Clustalw; }; use Getopt::Long; my $input=""; GetOptions('i=s' => \$input); if(! defined $input) { print "Usage:\nperl -i cdsfile \n"; exit; } print $input; my $cluster = $input; my %s=(); my $num=0; my $head=""; my $seq =""; # Bootstrapalign.pl # # # Created by Gustav Ahlberg on 24/01/14. # #Create a SimpleAlign object my @params = ('ktuple' => 2, 'matrix' => 'BLOSUM'); my $factory = Bio::Tools::Run::Alignment::Clustalw->new(@params); my $inputfilename = $cluster; my $aln = $factory->align($inputfilename); # $aln is a SimpleAlign object. my $out = Bio::AlignIO->new(-file => ">./tmp/$cluster.aln", -format => 'fasta'); $out -> write_aln($aln); my $input2 = "./tmp/$cluster.aln"; #print $aln; # Use seqboot to generate bootstap alignments my @params = ('datatype'=>'SEQUENCE','replicates'=>100); my $seq = Bio::Tools::Run::Phylo::Phylip::SeqBoot->new(@params); my $aln_ref = $seq->run($aln); foreach my $ai(@{$aln_ref}){ print my $aio->write_aln($ai); } # #my $aio = Bio::AlignIO->new(-file=>">alignment.bootstrap",-format=>"phylip"); #foreach my $ai(@{$aln_ref}){ # $aio->write_aln($ai); #} # To prevent PHYLIP from truncating sequence names: # Step 1. Shelf the original names: #my ($aln_safe, $ref_name)= # $aln_safe has serial names # $input2->set_displayname_safe(); # $ref_name holds orginal names # Step 2. Run PHYLIP programs: #$aln_ref = $seq->run($aln_safe); # Use $aln_safe instead of $aln # Step 3. Retrieve orgininal names #$aio = Bio::AlignIO->new( #-file=>">alignment.bootstrap", #-format=>"fasta"); # FASTA output to view full names #foreach my $ai(@{$aln_ref}){ # my $new_aln=$ai->restore_displayname($ref_name); # Restore names # $aio->write_aln($new_aln); #}