[Bioperl-l] asn and Bio::TreeIO
Lee Katz
lskatz at gmail.com
Mon Mar 3 22:14:31 UTC 2014
Just a little bigger scope of my script. $inTree is the filename of the
input dnd file.
sub printNewTree{
my($inTree,$map,$settings)=@_;
my $d=$$settings{delimiter} || die "ERROR: there is no
delimiter\n".usage();
my $suffix=$$settings{suffix};
my $in=Bio::TreeIO->new(-file=>$inTree);
my $out=Bio::TreeIO->new(); # stdout
my %seen;
my $i=0;
while(my $tree=$in->next_tree){
for my $node($tree->get_nodes){
#if ($i++>100){
# logmsg "DEBUG";
# last;
#}
my $oldid=$node->id || "";
And there is a ton more code below this that is probably irrelevant.
On Mon, Mar 3, 2014 at 5:12 PM, Lee Katz <lskatz at gmail.com> wrote:
> It looks like I get two options here for exporting.
> http://i.imgur.com/TID5RiP.png
>
> Both of them are viewable in MEGA5, so I export Newick (.dnd). Most times
> I can use BioPerl to look at the file. However this particular version
> gives me problems in BioPerl.
>
> This is the current version giving me an error:
> http://wikisend.com/download/657408/Listeria_2014_03_03_kmer_tree[1].asn
> And the converted file using NCBI Workbench:
> http://wikisend.com/download/598906/Listeria_2014_03_03_kmer_tree.asn.dnd
>
> This is the TreeIO error. Any hints on how to debug further? Thank you!
>
> ------------- EXCEPTION: Bio::Root::Exception -------------
> MSG: parse error: expected ; or ) or ,
>
> STACK: Error::throw
> STACK: Bio::Root::Root::throw
> /usr/local/share/perl/5.12.4/Bio/Root/Root.pm:472
> STACK: Bio::TreeIO::NewickParser::parse_newick
> /usr/local/share/perl/5.12.4/Bio/TreeIO/NewickParser.pm:195
> STACK: Bio::TreeIO::newick::next_tree
> /usr/local/share/perl/5.12.4/Bio/TreeIO/newick.pm:143
> STACK: Bio::TreeIO::nexus::_parse /usr/local/share/perl/5.12.4/Bio/TreeIO/
> nexus.pm:204
> STACK: Bio::TreeIO::nexus::next_tree
> /usr/local/share/perl/5.12.4/Bio/TreeIO/nexus.pm:129
> STACK: main::printNewTree scripts/renameTreeNodes_v3.pl:64
> STACK: main::main scripts/renameTreeNodes_v3.pl:30
> STACK: scripts/renameTreeNodes_v3.pl:17
> -----------------------------------------------------------
>
>
> The while statement is line 64 which is where the error happens above.
>
> my $in=Bio::TreeIO->new(-file=>$inTree);
> my $out=Bio::TreeIO->new(); # stdout
> my %seen;
> my $i=0;
> while(my $tree=$in->next_tree){
>
>
>
>
> On Mon, Mar 3, 2014 at 4:52 PM, Fields, Christopher J <
> cjfields at illinois.edu> wrote:
>
>> Ick; no one really uses ASN1 outside of NCBI. No XML output option?
>>
>> chris
>>
>> On Mar 3, 2014, at 3:50 PM, Lee Katz <lskatz at gmail.com> wrote:
>>
>> It is from NCBI's genome workbench
>> On Mar 3, 2014 4:40 PM, "Fields, Christopher J" <cjfields at illinois.edu>
>> wrote:
>>
>>> Not that I’m aware of. What was the source of the output?
>>>
>>> chris
>>>
>>> On Mar 3, 2014, at 2:32 PM, Lee Katz <lskatz at gmail.com> wrote:
>>>
>>> > Hi Bioperl, I was wondering if there is a way to read an asn file using
>>> > Bio::Perl. This is one of the files I want to look at.
>>> >
>>> > http://wikisend.com/download/372926/Listeria_2014_02_11_kmer_tree.asn
>>> >
>>> > --
>>> > Lee Katz
>>> > _______________________________________________
>>> > Bioperl-l mailing list
>>> > Bioperl-l at lists.open-bio.org
>>> > http://lists.open-bio.org/mailman/listinfo/bioperl-l
>>>
>>>
>>
>
>
> --
> Lee Katz, Ph.D.
>
--
Lee Katz, Ph.D.
More information about the Bioperl-l
mailing list