| 1 | #!/usr/bin/env perl | ||
| 2 | |||
| 3 | use Getopt::Long::Descriptive; | ||
| 4 | use Bio::Gonzales::Align::IO qw/phylip_spew/; | ||
| 5 | use Bio::Gonzales::Seq::IO qw/faslurp/; | ||
| 6 | |||
| 7 | my ($opt, $usage) = describe_options( | ||
| 8 | '%c %o <fasta_alignment_file>, <phylip_alignment_destination_file>', | ||
| 9 | [ 'help', "print usage message and exit" ], | ||
| 10 | ); | ||
| 11 | |||
| 12 | print($usage->text), exit if $opt->help; | ||
| 13 | |||
| 14 | my ($in, $out) = @ARGV; | ||
| 15 | my $seqs = faslurp($in); | ||
| 16 | |||
| 17 | $seqs = [ grep { $_->seq =~ /\w/ } @$seqs ]; | ||
| 18 | phylip_spew($out, 'relaxed sequential', $seqs ); |