Skip Menu |

This queue is for tickets about the Bio-NEXUS CPAN distribution.

Report information
The Basics
Id: 38210
Status: resolved
Worked: 1 hour (60 min)
Priority: 0/
Queue: Bio-NEXUS

People
Owner: stoltzfu [...] umbi.umd.edu
Requestors: ajmackey [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: (no value)
Fixed in: (no value)



Subject: interleaved data matrix from Readseq2 not parsed properly
See the attached file generated using Readseq2. It repeats the taxa labels for each interleaved block. Bio::NEXUS will only report the last block of the alignment. Lines 451 and 456 of Bio/Nexus/CharactersBlock.pm should be: $taxa{$name} ||= []; instead of: $taxa{$name} = []; so that it won't overwrite the previously read sequence.
Subject: HCRT_all_orths_pep1_msfed1.aln.nxs
Download HCRT_all_orths_pep1_msfed1.aln.nxs
application/octet-stream 3.8k

Message body not shown because it is not plain text.

CC: Thomas Hladish <tjhladish [...] yahoo.com>, Aaron Mackey <aaron.j.mackey [...] gsk.com>
Subject: Re: [rt.cpan.org #38210] interleaved data matrix from Readseq2 not parsed properly
Date: Tue, 5 Aug 2008 17:01:56 -0400
To: bug-Bio-NEXUS [...] rt.cpan.org
From: Arlin Stoltzfus <arlin.stoltzfus [...] nist.gov>
Aaron-- I wasn't sure if the bug tracker would send this to you automatically (we don't use it too often), so I cc'ed you. Let me know if this wasn't necessary. With regard to the bug, I don't get this problem with your file. I added it to the test suite so that you can test it. Please put a copy of your file in t/data/compliant and replace the test file corresponding to the attached file (matrix_charactersblock- interleave.t ). This will pick the first OTU (Homo_sapiens) and check that 124 characters are read from the file. I don't get any errors with this: camel12:~/Projects/Bio-NEXUS/NEXPL arlin$ perl t/ matrix_charactersblock-interleave.t Testing interleaved file 't/data/compliant/characters-block- interleave.nex' (expect 59 chars from OTU 'A') ok 1 - Parsing nexus files ok 2 - NEXUS object defined isa Bio::NEXUS ok 3 - 2 blocks are present ok 4 - Bio::NEXUS::CharactersBlock object present isa Bio::NEXUS::CharactersBlock ok 5 - 59 characters are present in 'A' Testing interleaved file 't/data/compliant/ HCRT_all_orths_pep1_msfed1.aln.nxs' (expect 124 chars from OTU 'Homo_sapiens') ok 6 - Parsing nexus files ok 7 - NEXUS object defined isa Bio::NEXUS ok 8 - 2 blocks are present ok 9 - Bio::NEXUS::CharactersBlock object present isa Bio::NEXUS::CharactersBlock ok 10 - 124 characters are present in 'Homo_sapiens' 1..10 Arlin On Aug 5, 2008, at 2:15 PM, Aaron J. Mackey via RT wrote: Show quoted text
> Tue Aug 05 14:15:32 2008: Request 38210 was acted upon. > Transaction: Ticket created by AMACKEY > Queue: Bio-NEXUS > Subject: interleaved data matrix from Readseq2 not parsed > properly > Broken in: (no value) > Severity: Important > Owner: Nobody > Requestors: ajmackey@gmail.com > Status: new > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=38210 > > > > See the attached file generated using Readseq2. It repeats the taxa > labels for each interleaved block. Bio::NEXUS will only report the > last > block of the alignment. > > Lines 451 and 456 of Bio/Nexus/CharactersBlock.pm should be: > > $taxa{$name} ||= []; > > instead of: > > $taxa{$name} = []; > > so that it won't overwrite the previously read > sequence.<HCRT_all_orths_pep1_msfed1.aln.nxs>
------------ Arlin Stoltzfus (arlin.stoltzfus@nist.gov), Research Biologist, NIST Fellow, CARB, 9600 Gudelsky Drive, Rockville, Maryland 20850 tel 240 314 6208, fax 240 314 6255, www.molevol.org/camel 
Aaron--

I wasn't sure if the bug tracker would send this to you automatically (we don't use it too often), so I cc'ed you.  Let me know if this wasn't necessary.  

With regard to the bug, I don't get this problem with your file.  I added it to the test suite so that you can test it.  Please put a copy of your file in t/data/compliant and replace the test file corresponding to the attached file (matrix_charactersblock-interleave.t ).  This will pick the first OTU (Homo_sapiens) and check that 124 characters are read from the file.   I don't get any errors with this: 

camel12:~/Projects/Bio-NEXUS/NEXPL arlin$ perl t/matrix_charactersblock-interleave.t 

Testing interleaved file 't/data/compliant/characters-block-interleave.nex' (expect 59 chars from OTU 'A')
ok 1 - Parsing nexus files
ok 2 - NEXUS object defined isa Bio::NEXUS
ok 3 - 2 blocks are present
ok 4 - Bio::NEXUS::CharactersBlock object present isa Bio::NEXUS::CharactersBlock
ok 5 - 59 characters are present in 'A'

Testing interleaved file 't/data/compliant/HCRT_all_orths_pep1_msfed1.aln.nxs' (expect 124 chars from OTU 'Homo_sapiens')
ok 6 - Parsing nexus files
ok 7 - NEXUS object defined isa Bio::NEXUS
ok 8 - 2 blocks are present
ok 9 - Bio::NEXUS::CharactersBlock object present isa Bio::NEXUS::CharactersBlock
ok 10 - 124 characters are present in 'Homo_sapiens'
1..10

Arlin

On Aug 5, 2008, at 2:15 PM, Aaron J. Mackey via RT wrote:

Show quoted text
Tue Aug 05 14:15:32 2008: Request 38210 was acted upon.
Transaction: Ticket created by AMACKEY
       Queue: Bio-NEXUS
     Subject: interleaved data matrix from Readseq2 not parsed properly
   Broken in: (no value)
    Severity: Important
       Owner: Nobody
  Requestors: ajmackey@gmail.com
      Status: new


See the attached file generated using Readseq2.  It repeats the taxa
labels for each interleaved block.  Bio::NEXUS will only report the last
block of the alignment.

Lines 451 and 456 of Bio/Nexus/CharactersBlock.pm should be:

  $taxa{$name} ||= [];

instead of:

  $taxa{$name} = [];

so that it won't overwrite the previously read sequence.<HCRT_all_orths_pep1_msfed1.aln.nxs>

------------
Arlin Stoltzfus (arlin.stoltzfus@nist.gov), Research Biologist, NIST
Fellow, CARB, 9600 Gudelsky Drive, Rockville, Maryland  20850
tel 240 314 6208, fax 240 314 6255, www.molevol.org/camel

Message body is not shown because sender requested not to inline it.


Aaron-- I decided that it would be wise to close off these "open" bug reports in the CPAN tracker, after ignoring them for years. This one was resolved in version 0.68. We put your problem file in the test suite as indicated in the email exchange. Arlin