[R-sig-eco] [R-sig-phylo] ape prop.part error malloc(): memory corruption

Mario José Marques-Azevedo mariojmaaz at gmail.com
Thu Jun 1 19:38:50 CEST 2017


Dear Eliot,

Thank you for your answer! My tree is ok, but to plot is needed to collapse
singles, as you said.

I use ape/phytools to manipulate my tree for date it after with phylocom.
Then, all node is important, including single one. For this, collapse
singletons do not work for me. For instance.

This trees:

((((A_1,A_2,)A,(B1,B2,B3)B)C,((((D1))),(E1,E2)E)D),(F1)F)R;

(((((A_1,A_2,)A,(B1,B2,B3)B)C,(D1,(E1,E2)E)D),(F1)F)G)R;

'collapsed' is:

((((A_1,A_2)A,(B1,B2,B3)B)C,(D1,(E1,E2)E)D),F1)R;

I lost 'F' node, as I said early. D1 is now in 'right' way.

This tree:

((((((A_1,A_2,)A,(B1,B2,B3)B)C)ABC,((D1,(E1,E2)E)D))DE,(F1)F)G)R;

'collapsed' is:

((((A_1,A_2)A,(B1,B2,B3)B)C,(D1,(E1,E2)E)D)DE,F1)G;

I lost 'F', 'R' and 'ABC' node.

I have a big tree and some families has polytomies. Then, I extract each
family (remove tips of this node), resolve plytomies, and I bind families
tree again. After that, I date tree with phylocon. Phylocon use ages file
with node age, then each node in my tree is important and collapse
singletons would be a lost of information.

I created one function to help me with extract node because I have issues
using drop.tips (
https://github.com/MarioJose/r-functions/blob/master/drop.clade.label/example.md
).

As I said, extract.node was working months ago. I don't know if this error
is some updated that I did.

Best regards,

Mario






On 1 June 2017 at 11:43, Mario José Marques-Azevedo <mariojmaaz at gmail.com>
wrote:

