----- Forwarded message from Dean
Adams <[email protected]> -----
Date: Mon, 25 Feb 2013
10:20:58 -0500
From: Dean Adams <[email protected]>
Reply-To: Dean Adams <[email protected]>
Subject: Re: Geomorph
function physignal gives error “Subscript out of bound”
To:
[email protected]
This is likely a data formatting issue, but I cannot be certain without checking the data. If you could send me the data and the tree I'm happy to do so and work through this with you.
Best,
Dean
-- Dr. Dean C. Adams Professor Department of Ecology, Evolution, and Organismal Biology Department of Statistics Iowa State University Ames, Iowa 50011 www.public.iastate.edu/~dcadams/ phone: 515-294-3834
----- Forwarded message from Shobnom Ferdous <[email protected]> -----
Date: Sun, 24 Feb 2013 12:01:43 -0500
From: Shobnom Ferdous <[email protected]>
Reply-To: Shobnom Ferdous <[email protected]>
Subject: Geomorph function physignal gives error “Subscript out of bound”
To: "[email protected]" <[email protected]>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 :[email protected]
----- End forwarded message -----
----- End forwarded message
-----
