[genoPlotR-help] genoPlotR query

Lionel Guy lionel.guy at ebc.uu.se
Thu Jun 3 10:27:00 CEST 2010


Hi Chris,

Glad you like it! Out of curiosity, how did you hear about the package?

The problem comes from the large tree that you have. The tree is  
permutated to match its labels with the labels of the dna_segs, using  
the function enum.phylog from the ade4 package. This function has an  
argument no.over that limits the number of permutations, by default at  
1000, whereas your tree would require 5e+42 (and a very, very long  
time to complete).

I changed the code to bypass the permutation stage if the order of the  
labels of the tree correspond to the one of the dna_segs. It should  
work for you... Try downloading the source (compilation occurs only  
once a day):

http://genoplotr.r-forge.r-project.org/downloads/genoPlotR_0.4.1.tar.gz

If it's not available yet (there is a little lag between the commit  
and the appearance on the web server), try checking out the sources

svn checkout svn://svn.r-forge.r-project.org/svnroot/genoplotr

The source package should be available in genoPlotR/www/downloads/ 
genoPlotR_0.4.1.tar.gz

The package is then installable with

R CMD INSTALL genoPlotR_0.4.1.tar.gz

preceded by sudo if you have a global R installation.

Let me know if it works for you!
I copy that email to the help mailing-list.

Cheers,

Lionel



On 2 Jun 2010, at 21:28 , Christopher Jones wrote:

> Hi Lionel,
>
> First, thanks for the very nice R package - coupled with RMySQL it's  
> a really powerful tool for making all sorts of comparisons for gene  
> neighborhoods, and I think I'm getting the hang of plotting dna  
> segments with phylogenies in the margin.  However, I seem to have  
> run into a snag - I'm currently using an NCBI taxonomy tree that I'm  
> loading and manipulating through the ape package:
>
> TAX.tree<-read.tree('trees/taxonomy_tree2')
> TAX.tree.prune<-drop.tip(TAX.tree,TAX.tree$tip.label[!TAX.tree 
> $tip.label %in% names(dna_segs)])
>
> Since the tip labels are taxon IDs, I think 'as.phylog' adds an 'X'  
> in the front to avoid any confusion with other numeric values in the  
> tree - so I just change my dna_seg list names, easy enough:
>
> names(dna_segs)<-paste('X',names(dna_segs),sep='')
>
> then convert through the as.hclust function (I can't seem to find a  
> more elegant way to do this):
>
> tree<- 
> hclust2phylog 
> (as.hclust(multi2di(ladderize(TAX.tree.prune))),add.tools=FALSE)
>
> After checking to make sure all the labels between the segment list  
> and the leave labels match, I try to plot but get the following error:
>
> plot_gene_map(dna_seg, tree=tree)
>
> Permutation number = 5.575186e+42 ( no.over = 1000 )
> Error in apply(permuts, 1, function(x) identical(as.numeric(x),  
> as.numeric(wanted_permut))) :
>   dim(X) must have a positive length
>
> I'm sorry I can't send files to repeat this as all the data is  
> coming from an SQL server, but the tree is 143 taxa, and I tried  
> several options for the conversion to a phylog object  
> (add.tools=TRUE), and the tree seems to plot fine.  I also tried  
> just plotting the segments map in a separate graphics device frame  
> using layout (and plotting a tree in the adjacent frame), but the  
> segments map always plots new (even when plot_new=FALSE)
>
> Do you have any suggestions to trouble shoot this? It seems to be  
> something to do with how ade4 handles the trees (phylog.permut,  
> maybe?), but I can't really get much further.....
>
> Many thanks for your time,
> Chris
>
> Chris Jones
> Ph. D. Student, Department of Microbiology
> Swedish University of Agricultural Sciences
> chris.jones at mikrob.slu.se
>

============================================
Lionel Guy
Molecular Evolution, EBC, Uppsala University
Norbyv. 18C, 752 36  Uppsala, Sweden

phone: +46 (0)18-471 6129
fax : +46 (0)18-471 6404
email: lionel.guy at ebc.uu.se
============================================






More information about the genoPlotR-help mailing list