Re: [R-sig-phylo] Randomly Resolved Polytomies

2017-06-21 Thread Liam J. Revell

Hi Laura.

I think multi2di also performs random resolutions, so if you wanted to 
generate, say, 100 random resolutions could you not do:


trees<-replicate(100,multi2di(tree),simplify=FALSE)
class(trees)<-"multiPhylo"

All the best, Liam

Liam J. Revell, Associate Professor of Biology
University of Massachusetts Boston
web: http://faculty.umb.edu/liam.revell/
email: liam.rev...@umb.edu
blog: http://blog.phytools.org

On 6/21/2017 12:18 PM, Laura Jackson wrote:

Hi Liam,

I was trying to get this to work on my tree, but it seems that it
doesn't work for larger phylogenies (~1000 tips)? I get the following
error message,..."Error in allTrees(n, TRUE, dd) :
That would generate 7905853580625 trees, and take up more than
7905853581 MB of memory! "

I have attached my phylogeny here. I am trying to get even 10 different
randomly resolved trees. Is this possible with my phylogeny?

Thanks.
-Laura


On Wed, Jun 21, 2017 at 11:08 AM, Laura Jackson
> wrote:

Liam,

Thanks so much for your reply and for the blog post, I was able to
get it working.

-Laura

On Wed, Jun 21, 2017 at 10:35 AM, Liam J. Revell
> wrote:

Dear Laura.

I also just posted a possible solution to my blog here:

http://blog.phytools.org/2017/06/generating-set-of-random-resolutions-of.html

.

All the best, Liam

Liam J. Revell, Associate Professor of Biology
University of Massachusetts Boston
web: http://faculty.umb.edu/liam.revell/

email: liam.rev...@umb.edu 
blog: http://blog.phytools.org

On 6/21/2017 11:02 AM, Liam J. Revell wrote:

[This sender failed our fraud detection checks and may not
be who they
appear to be. Learn about spoofing at
http://aka.ms/LearnAboutSpoofing
]


Hi Laura.

The phytools functions resolveNode and resolveAllNodes could
be used.
They resolve either a single node in all possible ways; or
all nodes in
all possible ways, returning a "multiPhylo" object. Note
that in the
latter case the number of trees can be quite large. From the
phytools
doc: "For resolveNode applied to a multifurcation with n
descendants,
the number of resolved trees will be equal to the number of
possible
rooted trees of n taxa. (For instance, three for a
trifurcation, 15 for
a quadrifurcation, and so on.) For resolveAllNodes the
number of fully
resolved trees will be equal to the product of numbers for
resolveNode
applied to each multifurcation separately. (For instance, 45
for a tree
containing one trifurcation and one quadrifurcation.)" To
get a random
set of resolved trees, rather than all possible trees
(because this
number can be high), you could start with one multifurcating
node in the
tree, resolve it in all ways using resolveNode, pick one of
those
resolutions, then move to the next node & so on. I will try
to post a
formal solution & then share it to the list.

All the best, Liam

Liam J. Revell, Associate Professor of Biology
University of Massachusetts Boston
web: http://faculty.umb.edu/liam.revell/

email: liam.rev...@umb.edu 
blog: http://blog.phytools.org

On 6/21/2017 10:38 AM, Laura Jackson wrote:

Hi all,

I am using the ape package to randomly resolve
polytomies using
'multi2di'
and wondering if there is a way to use this function to
get a single
output
tree file that contains multiple different randomly
resolved trees using
some number of resamplings?

Thanks,
-Laura


___
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] Course on Landscape Genomics/Genetics (RodneyDyer) UK 6-10November

2017-06-21 Thread Oliver Hooker

"Landscape genetic data analysis using R”

Delivered by Prof Rodney Dyer

http://www.prstatistics.com/course/landscape-genetic-data-analysis-using-r-lndg02/

This course will run from 6th - 10th November 2017 at Margam Discovery 
Centre, Wales.


