The package phylobase uses NCL to parse Newick files which provides some
information when a non-valid file is being imported. It's not perfect, but
it will at least give you an idea of the part that is not correctly
formated.

  -- François


On Sun, Feb 20, 2011 at 22:31, Ben Bolker <bbol...@gmail.com> wrote:

>  On the other hand, if anyone has any ideas about a paranoid and
> verbose Newick file-checker that gives verbose output about what
> precisely might be wrong/non-conforming in a Newick file ("lint for
> Newick" for the old-fashioned programmers) to help track this sort of
> thing down, that would be probably be very helpful to many on the list ...
>
>
> On 11-02-20 06:59 PM, James Meadow wrote:
> > List administrator - Do not post this question.  I picked through the nwk
> > file again and found a single misplaced space!  it is now fixed.
> >
> > Sorry about that,
> > James
> >
> > On Sun, Feb 20, 2011 at 4:44 PM, James Meadow <jfmea...@gmail.com>
> wrote:
> >
> >> Hello,
> >>
> >> I have seen this error reported in the help list, but the suggestions do
> >> not fix my problem. I am using a very recent version of ape, and I have
> also
> >> tried the patch given here:
> >> https://svn.mpl.ird.fr/ape/dev/ape/R/read.nexus.R
> >>
> >> I am trying to read.tree a large (>300 taxa) nwk tree, and I continue to
> >> get this error:
> >>
> >>> pltr<-read.tree("plant_all_1.nwk")
> >>   # There is apparently two root edges in your file: cannot read tree
> file.
> >>   # Reading Newick file aborted at tree no.1
> >>
> >> I have tried it with .nex, and .nwk and both give the same error.  I can
> >> open this file in any other tree viewer (like FigTree and Mega...) with
> no
> >> problem, and the root is clearly separated.  I have looked through the
> .nwk
> >> file but cannot find where there might be a problem.  I have also tried
> >> removing the first and last ( ) and the tree will read, but then
> plotting
> >> the tree gives this error:
> >>
> >>   # Error in plot.phylo(pltree) :
> >>   # there are single (non-splitting) nodes in your tree; you may need to
> >> use collapse.singles()
> >>   # Calls: plot -> plot.phylo
> >>
> >> and collapse.singles() doesn't fix it.  I have tried to simulate smaller
> >> trees to get the error, but I can't seem to reproduce the situation.
>  Does
> >> ape have some sort of upper limit on tree size?
> >>
> >> The nwk file is attached.
> >>
> >> I apologise in advance if I am missing something simple.
> >>
> >> As a sidenote, I have been using ape and other r-phylo packages for only
> a
> >> short time, and I have all but abandoned most other phylo software in
> the
> >> process - very nice job developing these packages and to EP for a
> terrific
> >> book!  My dissertation is indebted to you.
> >>
> >> Thank you,
> >> James
> >>
> >>
> >>
> >>
> >> --
> >> James Meadow
> >> Land Resources and Environmental Sciences
> >> Montana State University
> >> (406) 370-7157
> >> jfmea...@gmail.com
> >>
> >
> >
> >
>
> _______________________________________________
> R-sig-phylo mailing list
> R-sig-phylo@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
>

        [[alternative HTML version deleted]]

_______________________________________________
R-sig-phylo mailing list
R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo

Reply via email to