# it needs two files as input,# 1) protein alignment result# 2)cds sequences of the proteinsusestrict;useBio::SeqIO;useBio::AlignIO;useBio::Align::Utilitiesqw(aa_to_dna_aln);my$alignio=Bio::AlignIO->new(-format=>'NEXUS',-file=>'pro.nxs');my$aa_aln=$alignio->next_aln;my$seqdata='cds.fa';my$seqio=newBio::SeqIO(-file=>$seqdata,-format=>'fasta');my%seqs;# process each sequencewhile(my$seq=$seqio->next_seq){$seqs{$seq->display_id}=$seq;}my$dna_aln=aa_to_dna_aln($aa_aln,%seqs);my$out=Bio::AlignIO->new(-file=>">cds.phylip",'-format'=>'NEXUS');$out->write_aln($dna_aln);