Re: [R-sig-phylo] multi2di fails on multiPhylo objects

2017-01-16 Thread Emmanuel Paradis

Hi,

Klaus: thanks for the fix.

There is a development version on ape-package.ird.fr:

http://ape-package.ird.fr/ape_installation.html#versions

This version is 4.0-0.2. The source as well as a Windows version are 
avaialble. The list of changes is there:


http://ape-package.ird.fr/NEWS

Best,

Emmanuel

Le 14/01/2017 à 00:43, Yan Wong a écrit :

On 13 Jan 2017, at 20:37, Klaus Schliep  wrote:


Hi Yan,

it seems we introduced a small bug with making these functions generic. Replace 
in the function .multi2di_ape the line
phy <- reorder(phy)
with
phy <- .reorder_ape(phy, "cladewise", FALSE, n, 1L)
and it should work. You have to recompile ape afterwards.


By the way, is this likely to make it into a new release soon, or is there a 
dev version I can access somehow? I need to roll this out across a number of 
different computers, some of which I don’t have admin access to.

Yan
___
R-sig-phylo mailing list - R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/







___
R-sig-phylo mailing list - R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/


Re: [R-sig-phylo] multi2di fails on multiPhylo objects

2017-01-13 Thread Yan Wong
On 13 Jan 2017, at 20:37, Klaus Schliep  wrote:

> Hi Yan,
> 
> it seems we introduced a small bug with making these functions generic. 
> Replace in the function .multi2di_ape the line   
> phy <- reorder(phy) 
> with 
> phy <- .reorder_ape(phy, "cladewise", FALSE, n, 1L)
> and it should work. You have to recompile ape afterwards. 

By the way, is this likely to make it into a new release soon, or is there a 
dev version I can access somehow? I need to roll this out across a number of 
different computers, some of which I don’t have admin access to.

Yan
___
R-sig-phylo mailing list - R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/


Re: [R-sig-phylo] multi2di fails on multiPhylo objects

2017-01-13 Thread Yan Wong

On 13 Jan 2017, at 20:37, Klaus Schliep  wrote:

> Hi Yan,
> 
> it seems we introduced a small bug with making these functions generic. 
> Replace in the function .multi2di_ape the line   
> phy <- reorder(phy) 
> with 
> phy <- .reorder_ape(phy, "cladewise", FALSE, n, 1L)
> and it should work. You have to recompile ape afterwards. 

That’s great, thanks.

Yan
___
R-sig-phylo mailing list - R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/


Re: [R-sig-phylo] multi2di fails on multiPhylo objects

2017-01-13 Thread Klaus Schliep
Hi Yan,

it seems we introduced a small bug with making these functions generic.
Replace in the function .multi2di_ape the line
phy <- reorder(phy)
with
phy <- .reorder_ape(phy, "cladewise", FALSE, n, 1L)
and it should work. You have to recompile ape afterwards.

Cheers,
Klaus





On Fri, Jan 13, 2017 at 1:24 PM, Yan Wong  wrote:

> Thanks. I think that’s because read_nexus_phylo() doesn’t do
> .compressTipLabel automatically
>
> n <- read_nexus_phylo("tmp.nex")
> n2 <- .compressTipLabel(n)
> multi2di(n2) #this causes an error.
>
> Unfortunately I need the .compressTipLabel functionality really.
>
> Yan
>
>
> On 13 Jan 2017, at 17:06, François Michonneau <
> francois.michonn...@gmail.com> wrote:
>
> > Hi Yan,
> >
> >  I'm not sure about what's going on here, but it works with the rncl
> > package (http://cran.r-project.org/web/packages/rncl/index.html)
> >
> >  install.packages("rncl")
> >  library(rncl)
> >  n <- read_nexus_phylo("tmp.nex")
>
> ___
> R-sig-phylo mailing list - R-sig-phylo@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
> Searchable archive at http://www.mail-archive.com/r-
> sig-ph...@r-project.org/
>



-- 
Klaus Schliep
Postdoctoral Fellow
Revell Lab, University of Massachusetts Boston
http://www.phangorn.org/

[[alternative HTML version deleted]]

___
R-sig-phylo mailing list - R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/

Re: [R-sig-phylo] multi2di fails on multiPhylo objects

2017-01-13 Thread Yan Wong
Thanks. I think that’s because read_nexus_phylo() doesn’t do .compressTipLabel 
automatically

n <- read_nexus_phylo("tmp.nex")
n2 <- .compressTipLabel(n)
multi2di(n2) #this causes an error.

Unfortunately I need the .compressTipLabel functionality really.

Yan


On 13 Jan 2017, at 17:06, François Michonneau  
wrote:

> Hi Yan,
> 
>  I'm not sure about what's going on here, but it works with the rncl
> package (http://cran.r-project.org/web/packages/rncl/index.html)
> 
>  install.packages("rncl")
>  library(rncl)
>  n <- read_nexus_phylo("tmp.nex")

___
R-sig-phylo mailing list - R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/


[R-sig-phylo] multi2di fails on multiPhylo objects

2017-01-13 Thread Yan Wong
If I have a nexus file with multiple trees, and the same tips in each tree, but 
some trees with polytomies, like this

#NEXUS
BEGIN TREES;
TRANSLATE
1 1,
2 2,
3 3,
4 4;
TREE A = (((1,2)5,3)6,4);
TREE B = ((1,2,3)6,4);
END;

Then when I try to resolve both trees using multi2di, I get

> n <- read.nexus("tmp.nex")
> multi2di(n)
Error in .reorder_ape(x, order, index.only, length(x$tip.label), io) : 
  tree apparently badly conformed

What am I doing wrong?
___
R-sig-phylo mailing list - R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/