[Biopython] An error with Concatenate nexus
Frank Kauff
fkauff at biologie.uni-kl.de
Mon May 23 06:19:30 EDT 2011
Hi Esa,
are you using an up-to-date Nexus parser? The codonposset below can be
read without problems when I copy-paste it into one of my nexus files.
Or, if you like, send me a copy of your complete nexus file for a check.
Cheers,
Frank
On 05/19/2011 04:30 PM, Cymon Cox wrote:
> Hi Esa,
>
> At first glance this looks like a bug.
>
> But given that Nexus.combine() is going to discard your codonposset
> character partition anyway, you could try deleting it from the Nexus file
> before combining.
>
> Regards, Cymon
>
> On 19 May 2011 14:02, Esa Aalto<esa.aalto at oulu.fi> wrote:
>
>> Dear group,
>>
>> I'm trying to concatenate 20 nexus files with the instructions given
>> here:
>>
>> http://www.biopython.org/wiki/Concatenate_nexus
>>
>> but it doesn't work:
>>
>> Traceback (most recent call last):
>> File "C:\Python27\concate_nexus.py", line 36, in<module>
>> nexi = [(handle.name, Nexus.Nexus(handle)) for handle in handles]
>> File "C:\Python27\lib\site-packages\Bio\Nexus\Nexus.py", line 555, in
>> __init__
>> self.read(input)
>> File "C:\Python27\lib\site-packages\Bio\Nexus\Nexus.py", line 618, in
>> read
>> self._parse_nexus_block(title, contents)
>> File "C:\Python27\lib\site-packages\Bio\Nexus\Nexus.py", line 659, in
>> _parse_nexus_block
>> getattr(self,'_'+line.command)(line.options)
>> File "C:\Python27\lib\site-packages\Bio\Nexus\Nexus.py", line 1021, in
>> _codonposset
>> raise NexusError('Formatting Error in codonposset: %s ' % options)
>> NexusError: Formatting Error in codonposset: * UNTITLED = 1: 1-577\3, 2:
>> 2-578\3, 3: 3-579\3
>>
>> The end of the first of my nex files looks like this:
>>
>> BEGIN SETS;
>> TaxSet A_thaliana = 1;
>> TaxSet A_lyrata = 2;
>> TaxSet Boh = 3-32;
>> TaxSet Ice = 33-60;
>> TaxSet Ith = 61-92;
>> TaxSet Kar = 93-124;
>> TaxSet Lom = 125-156;
>> TaxSet NC = 157-196;
>> TaxSet Pl = 197-236;
>> TaxSet Sp = 237-274;
>> TaxSet Stu = 275-294;
>> TaxSet South = 3-32 197-236;
>> TaxSet North = 125-156 237-274;
>> TaxSet lyrata = 2-294;
>> END;
>>
>> BEGIN CODONS;
>> CODONPOSSET * UNTITLED =
>> 1: 1-577\3,
>> 2: 2-578\3,
>> 3: 3-579\3;
>> CODESET * UNTITLED = Universal: all;
>> END;
>>
>> BEGIN CODONUSAGE;
>> END;
>>
>> BEGIN DnaSP;
>> Genome= Diploid;
>> ChromosomalLocation= Autosome;
>> VariationType= DNA_Seq_Pol;
>> Species= ---;
>> ChromosomeName= ---;
>> GenomicPosition= 1;
>> GenomicAssembly= ---;
>> DnaSPversion= Ver. 5.10.00;
>> END;
>>
>> Could someone tell what's wrong here? Is it my nexus files or something
>> in the code?
>>
>> Thanks for your help!
>>
>> Esa Aalto
>>
>> _______________________________________________
>> Biopython mailing list - Biopython at lists.open-bio.org
>> http://lists.open-bio.org/mailman/listinfo/biopython
>>
>
>
> --
> _______________________________________________
> Biopython mailing list - Biopython at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/biopython
>
More information about the Biopython
mailing list