> interleaved format of a PHYLIP alignment file into sequential format?
> Preferably for DOS (Win95) or UNIX platform.
Below is a little perl 5 script for this purpose. I'm working on
a complete set of scripts to integrate PHYLIP with the SEALS package,
but they aren't yet available.
R
#!/usr/bin/perl
undef $/;
while (<>) {
my %output;
split /\n[\n \t]*/;
my $info = shift @_;
my ($species,$letters)=split ' ', $info;
while (@_) {
for (1..$species) {
$output{$_} .= (shift @_)."\n";
}
}
print $info."\n";
for (1..$species) {
print $output{$_};
}
}