The term ‘landscape genetics’ has been applied studies that 
integrate ecological context and intervening landscape into population 
genetic analyses of contemporary processes such as gene flow and 
migration.  This course will cover the basics of both quantitative 
landscape ecology and population genetics, focusing on how we develop 
and evaluate spatial/genetic analyses using the R platform


Course content is as follows
Day 1
•   Spatial & Ecological Data
•   Installation & configuring R & RStudio
•   Acquiring spatial data, projections, and visualization
•   Vector and raster data

Day 2
•   Genetic markers and basic analyses
•   Genetic markers and sampling
•   Genetic distance, diversity, and structure
•   Ordination techniques based upon genetic markers

Day 3
•   Integrating spatial and genetic data
•   Barrier detection & population division
•   Resistance Modeling
•   Mantel and distance regressions
•   Remote sensing - LiDAR and Hyperspectral data

Day 4
•   Integrating spatial and genetic data
•   Spatial autocorrelation
•   Network Approaches
•   PCMN & Redundancy

Day 5
•   Adaptive Genetic Variance
•   Outliers & gradients
•   Quantitative genetics, why we should care.
•   Chromosome walking

Please email any inquiries to oliverhoo...@prstatistics.com or visit our 
website www.prstatistics.com


Please feel free to distribute this material anywhere you feel is 
suitable



Upcoming PR statistics courses

1.  MULTIVARIATE ANALYSIS OF SPATIAL ECOLOGICAL DATA #MASE
19th – 23rd June, Canada, Prof. Subhash Lele, Dr. Peter Solymos
http://www.prstatistics.com/course/multivariate-analysis-of-spatial-ecological-data-using-r-mase01/

