Questions tagged [ape-phylo]

Ape is an R package for performing phylogenetic analyses and plotting phylogenetic trees.

78 questions
11
votes
1 answer

Calculation of Moran's I with 4000 records

I have 4000 records of volume in trees plantation. I need to calculate the Moran's I to the whole plantation. I use ape library because spdep is said to be slower. My code is this: # Modified from…
jlopez
  • 335
  • 2
  • 13
6
votes
5 answers

How to collapse branches in a phylogenetic tree by the label in their nodes or leaves?

I have built a phylogenetic tree for a protein family that can be split into different groups, classifying each one by its type of receptor or type of response. The nodes in the tree are labeled as the type of receptor. In the phylogenetic tree I…
RDlady
  • 378
  • 2
  • 16
5
votes
2 answers

how to make a PCA plots as I posted here

I know how to use the PCA results to draw the circle, but failed to draw the x.lab and the y.lab based on the plotting results from s.class. How to make a plot as I posted here? I would like to ask more about this. How to make the points bigger…
Ming
  • 181
  • 2
  • 10
4
votes
1 answer

Normalizing a Phylogenetic Tree in R

When working with phylogenetic tree data in R (specifically when working with "phylo" or "phylo4" objects) it would be useful to normalize branch lengths so that certain taxa (the ones that evolve faster) do not contribute a disproportionate amount…
Krisrs1128
  • 311
  • 4
  • 8
4
votes
2 answers

R: ape/phylobase: unable to convert ultrametric, binary tree to hclust object (warning message)

I've imported a ClustalW2 tree in R using the ape function and read.tree function of the ape package. I estimate molecular ages using the chronopl function, resulting in a ultrametric, binary tree. From which I want to create a R build in dendrogram…
Timtico
  • 377
  • 1
  • 4
  • 14
4
votes
1 answer

Node labels on circular phylogenetic tree

I am trying to create circular phylogenetic tree. I have this part of code: fit<- hclust(dist(Data[,-4]), method = "complete", members = NULL) nclus=…
Vis
  • 299
  • 1
  • 6
  • 16
4
votes
2 answers

Combine phylogenetic tree with x,y graph

I'm trying to arrange a phylogenetic tree onto a graph showing physiological data for a set of related organisms. Something like the picture below. This was put together in powerpoint from 2 separate graphs. I guess it gets the job done, but I…
user2055130
  • 396
  • 2
  • 12
3
votes
1 answer

How to plot Pie charts in haploNet Haplotype Networks {pegas}

I'm trying to use haploNet function of {pegas} to plot a haplotype network, but i`m having trouble putting equal haplotypes from different populations in a same piechart. I can build a haplotype net with the following script: x <-…
2
votes
1 answer

How can I change the font family of tip labels in a phylogenetic tree in R ape package when saving to devSVG?

I have several phylogenetic trees imported into R from Newick format. I am using the ape package to plot the trees with plot.phylo command. I would like to be able to change the font family (not only the size, which I can do with cex, or color with…
antass
  • 99
  • 7
2
votes
1 answer

Phylo correlogram in R bootstrapping error?

I am trying to create a phylo correlogram based on my data using phyloCorrelogram from the phylosignal package in order to test for presence of a phylogenetic signal. My data is in the so-called phylo4d format and is called tree. Now, when I run…
Geomicro
  • 303
  • 3
  • 13
2
votes
1 answer

Select all samples with a specified base at a particular position

I'm new to programming in R and trying to do a very specific task. I have a fasta sequence of n samples, which I read in ape: library(ape) matrix <- read.dna(myfasta, format="fasta", as.character=TRUE) This created a matrix, like so: | | V1 |…
granny
  • 23
  • 2
2
votes
1 answer

Is there a way to manually adjust the boundaries of a color gradient on a phylogeny in ape/phytools?

I am trying to visualize the results of a phylogenetic least squares regression using ape and phytools. Specifically, I have been trying to create a regression equation for predictive purposes, and I am looking at how much phylogenetic signal…
user2352714
  • 314
  • 1
  • 15
2
votes
1 answer

How to colour the branches of an unrooted tree using a variable in R

I would like to generated unrooted neighbour joining trees from input haplotype data, and then colour the branches of the trees based on a variable. I am using the packages Ape and ggtree. The haplotypes and co-variables (metadata) are on two…
Will Hamilton
  • 357
  • 2
  • 17
2
votes
1 answer

How can analyse a trait where I have data for multiple individuals at each tip of my phylogenetic tree?

I'm new to phylogenetic analyses, and I'm using the ape library to analyse neuroanatomical traits of 34 primates from 28 different species. I used 10ktrees to obtain a consensus phylogenetic tree (with 28 tips). However, I can't combine the…
roberto
  • 497
  • 4
  • 12
2
votes
2 answers

ggtree::facet_plot - Second panel uses xlim parameter from first one

I have performed statistical tests on lots of genera that are hierarchically structured with a tree, so I have a p-value for each of the genus in the tree. I want to visualize both the tree and the p-value in a panel plot, as it's possible to do…
abichat
  • 2,317
  • 2
  • 21
  • 39
1
2 3 4 5 6