<div dir="ltr">Hi all,<br>like many others, I have been using the excellent example on the Biopython wiki to concatenate multiple alignments into one nexus-file using Biopython's Nexus.combine() function. However, what if I wish to maintain the order of the nexus-partitions specified in 'file_list'. While the tuple 'nexi' is still ordered according to 'file_list', 'combined.charsets.items()' is not. Moreover, sorting the charsets is not possible:<br><br>>>> combined.charsets.items()[0]<br>('partition0038_rps4_CDS.nex', [36567, 36568])<br><br>>>> combined.charsets.items()[1]<br>('partition0004_trnK_CDS.nex', [36569, 36573])<br><br>>>> for i in range(0,len(combined.charsets.items())):<br>... combined.charsets.items()[i] = sorted_items[i]<br>...<br>>>> combined.charsets.items()[0]<br>('partition0038_rps4_CDS.nex', [36567, 36568])<br><br>What procedure would you recommend to maintain the input order of 'file_list' in the output file 'combined.nex'?<br><br>Thank you, Michael<div><div><div><div><br clear="all"><div><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><span style="font-size:12.8px">--</span><br></div><div>Michael Gruenstaeudl (Grünstäudl), PhD</div><div>E-mail: <a href="mailto:mi.gruenstaeudl@gmail.com" target="_blank">mi.gruenstaeudl@gmail.com</a></div><div>Website: <a href="http://u.osu.edu/gruenstaeudl/" target="_blank">http://blogs.fu-berlin.de/gruenstaeudl/</a></div></div></div></div></div></div>
</div></div></div></div></div>