NameIssue

From Phyloinformatics
Revision as of 12:40, 15 December 2006 by Weigang (talk)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

<perl>

  1. !/usr/bin/perl -w
  2. Run SeqBoot (Phylip) without

use Bio::AlignIO; use Bio::Tools::Run::Phylo::Phylip::SeqBoot; use Data::Dumper;

my $long_name_file=shift @ARGV; my $in=new Bio::AlignIO(-file=>$long_name_file); my $aln=$in->next_aln();

  1. my ($aln2,$ref_name)=$aln->set_displayname_safe();
  2. print Dumper($ref_name);

my @params = ('datatype'=>'SEQUENCE','replicates'=>5); my $seq = Bio::Tools::Run::Phylo::Phylip::SeqBoot->new(@params);

  1. my $aln_ref = $seq->run($aln2);

my ($aln_ref, $name_ref) = $seq->run($aln);

  1. my $aio = Bio::AlignIO->new(-format=>"phylip");

my $aio = Bio::AlignIO->new(-format=>"fasta");

  1. $aln->set_displayname_flat();
  2. my $aio = Bio::AlignIO->new(-file=>">alignment.bootstrap.new",-format=>"clustalw");

foreach my $ai(@{$aln_ref}){

  1. $aio->write_aln($ai->restore_displayname($name_ref));
 foreach my $seq ($ai->each_seq()) {
   print $seq->id(), "\n";
 }
 print "\n";
 $ai=$ai->restore_displayname($name_ref);
 foreach my $seq ($ai->each_seq()) {
   print $seq->id(), "\n";
 }
 print "===\n"
  1. $aio->write_aln($ai);

} </perl>