Re: [R-sig-phylo] Plotting character data next to tree in R

2017-01-13 Thread Liam J. Revell

Hi Katharine.

You can try to search my blog for examples of the function 
add.simmap.legend. That might do what you want.


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 1/13/2017 10:57 AM, Katharine Walter wrote:

Hi,

I am trying to visualize a few different character traits on a tree using
phytools. My tiplabels are colored by sampling location and I'd like to add
alongside the tree a color bar that represents values of a discrete
character trait (bacterial serotypes) for each tip sample. There is a nice
explanation for how to do this for a continuous trait (
http://blog.phytools.org/2014/03/putting-barplot-next-to-plotted-tree.html)
and I'm wondering a way to visualize a discrete trait instead.

Thank you for your help!

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



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


Re: [R-sig-phylo] Amniote Phylogenetic Tree

2017-01-13 Thread François Michonneau
Hi Sergio,

  You might find what you want within the Open Tree of Life
(http://tree.opentreeoflife.org/) whose content can be accessed from R
with the rotl package
(https://cran.r-project.org/web/packages/rotl/index.html)

  Cheers,
  -- François

On Fri, Jan 13, 2017 at 7:04 AM, Sergio Ferreira Cardoso
 wrote:
> Hello all,
>
> Do you know of any database where one can obtain a good phylogeny of the
> Amniota (in NEXUS or NEWICK file)?
> Thank you.
>
> Best regards,
> Sérgio.
>
> --
> Com os melhores cumprimentos,
> Sérgio Ferreira Cardoso.
>
> 
>
> Best regards,
> Sérgio Ferreira Cardoso
>
>
>
>
> MSc. Paleontology
> Museu da Lourinhã, GEAL.
> LATR/IST/CTN - Campus Tecnológico e Nuclear.
>
> Lisboa, Portugal
>
> [[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/

___
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] Amniote Phylogenetic Tree

2017-01-13 Thread Sergio Ferreira Cardoso
Hello all,

Do you know of any database where one can obtain a good phylogeny of the
Amniota (in NEXUS or NEWICK file)?
Thank you.

Best regards,
Sérgio.

-- 
Com os melhores cumprimentos,
Sérgio Ferreira Cardoso.



Best regards,
Sérgio Ferreira Cardoso




MSc. Paleontology
Museu da Lourinhã, GEAL.
LATR/IST/CTN - Campus Tecnológico e Nuclear.

Lisboa, Portugal

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

[R-sig-phylo] Plotting character data next to tree in R

2017-01-13 Thread Katharine Walter
Hi,

I am trying to visualize a few different character traits on a tree using
phytools. My tiplabels are colored by sampling location and I'd like to add
alongside the tree a color bar that represents values of a discrete
character trait (bacterial serotypes) for each tip sample. There is a nice
explanation for how to do this for a continuous trait (
http://blog.phytools.org/2014/03/putting-barplot-next-to-plotted-tree.html)
and I'm wondering a way to visualize a discrete trait instead.

Thank you for your help!

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


[R-sig-phylo] Introduction to R and statistics for biologists - CHINA - April2017

2017-01-13 Thread Oliver Hooker

"Introduction to R and statistics for biologists"

Delivered by Dr. Luc Bussiere and Dr. Ane Timenes Laugen

http://www.prstatistics.com/course/introduction-to-statistics-and-r-for-biologists-irfb02/

This course will run from 17th – 21st April 2017 at FAFU University, 
Fuzhou, China
A more advanced follow on course is scheduled for the week after 
(Advancing in R) and a discount is available if both courses are booked 
at the same time.


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

The course is aimed at biologists with no experience using the software 
R and no understanding or exposure to statistics.


The course will consist of a series of 10 modules each lasting roughly 
half a day, and designed to build required skills for subsequent modules 
and more advanced courses. At its conclusion, participants will have 
acquired basic skills in coding with R, and will be able to perform and 
interpret simple analyses, and critically evaluate similar analyses from 
the scientific literature and technical reports.


Course content is as follows

Day 1 Course introduction
Module 1: Introduction to coding in the R language
Module 2: Data visualization in the R {graphics} package

Day 2
Module 3: Probability theory and distributions
Module 4: Advanced programming features in R

Day 3
Module 5: Null hypothesis testing and parameter estimation
Module 6: Replicable and systematic workflows: the ADF method

Day 4
Module 7: Introduction to linear models
Module 8: Multiple predictors & collinearity

Day 5
Module 9: Interactions & model simplification using partial F-tests
Module 10: Case study
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


Our other upcoming courses

1.	MODEL BASED MULTIVARIATE ANALYSIS OF ECOLOGICAL DATA USING R (January 
2017) #MBMV

http://www.prstatistics.com/course/model-base-multivariate-analysis-of-abundance-data-using-r-mbmv01/

2.  ADVANCED PYTHON FOR BIOLOGISTS (February 2017) #APYB
http://www.prstatistics.com/course/advanced-python-biologists-apyb01/

3.	STABLE ISOTOPE MIXING MODELS USING SIAR, SIBER AND MIXSIAR USING R 
(February 2017) #SIMM

http://www.prstatistics.com/course/stable-isotope-mixing-models-using-r-simm03/

4.  NETWORK ANAYLSIS FOR ECOLOGISTS USING R (March 2017) #NTWA
http://www.prstatistics.com/course/network-analysis-ecologists-ntwa01/

5.	ADVANCES IN MULTIVARIATE ANALYSIS OF SPATIAL ECOLOGICAL DATA (April 
2017) #MVSP

http://www.prstatistics.com/course/advances-in-spatial-analysis-of-multivariate-ecological-data-theory-and-practice-mvsp02/

6.  INTRODUCTION TO STATISTICS AND R FOR BIOLOGISTS (April 2017) #IRFB
http://www.prstatistics.com/course/introduction-to-statistics-and-r-for-biologists-irfb02/

7.  ADVANCING IN STATISTICAL MODELLING USING R (April 2017) #ADVR
http://www.prstatistics.com/course/advancing-statistical-modelling-using-r-advr05/

8.	MODEL-BASED STATISTICS INFERENCE IN ECOLOGICA AND EVOLUTIONARY 
BIOGEOGRAPHY USING R (May 2017) #EEBR


9.  GEOMETRIC MORPHOMETRICS USING R (June 2017) #GMMR
http://www.prstatistics.com/course/geometric-morphometrics-using-r-gmmr01/

10. MULTIVARIATE ANALYSIS OF SPATIAL ECOLOGICAL DATA (June 2017) #MASE
http://www.prstatistics.com/course/multivariate-analysis-of-spatial-ecological-data-using-r-mase01/

11. TIME SERIES MODELS FOR ECOLOGISTS USING R (JUNE 2017 (#TSME)

12. BIOINFORMATICS FOR GENETICISTS AND BIOLOGISTS (July 2017) #BIGB
http://www.prstatistics.com/course/bioinformatics-for-geneticists-and-biologists-bigb02/

13. SPATIAL ANALYSIS OF ECOLOGICAL DATA USING R (August 2017) #SPAE
http://www.prstatistics.com/course/spatial-analysis-ecological-data-using-r-spae05/

14. ECOLOGICAL NICHE MODELLING (October 2017) #ENMR
http://www.prstatistics.com/course/ecological-niche-modelling-using-r-enmr01/

15. INTRODUCTION TO BIOINFORMATICS USING LINUX (October 2017) #IBUL

16.	STRUCTURAL EQUATION MODELLING FOR ECOLOGISTS AND EVOLUTIONARY 
BIOLOGISTS (July 2017 TBC) #SEMR


17. GENETIC DATA ANALYSIS USING R (October 2017 TBC) #GDAR

18.	LANDSCAPE (POPULATION) GENETIC DATA ANALYSIS USING R (November 2017 
TBC) #LNDG


19.	APPLIED BAYESIAN MODELLING FOR ECOLOGISTS AND EPIDEMIOLOGISTS 
(November 2017) #ABME

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

20. INTRODUCTION TO METHODS FOR REMOTE SENSING (November 2017) #IRMS

21. INTRODUCTION TO PYTHON FOR BIOLOGISTS (November 2017) #IPYB
http://www.prstatistics.com/course/introduction-to-python-for-biologists-ipyb04/

22.	DATA VISUALISATION AND MANIPULATION USING PYTHON (December 2017) 
#DVMP

http://www.prstatistics.com/course/data-visualisation-and-manipulation-using-python-dvmp01/

23. ADVANCING IN STATISTICAL MODELLING USING R (December 2017) #ADVR

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