> Dear Klaus,
>
> Thank you for your answer and good news that ape/phangorn will load tree
> with singletons! Can I send the tree to your email?
>
> My problem with collapse.singles is, for instance, when I have only one
> genus/specie. I want the node name with genus and a tip name with species.
> When I collapse, genus node name is removed. For instance:
>
> This tree:
>
> ((((A_1,A_2,)A,(B1,B2,B3)B)C,((((D1))),(E1,E2)E)D),(F1)F)R;
>
> when 'collapsed' will be:
>
> ((((A_1,A_2)A,(B1,B2,B3)B)C,(D1,(E1,E2)E)D),F1)R;
>
> ​Note that I lost node name 'F'.
>
> I don't know why, but month ago I ran extract.clade of my tree without
> problem. Maybe some update that I did, but I'm not sure.
>
> Thank you again!
>
> Best regards,
>
> Mario
>
>
> ​....................................................................
> Mario José Marques-Azevedo
> Ph.D. Candidate in Ecology
> Department of Plant Biology, Institute of Biology
> University of Campinas, Campinas, São Paulo, Brazil
> https://github.com/mariojose​
>
>
>
>
> On 1 June 2017 at 11:17, Klaus Schliep <klaus.schliep at gmail.com> wrote:
>
>> Dear Mario,
>> Emmanuel and I are working to allow singletons in ape / phangorn. In the
>> next version will read the tree in with read.tree().
>> Can you send me your larger tree for testing purposes, as it is one which
>> would fail at the moment?
>> Regards,
>> Klaus
>>
>>
>>
>>
>>
>>
>> On Thu, Jun 1, 2017 at 8:51 AM, Klaus Schliep <klaus.schliep at gmail.com>
>> wrote:
>>
>>> Hi Mario,
>>>
>>> the problem with your tree is that it contains singleton (nodes of
>>> degree 2). Try collapse.singles() before using extract.clade().
>>>
>>> Cheers,
>>> Klaus
>>>
>>>
>>>
>>>
>>> On Thu, Jun 1, 2017 at 1:31 AM, Mario José Marques-Azevedo <
>>> mariojmaaz at gmail.com> wrote:
>>>
>>>> Dears,
>>>>
>>>> I'm using extract.clade from ape package and get some issues. I'm using
>>>> phytools package to load tree with single clade like above:
>>>>
>>>> library(phytools)
>>>>
>>>> t1 <- read.newick(text='(((((A_1,A_2,)A,(B1,B2,B3)B)C,(D1,(E1,E2)
>>>> E)D),(F1)F)G)R;')
>>>>
>>>> t2 <- read.newick(text='((((A_1,A_2,)A,(B1,B2,B3)B)C,((((D1))),(
>>>> E1,E2)E)D),(F1)F)R;
>>>>
>>>> When I extract 'F' clade, for instance:
>>>>
>>>> c1 <- extract.clade(t1, 'F')
>>>>
>>>> or
>>>>
>>>> c2 <- extract.clade(t2, 'F')
>>>>
>>>> I have this error:
>>>>
>>>> Error in prop.part(phy) : attempt to set index 8/8 in SET_VECTOR_ELT
>>>>
>>>> I have one tree with mode than 300 tips. When I try extract any clade, I
>>>> have the same error. If I repeat the command I have this one:
>>>>
>>>> *** Error in `/usr/lib/rstudio/bin/rsession': malloc(): memory
>>>> corruption:
>>>> 0x000000000a3aaa40 ***
>>>>
>>>> My configurations was:
>>>>
>>>> platform       x86_64-pc-linux-gnu
>>>> arch           x86_64
>>>> os             linux-gnu
>>>> system         x86_64, linux-gnu
>>>> language       R
>>>> version.string R version 3.3.3 (2017-03-06)
>>>>
>>>> phytools (0.6.0), ape (4.1), maps (3.1.1), Rcpp (0.12.10)
>>>>
>>>> I try update R to 3.4 and recompile all my packages, but I get the same
>>>> error.
>>>>
>>>> My new configurations:
>>>>
>>>> platform       x86_64-pc-linux-gnu
>>>> arch           x86_64
>>>> os             linux-gnu
>>>> system         x86_64, linux-gnu
>>>> language       R
>>>> version.string R version 3.4.0 (2017-04-21)
>>>>
>>>> phytools (0.6.0), ape (4.1), maps (3.1.1), Rcpp (0.12.10)
>>>>
>>>> I don't know why I have this error if I can extract with the same
>>>> commands
>>>> some time ago.
>>>>
>>>> I have the same error if I run in RStudio or in terminal. When I use
>>>> RStudio, it abort after the error.
>>>>
>>>> I try Google, but I don't found nothing that can help me.
>>>>
>>>> Thank you and best regards,
>>>>
>>>> Mario
>>>>
>>>>
>>>> ....................................................................
>>>> Mario José Marques-Azevedo
>>>> Ph.D. Candidate in Ecology
>>>> Department of Plant Biology, Institute of Biology
>>>> University of Campinas, Campinas, São Paulo, Brazil
>>>> https://github.com/mariojose <http://www.github.com/mariojose>
>>>>
>>>>         [[alternative HTML version deleted]]
>>>>
>>>> _______________________________________________
>>>> R-sig-phylo mailing list - R-sig-phylo at r-project.org
>>>> https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
>>>> Searchable archive at http://www.mail-archive.com/r-
>>>> sig-phylo at r-project.org/
>>>
>>>
>>>
>>>
>>> --
>>> Klaus Schliep
>>> Postdoctoral Fellow
>>> Revell Lab, University of Massachusetts Boston
>>> http://www.phangorn.org/
>>>
>>>
>>
>>
>> --
>> Klaus Schliep
>> Postdoctoral Fellow
>> Revell Lab, University of Massachusetts Boston
>> http://www.phangorn.org/
>>
>>
>

	[[alternative HTML version deleted]]



More information about the R-sig-ecology mailing list