[Phylobase-devl] characters not being read

François Michonneau francois.michonneau at gmail.com
Sun Aug 8 10:12:22 CEST 2010


Hi,

  I feel there are 2 different issues here.

  For the tip labels, I feel it would be best to keep the labels as they
are returned from NCL to stay consistant.

  For the CHARSTATELABELS we can add the option check.names to
readNexus.

  Cheers,
  -- François 

On Thu, 2010-08-05 at 15:37 -0400, Conrad Stack wrote:
> What about, since phylobase requires ape, importing the checkLabel
> function from ape and filtering all tip label through that function?
> 
> 
> -conrad
> 
> On Thu, Aug 5, 2010 at 10:00 AM, Ben Bolker <bolker at ufl.edu> wrote:
>         François Michonneau wrote:
>         > Hi again Conrad,
>         >
>         >   In the file you sent me there were no state labels (just
>         > charstatelabels), so the warning is normal.
>         >
>         >   For the underscore issue, there isn't much we can do
>         about. NCL
>         > converts underscores to spaces because there is no way to
>         > differentiate them in newick strings for instance. Then when
>         the name
>         > is assigned to the column name in R, the space is converted
>         to a dot.
>         >
>         >   Cheers,
>         >   -- François
>         
>         
>           If we wanted to we could (a) convert spaces back to
>         underscores
>         ourselves after NCL import (b) disable conversion of spaces to
>         dots by
>         using check.names=FALSE in the data.frame() call.
>         
>           I don't know whether either of these is useful in general,
>         or if we
>         just need to 'fix' this in the documentation.
>         
>          Opinions?
>         
>          Ben
>         
>         
>         >
>         > On Wed, Aug 4, 2010 at 22:31, Conrad Stack <stack at psu.edu>
>         wrote:
>         >> Looks great.  Two things:  it looks like the warning
>         message about 'state
>         >> labels' fires even when labels are found (only when
>         DATATYPE=STANDARD) and,
>         >> perhaps relatedly, underscores in CHARSTATELABELS are
>         automatically
>         >> converted to periods.
>         >> Thanks!
>         >> -Conrad
>         >>
>         >>
>         >>
>         >> On Wed, Aug 4, 2010 at 12:53 PM, François Michonneau
>         >> <francois.michonneau at gmail.com> wrote:
>         >>> Hi,
>         >>>
>         >>>  My last commit should fix the issue Conrad mentioned.
>         >>>
>         >>>  The problem came from the fact that the nexus file didn't
>         have state
>         >>> labels and the default option in readNexus was to return
>         them. It
>         >>> ended up attaching empty labels to the the 0 and 1 which
>         resulted in
>         >>> the empty column observed. I modified readNexus to (1)
>         return a
>         >>> warning when state labels are missing and return.labels is
>         TRUE which
>         >>> leads to ignoring the return.labels option.
>         >>>
>         >>>  Let me know if you find any other bugs.
>         >>>
>         >>>  Cheers,
>         >>>  -- François
>         >>>
>         >>> On Tue, Aug 3, 2010 at 17:42, Conrad Stack <stack at psu.edu>
>         wrote:
>         >>>> I just upgraded to phylobase 0.6.1 and found that the
>         data in my
>         >>>> CHARACTERS
>         >>>> blocks are no longer being read in (they show up as
>         blanks in the
>         >>>> returned
>         >>>> phylo4d object).
>         >>>> this is from the geospiza.nex dataset:
>         >>>> BEGIN CHARACTERS;
>         >>>> DIMENSIONS  NCHAR=1;
>         >>>> FORMAT DATATYPE = STANDARD GAP = - MISSING = ? SYMBOLS =
>         "  0 1";
>         >>>> MATRIX
>         >>>> fuliginosa    1
>         >>>> fortis        1
>         >>>> magnirostris  0
>         >>>> conirostris   0
>         >>>> scandens      0
>         >>>> difficilis    1
>         >>>> pallida       0
>         >>>> parvulus      0
>         >>>> psittacula    0
>         >>>> pauper        0
>         >>>> Platyspiza    0
>         >>>> fusca         0
>         >>>> Pinaroloxias  0
>         >>>> ;
>         >>>> END;
>         >>>> When it reads in, it shows up like this:
>         >>>> readNexus("geospiza.nex")
>         >>>>           label node ancestor edge.length node.type
>         standard_char
>         >>>> 1    fuliginosa    1       22     0.05500       tip
>         >>>> 2        fortis    2       22     0.05500       tip
>         >>>> 3  magnirostris    3       21     0.11000       tip
>         >>>> 4   conirostris    4       20     0.18333       tip
>         >>>> 5      scandens    5       19     0.19250       tip
>         >>>> 6    difficilis    6       18     0.22800       tip
>         >>>> 7       pallida    7       23     0.08667       tip
>         >>>> 8      parvulus    8       25     0.02000       tip
>         >>>> 9    psittacula    9       25     0.02000       tip
>         >>>> 10       pauper   10       24     0.03500       tip
>         >>>> 11   Platyspiza   11       16     0.46550       tip
>         >>>> 12        fusca   12       15     0.53409       tip
>         >>>> 13 Pinaroloxias   13       14     0.58333       tip
>         >>>> 14         <NA>   14        0     0.29744      root
>              <NA>
>         >>>> 15         <NA>   15       14     0.04924  internal
>              <NA>
>         >>>> 16         <NA>   16       15     0.06859  internal
>              <NA>
>         >>>> .......cont....
>         >>>> Any thoughts?  (I'm using windows 7 32-bit with R 2.11,
>         but the error
>         >>>> occurs
>         >>>> on my Mac leopard install as well.
>         >>>>
>         >>>>
>         >>>> --
>         >>>> Conrad Stack
>         >>>> -----------------------
>         >>>> PSU Department of Biology
>         >>>> 208 Mueller Lab
>         >>>> University Park, PA 16802
>         >>>> cell: 814.409.8310
>         >>>> email: conrad.stack at gmail.com
>         >>>>
>         >>>> _______________________________________________
>         >>>> Phylobase-devl mailing list
>         >>>> Phylobase-devl at lists.r-forge.r-project.org
>         >>>>
>         >>>>
>         https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/phylobase-devl
>         >>>>
>         >>>>
>         >>
>         >>
>         >> --
>         >> Conrad Stack
>         >> -----------------------
>         >> PSU Department of Biology
>         >> 208 Mueller Lab
>         >> University Park, PA 16802
>         >> cell: 814.409.8310
>         >> email: conrad.stack at gmail.com
>         >>
>         > _______________________________________________
>         > Phylobase-devl mailing list
>         > Phylobase-devl at lists.r-forge.r-project.org
>         >
>         https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/phylobase-devl
>         
>         
>         --
>         
>         Ben Bolker
>         *** NEW E-MAIL ADDRESSES:
>         ***   bbolker at gmail.com , bolker at mcmaster.ca
>         http://www.math.mcmaster.ca/~bolker
>         GPG key:
>         http://www.math.mcmaster.ca/~bolker/benbolker-publickey.asc
>         
> 
> 
> 
> -- 
> Conrad Stack
> -----------------------
> PSU Department of Biology
> 208 Mueller Lab 
> University Park, PA 16802
> cell: 814.409.8310
> email: conrad.stack at gmail.com
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://lists.r-forge.r-project.org/pipermail/phylobase-devl/attachments/20100808/9f933edc/attachment.pgp>


More information about the Phylobase-devl mailing list