[Biopython-dev] Bio.AlignIO, Bio.Nexus, MrBayes, polymorphic sites, maximum line length

Frank Kauff fkauff at biologie.uni-kl.de
Wed Dec 22 12:41:09 UTC 2010



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.

Frank


> Peter
>
> _______________________________________________
> Biopython-dev mailing list
> Biopython-dev at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/biopython-dev
>




More information about the Biopython-dev mailing list