[Biopython] Question about Nexus Format Converting
David Winter
winda002 at student.otago.ac.nz
Sat Sep 7 05:53:41 UTC 2013
Hi cacaucenturion,
The Nexus module will let you do this. You'd create an empty nexus object, read your existing file into, then write out the nexus object specifying that you want a non-interleaved format (which is actually the default):
from Bio.Nexus import Nexus
new_ali = Nexus.Nexus()
new_ali.read("../biopython/Tests/Nexus/test_Nexus_input.nex") #interleaved nexus file in test suite
new_ali.write_nexus_data("test_sequential.nex", interleave=False)
Hope that helps,
David
_____________________
From: biopython-bounces at lists.open-bio.org <biopython-bounces at lists.open-bio.org> on behalf of cacaucenturion2 <cacaucenturion2 at gmail.com>
Sent: Saturday, 7 September 2013 12:42 a.m.
To: biopython
Subject: [Biopython] Question about Nexus Format Converting
Hi all,
Does anyone know if it is possible to convert interleaved nexus format file to non-interleaved nexus format file in Biopython? Thanks!
Sincerely yours,
Cacau
More information about the Biopython
mailing list