[Biopython-dev] Bio.AlignIO, Bio.Nexus, MrBayes, polymorphic sites, maximum line length
Peter
biopython at maubp.freeserve.co.uk
Wed Dec 22 13:02:56 UTC 2010
On Wed, Dec 22, 2010 at 12:41 PM, Frank Kauff <fkauff at biologie.uni-kl.de> wrote:
>
> On 12/02/2010 05:22 PM, Peter wrote:
>>
>> On Thu, Dec 2, 2010 at 3:27 PM, Nick Loman<n.j.loman at bham.ac.uk> wrote:
>>>
>>> ...
>>> raise NexusError('Unknown partition: '+interleave_by_partition)
>>> TypeError: cannot concatenate 'str' and 'bool' objects
>>>
>> That should probably be something like this to avoid the TypeError
>> in the exception:
>>
>> raise NexusError('Unknown partition: %r' % interleave_by_partition)
>>
>>> Which suggests that combine does not add partitions for each
>>> alignment. I could of course work around this with extra code.
>>>
>> Or that the code isn't expecting True for interleave_by_partition?
>> At first glance the expected argument type isn't obvious to me...
>
> interleave_by_partition is in fact expecting the name of the partition to be
> used for the split. Nexus.combine() creates a partition named "combined"
> which contains the character delimiting the original files that were used
> for the combination. This partition could then be used for the
> interleave_by_partition parameter.
>
Thanks Frank - I added that to the docstring,
https://github.com/biopython/biopython/commit/c73b0321b26a1377a351466fe9cf927a38943b62
Peter
More information about the Biopython-dev
mailing list