----- Forwarded message from Shobnom Ferdous <ferd...@tigermail.auburn.edu> -----

Date: Sun, 24 Feb 2013 12:01:43 -0500
From: Shobnom Ferdous <ferd...@tigermail.auburn.edu>
Reply-To: Shobnom Ferdous <ferd...@tigermail.auburn.edu>
Subject: Geomorph function physignal gives error “Subscript out of bound”
To: "morphmet@morphometrics.org" <morphmet@morphometrics.org>


Hello Morphometricinas,


I am trying to use geomorph for my GM data set and also to compare that with my molecular phylogeny.

When I try physignal(treename, gpa_aligned_landmardata,iter=5, 10 etc) I get error


Subscript out of bound.



Various posting suggest it may be related to matrix dimesion etc (e.g. it is trying to read elements past the matrix size or vice versa). So I used the following to check my tree information and landmark data:



dim(landmark_data), str(landmarkdata), str(treename) etc.



And it is exactly similar to the example data – i.e.


plethspecies$phy and gpagen treated plethspecies coordinate data.



Now, to narrow down the issue I do the following:


1.       Use example tree plethspecies$phy, which has 9 species


2.       In my landmark data keep data for 9 species and change the name of species to make similar to the species names in plethspecies.


3.       This runs.



That lets me conclude, my landmark data is correctly formatted (from a matrix point of view) but it does not like my tree.



Now I compare the working tree (plethspecies$phy) and my tree. Here is the comparison using R command <str>



First, the Tree that came in the package and works:



> str(plethspecies$phy)


List of 4


 $ edge       : int [1:16, 1:2] 10 10 11 12 12 11 13 14 14 13 ...


 $ Nnode      : int 8


 $ tip.label  : chr [1:9] "P_serratus" "P_cinereus" "P_shenandoah" "P_hoffmani" ...


 $ edge.length: num [1:16] 15.17 3.84 3.77 7.56 7.56 ..


 - attr(*, "class")= chr "phylo"


 - attr(*, "order")= chr "cladewise"



Now, my Tree:



> str(MystusTree)


List of 4


 $ edge       : int [1:28, 1:2] 16 17 18 19 20 21 22 23 23 22 ...


 $ Nnode      : int 14


 $ tip.label  : chr [1:15] "Mten" "Mvit" "Mpul" "Mmal" ..


 $ edge.length: num [1:28] 1 1 1 1 1 1 1 7 4 2 ..


 - attr(*, "class")= chr "phylo"


 - attr(*, "order")= chr "cladewise"



But when I try my tree against my landmark data, I get error



> physignal(MystusTree,Mystus.GPA$coord,iter=5)


Error in physignal(MystusTree, Mystus.GPA$coord, iter = 5) :


  subscript out of bounds



When I compare my gpagen treated matrix with the example data I see no issue



> dim(Y.gpa$coord)    # This is from plethspecies data that works


[1] 11  2  9             # landmark, dimension, species



> dim(Mystus.GPA$coord)    # This is my landmark data after treating with gpagen


[1] 23  2 15        # landmark, dimension, species



I also compared using the <str> function:



Example Data in the package:



> str(Y.gpa$coord)


 num [1:11, 1:2, 1:9] 0.2171 0.2593 -0.0165 -0.2561 -0.2799 ...


 - attr(*, "dimnames")=List of 3


  ..$ : NULL


  ..$ : NULL


  ..$ : chr [1:9] "P_cinereus" "P_electromorphus" "P_hoffmani" "P_hubrichti" ...



My Data:



> str(Mystus.GPA$coord)


 num [1:23, 1:2, 1:15] 0.2646 0.1916 0.133 -0.253 0.0257 ...


 - attr(*, "dimnames")=List of 3


  ..$ : NULL


  ..$ : NULL


  ..$ : chr [1:15] "Marm" "Matri" "Mble" "Mboc" ..


>




Any suggestion will be appreciated.


 Sincerely,

Shobnom Ferdous

email at :ferd...@tigermail.auburn.edu

or sfdeeb...@yahoo.com



----- End forwarded message -----



Reply via email to