2.  TIME SERIES MODELS FOR ECOLOGISTS USING R (JUNE 2017 #TSME
26th – 30th June, Canada, Dr. Andrew Parnell
http://www.prstatistics.com/course/time-series-models-foe-ecologists-tsme01/

3.	META-ANALYSIS IN ECOLOGY, EVOLUTION AND ENVIRONMENTAL SCIENCES 
#METR01
24th – 28th July, Scotland, Prof. Julia Koricheva, Prof. Elena 
Kulinskaya

http://www.prstatistics.com/course/meta-analysis-in-ecology-evolution-and-environmental-sciences-metr01/

4.  SPATIAL ANALYSIS OF ECOLOGICAL DATA USING R #SPAE
7th – 12th August 2017, Scotland, Prof. Jason Matthiopoulos, Dr. James 
Grecian

http://www.prstatistics.com/course/spatial-analysis-ecological-data-using-r-spae05/

5.  ECOLOGICAL NICHE MODELLING USING R #ENMR
16th – 20th October 2017, Scotland, Dr. Neftali Sillero
http://www.prstatistics.com/course/ecological-niche-modelling-using-r-enmr01/

6.  GENETIC DATA ANALYSIS AND EXPLORATION USING R #GDAR
23rd – 27th October, Wales, Dr. Thibaut Jombart, Zhian Kavar
http://www.prstatistics.com/course/genetic-data-analysis-exploration-using-r-gdar03/

7.	STRUCTURAL EQUATION MODELLING FOR ECOLOGISTS AND EVOLUTIONARY 
BIOLOGISTS USING R #SEMR

23rd – 27th October, Wales, Prof Jarrett Byrnes, Dr. Jon Lefcheck
http://www.prstatistics.com/course/structural-equation-modelling-for-ecologists-and-evolutionary-biologists-semr01/

8.  LANDSCAPE (POPULATION) GENETIC DATA ANALYSIS USING R #LNDG
6th – 10th November, Wales, Prof. Rodney Dyer
http://www.prstatistics.com/course/landscape-genetic-data-analysis-using-r-lndg02/

9.  APPLIED BAYESIAN MODELLING FOR ECOLOGISTS AND EPIDEMIOLOGISTS #ABME
20th - 25th November 2017, Scotland, Prof. Jason Matthiopoulos, Dr. Matt 
Denwood

http://www.prstatistics.com/course/applied-bayesian-modelling-ecologists-epidemiologists-abme03/

10. ADVANCING IN STATISTICAL MODELLING USING R #ADVR
11th – 15th December 2017, Wales, Dr. Luc Bussiere, Dr. Tom Houslay, 
Dr. Ane Timenes Laugen,

http://www.prstatistics.com/course/advancing-statistical-modelling-using-r-advr07/

11. INTRODUCTION TO BAYESIAN HIERARCHICAL MODELLING #IBHM
29th Jan – 2nd Feb 2018, Scotland, Dr. Andrew Parnell
http://www.prstatistics.com/course/introduction-to-bayesian-hierarchical-modelling-using-r-ibhm02/

12. ANIMAL MOVEMENT ECOLOGY (February 2018) #ANME
19th – 23rd February 2018, Wales, Dr Luca Borger, Dr. John Fieberg

13. GEOMETRIC MORPHOMETRICS USING R #GMMR
5th – 9th June 2017, Scotland, Prof. Dean Adams, Prof. Michael 
Collyer, Dr. Antigoni Kaliontzopoulou

http://www.prstatistics.com/course/geometric-morphometrics-using-r-gmmr01/

14.	FUNCTIONAL ECOLOGY FROM ORGANISM TO ECOSYSTEM: THEORY AND 
COMPUTATION #FEER
5th – 9th March 2018, Scotland, Dr. Francesco de Bello, Dr. Lars 
Götzenberger, Dr. Carlos Carmona

http://www.prstatistics.com/course/functional-ecology-from-organism-to-ecosystem-theory-and-computation-feer01/

15.	ADVANCES IN MULTIVARIATE ANALYSIS OF SPATIAL ECOLOGICAL DATA USING R 
#MVSP
Prof. Pierre Legendre, Dr. 

Re: [R-sig-phylo] Randomly Resolved Polytomies

2017-06-21 Thread Laura Jackson
Hi Liam,

I was trying to get this to work on my tree, but it seems that it doesn't
work for larger phylogenies (~1000 tips)? I get the following error
message,..."Error in allTrees(n, TRUE, dd) :
That would generate 7905853580625 trees, and take up more than 7905853581
MB of memory! "

I have attached my phylogeny here. I am trying to get even 10 different
randomly resolved trees. Is this possible with my phylogeny?

Thanks.
-Laura


On Wed, Jun 21, 2017 at 11:08 AM, Laura Jackson 
wrote:

> Liam,
>
> Thanks so much for your reply and for the blog post, I was able to get it
> working.
>
> -Laura
>
> On Wed, Jun 21, 2017 at 10:35 AM, Liam J. Revell 
> wrote:
>
>> Dear Laura.
>>
>> I also just posted a possible solution to my blog here:
>> http://blog.phytools.org/2017/06/generating-set-of-random-re
>> solutions-of.html.
>>
>> All the best, Liam
>>
>> Liam J. Revell, Associate Professor of Biology
>> University of Massachusetts Boston
>> web: http://faculty.umb.edu/liam.revell/
>> email: liam.rev...@umb.edu
>> blog: http://blog.phytools.org
>>
>> On 6/21/2017 11:02 AM, Liam J. Revell wrote:
>>
>>> [This sender failed our fraud detection checks and may not be who they
>>> appear to be. Learn about spoofing at http://aka.ms/LearnAboutSpoofing]
>>>
>>>
>>> Hi Laura.
>>>
>>> The phytools functions resolveNode and resolveAllNodes could be used.
>>> They resolve either a single node in all possible ways; or all nodes in
>>> all possible ways, returning a "multiPhylo" object. Note that in the
>>> latter case the number of trees can be quite large. From the phytools
>>> doc: "For resolveNode applied to a multifurcation with n descendants,
>>> the number of resolved trees will be equal to the number of possible
>>> rooted trees of n taxa. (For instance, three for a trifurcation, 15 for
>>> a quadrifurcation, and so on.) For resolveAllNodes the number of fully
>>> resolved trees will be equal to the product of numbers for resolveNode
>>> applied to each multifurcation separately. (For instance, 45 for a tree
>>> containing one trifurcation and one quadrifurcation.)" To get a random
>>> set of resolved trees, rather than all possible trees (because this
>>> number can be high), you could start with one multifurcating node in the
>>> tree, resolve it in all ways using resolveNode, pick one of those
>>> resolutions, then move to the next node & so on. I will try to post a
>>> formal solution & then share it to the list.
>>>
>>> All the best, Liam
>>>
>>> Liam J. Revell, Associate Professor of Biology
>>> University of Massachusetts Boston
>>> web: http://faculty.umb.edu/liam.revell/
>>> email: liam.rev...@umb.edu
>>> blog: http://blog.phytools.org
>>>
>>> On 6/21/2017 10:38 AM, Laura Jackson wrote:
>>>
 Hi all,

 I am using the ape package to randomly resolve polytomies using
 'multi2di'
 and wondering if there is a way to use this function to get a single
 output
 tree file that contains multiple different randomly resolved trees using
 some number of resamplings?

 Thanks,
 -Laura


>>> ___
>>> 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/
>>>
>>
>
>
> --
> *Laura M. Jackson*
> PhD Candidate
> Department of Biology
> 185 Churchill Haines
> University of South Dakota
> 414 E. Clark St.
> Vermillion SD 57069-1746
> Email: laura.jack...@usd.edu
>



-- 
*Laura M. Jackson*
PhD Candidate
Department of Biology
185 Churchill Haines
University of South Dakota
414 E. Clark St.
Vermillion SD 57069-1746
Email: laura.jack...@usd.edu


Eel_phylogeny.phy
Description: Binary data
___
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] Randomly Resolved Polytomies

2017-06-21 Thread Laura Jackson
Liam,

Thanks so much for your reply and for the blog post, I was able to get it
working.

-Laura

On Wed, Jun 21, 2017 at 10:35 AM, Liam J. Revell 
wrote:

> Dear Laura.
>
> I also just posted a possible solution to my blog here:
> http://blog.phytools.org/2017/06/generating-set-of-random-re
> solutions-of.html.
>
> All the best, Liam
>
> Liam J. Revell, Associate Professor of Biology
> University of Massachusetts Boston
> web: http://faculty.umb.edu/liam.revell/
> email: liam.rev...@umb.edu
> blog: http://blog.phytools.org
>
> On 6/21/2017 11:02 AM, Liam J. Revell wrote:
>
>> [This sender failed our fraud detection checks and may not be who they
>> appear to be. Learn about spoofing at http://aka.ms/LearnAboutSpoofing]
>>
>>
>> Hi Laura.
>>
>> The phytools functions resolveNode and resolveAllNodes could be used.
>> They resolve either a single node in all possible ways; or all nodes in
>> all possible ways, returning a "multiPhylo" object. Note that in the
>> latter case the number of trees can be quite large. From the phytools
>> doc: "For resolveNode applied to a multifurcation with n descendants,
>> the number of resolved trees will be equal to the number of possible
>> rooted trees of n taxa. (For instance, three for a trifurcation, 15 for
>> a quadrifurcation, and so on.) For resolveAllNodes the number of fully
>> resolved trees will be equal to the product of numbers for resolveNode
>> applied to each multifurcation separately. (For instance, 45 for a tree
>> containing one trifurcation and one quadrifurcation.)" To get a random
>> set of resolved trees, rather than all possible trees (because this
>> number can be high), you could start with one multifurcating node in the
>> tree, resolve it in all ways using resolveNode, pick one of those
>> resolutions, then move to the next node & so on. I will try to post a
>> formal solution & then share it to the list.
>>
>> All the best, Liam
>>
>> Liam J. Revell, Associate Professor of Biology
>> University of Massachusetts Boston
>> web: http://faculty.umb.edu/liam.revell/
>> email: liam.rev...@umb.edu
>> blog: http://blog.phytools.org
>>
>> On 6/21/2017 10:38 AM, Laura Jackson wrote:
>>
>>> Hi all,
>>>
>>> I am using the ape package to randomly resolve polytomies using
>>> 'multi2di'
>>> and wondering if there is a way to use this function to get a single
>>> output
>>> tree file that contains multiple different randomly resolved trees using
>>> some number of resamplings?
>>>
>>> Thanks,
>>> -Laura
>>>
>>>
>> ___
>> 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/
>>
>


-- 
*Laura M. Jackson*
PhD Candidate
Department of Biology
185 Churchill Haines
University of South Dakota
414 E. Clark St.
Vermillion SD 57069-1746
Email: laura.jack...@usd.edu

[[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] Randomly Resolved Polytomies

2017-06-21 Thread Liam J. Revell

Dear Laura.

I also just posted a possible solution to my blog here: 
http://blog.phytools.org/2017/06/generating-set-of-random-resolutions-of.html.


All the best, Liam

Liam J. Revell, Associate Professor of Biology
University of Massachusetts Boston
web: http://faculty.umb.edu/liam.revell/
email: liam.rev...@umb.edu
blog: http://blog.phytools.org

On 6/21/2017 11:02 AM, Liam J. Revell wrote:

[This sender failed our fraud detection checks and may not be who they
appear to be. Learn about spoofing at http://aka.ms/LearnAboutSpoofing]

Hi Laura.

The phytools functions resolveNode and resolveAllNodes could be used.
They resolve either a single node in all possible ways; or all nodes in
all possible ways, returning a "multiPhylo" object. Note that in the
latter case the number of trees can be quite large. From the phytools
doc: "For resolveNode applied to a multifurcation with n descendants,
the number of resolved trees will be equal to the number of possible
rooted trees of n taxa. (For instance, three for a trifurcation, 15 for
a quadrifurcation, and so on.) For resolveAllNodes the number of fully
resolved trees will be equal to the product of numbers for resolveNode
applied to each multifurcation separately. (For instance, 45 for a tree
containing one trifurcation and one quadrifurcation.)" To get a random
set of resolved trees, rather than all possible trees (because this
number can be high), you could start with one multifurcating node in the
tree, resolve it in all ways using resolveNode, pick one of those
resolutions, then move to the next node & so on. I will try to post a
formal solution & then share it to the list.

All the best, Liam

Liam J. Revell, Associate Professor of Biology
University of Massachusetts Boston
web: http://faculty.umb.edu/liam.revell/
email: liam.rev...@umb.edu
blog: http://blog.phytools.org

On 6/21/2017 10:38 AM, Laura Jackson wrote:

Hi all,

I am using the ape package to randomly resolve polytomies using
'multi2di'
and wondering if there is a way to use this function to get a single
output
tree file that contains multiple different randomly resolved trees using
some number of resamplings?

Thanks,
-Laura



___
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/


[R-sig-phylo] Randomly Resolved Polytomies

2017-06-21 Thread Laura Jackson
Hi all,

I am using the ape package to randomly resolve polytomies using 'multi2di'
and wondering if there is a way to use this function to get a single output
tree file that contains multiple different randomly resolved trees using
some number of resamplings?

Thanks,
-Laura

-- 
*Laura M. Jackson*
PhD Candidate
Department of Biology
185 Churchill Haines
University of South Dakota
414 E. Clark St.
Vermillion SD 57069-1746
Email: laura.jack...@usd.edu

[[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/