[Bioperl-l] handling nexus files

Denzel Li denzel.dz.li at gmail.com
Mon Oct 5 18:35:20 UTC 2009


Hello all:
Does bioperl support functions for handling nexus files? More specifically,
I need two functions, 1) combine multiple nexus files into one, 2) split a
nexus files into multiple nexus files. For example,
given the following two files  (file1.nex, file2.nex), is there function to
combine them into one file as shown in "combinedFile.nex", or to split
"combinedFile.nex" into two files (file1.nex, file2.nex).

------------------------------
# file1.nex
begin data;
  dimensions ntax=2 nchar=3
b1 GGG
b2 GGT
;end;
---------------------------------
# file2.nex
begin data;
  dimensions ntax=2 nchar=3
b1 AAA
b2 AAT
;end;
-------------------------------

# combinedFile.nex
begin data;
  dimensions ntax=2 nchar=6
[alignment from file1.nex]
b1 GGG
b2 GGT
[alignment from file2.nex]
b1 AAA
b2 AAT
;end;

begin sets;
charset a1=1-3;
charset a2=4-6;
end;
--------------------------------
Any suggestion is highly appreciated. Thank you.

Best,
Denzel



More information about the Bioperl-l mailing list