Once all specimens have been aligned together and the semilandmarks slid:
The coordinates should be saved in gpaspecimens_slid_coords
-pull out the original and mirrored coordinates for each specimen
the files are in this order:
[1] "morton1103ply_flipped. nts " "morton1103ply. nts "
[3] "morton1188ply_flipped. nts " "morton1188ply. nts "
[5] "morton1192ply_flipped. nts " "morton1192ply. nts "
[7] "morton1306ply_flipped. nts " "morton1306ply. nts "
[9] "morton1306plyerror_flipped. nts " "morton1306plyerror. nts "
[11] "morton1306plyerror2_flipped. nts " "morton1306plyerror2. nts "
[13] "morton1319ply_flipped. nts " "morton1319ply. nts "
[15] "morton1329ply_flipped. nts " "morton1329ply. nts "
[17] "morton1486ply_flipped. nts " "morton1486ply. nts "
[19] "morton1973ply_flipped. nts " "morton1973ply. nts "
[21] "morton25ply_flipped. nts " "morton25ply. nts "
[23] "morton413ply_flipped. nts " "morton413ply. nts "
[25] "morton422ply_flipped. nts " "morton422ply. nts "
[27] "morton432ply_flipped. nts " "morton432ply. nts "
[29] "morton434ply_flipped. nts " "morton434ply. nts "
[31] "morton451ply_flipped. nts " "morton451ply. nts "
[33] "morton51ply_flipped. nts " "morton51ply. nts "
[35] "morton547ply_flipped. nts " "morton547ply. nts "
[37] "morton631ply_flipped. nts " "morton631ply. nts "
[39] "morton645ply_flipped. nts " "morton645ply. nts "
[41] "morton646ply_flipped. nts " "morton646ply. nts "
[43] "morton762ply_flipped. nts " "morton762ply. nts "
[45] "morton772ply_flipped. nts " "morton772ply. nts "
[47] "morton778ply_flipped. nts " "morton778ply. nts "
[49] "morton787ply_flipped. nts " "morton787ply. nts "
[51] "morton808ply_flipped. nts " "morton808ply. nts "
[53] "morton901ply_flipped. nts " "morton901ply. nts "
[55] "morton902ply_flipped. nts " "morton902ply. nts "
[57] "morton913ply_flipped. nts " "morton913ply. nts "
[59] "morton913plyerror_flipped. nts " "morton913plyerror. nts "
[61] "morton913plyerror2_flipped. nts " "morton913plyerror2. nts "
[63] "morton915ply_flipped. nts " "morton915ply. nts "
morton1103slid <- gpaspecimens_slid_coords[ ,, 1:2]
morton1188slid <- gpaspecimens_slid_coords[ ,, 3:4]
morton1192slid <- gpaspecimens_slid_coords[ ,, 5:6]
morton1306slid <- gpaspecimens_slid_coords[ ,, 7:8]
morton1306errorslid <- gpaspecimens_slid_coords[ ,, 9:10]
morton1306error2slid <- gpaspecimens_slid_coords[ ,, 11:12]
morton1319slid <- gpaspecimens_slid_coords[ ,, 13:14]
morton1329slid <- gpaspecimens_slid_coords[ ,, 15:16]
morton1486slid <- gpaspecimens_slid_coords[ ,, 17:18]
morton1973slid <- gpaspecimens_slid_coords[ ,, 19:20]
morton25slid <- gpaspecimens_slid_coords[ ,, 21:22]
morton413slid <- gpaspecimens_slid_coords[ ,, 23:24]
morton422slid <- gpaspecimens_slid_coords[ ,, 25:26]
morton432slid <- gpaspecimens_slid_coords[ ,, 27:28]
morton434slid <- gpaspecimens_slid_coords[ ,, 29:30]
morton451slid <- gpaspecimens_slid_coords[ ,, 31:32]
morton51slid <- gpaspecimens_slid_coords[ ,, 33:34]
morton547slid <- gpaspecimens_slid_coords[ ,, 35:36]
morton631slid <- gpaspecimens_slid_coords[ ,, 37:38]
morton645slid <- gpaspecimens_slid_coords[ ,, 39:40]
gpagen ( morton1103slid, Proj = TRUE, PrinAxes = TRUE, ShowPlot = TRUE)
morton1188aligned <-gpagen ( morton1188slid, Proj = TRUE, PrinAxes = TRUE, ShowPlot = TRUE)
morton1192aligned <-gpagen ( morton1192slid, Proj = TRUE, PrinAxes = TRUE, ShowPlot = TRUE)
morton1306aligned <-gpagen ( morton1306slid, Proj = TRUE, PrinAxes = TRUE, ShowPlot = TRUE)
morton1306erroraligned <-gpagen ( morton1306errorslid, Proj = TRUE, PrinAxes = TRUE, ShowPlot = TRUE)
morton1306error2aligned <-gpagen ( morton1306error2slid, Proj = TRUE, PrinAxes = TRUE, ShowPlot = TRUE)
morton1319aligned <-gpagen ( morton1319slid, Proj = TRUE, PrinAxes = TRUE, ShowPlot = TRUE)
morton1329aligned <-gpagen ( morton1329slid, Proj = TRUE, PrinAxes = TRUE, ShowPlot = TRUE)
morton1486aligned <-gpagen ( morton1486slid, Proj = TRUE, PrinAxes = TRUE, ShowPlot = TRUE)
morton1973aligned <-gpagen ( morton1973slid, Proj = TRUE, PrinAxes = TRUE, ShowPlot = TRUE)
morton25aligned <-gpagen ( morton25slid, Proj = TRUE, PrinAxes = TRUE, ShowPlot = TRUE)
morton413aligned <-gpagen ( morton413slid, Proj = TRUE, PrinAxes = TRUE, ShowPlot = TRUE)
morton422aligned <-gpagen ( morton422slid, Proj = TRUE, PrinAxes = TRUE, ShowPlot = TRUE)
morton432aligned <-gpagen ( morton432slid, Proj = TRUE, PrinAxes = TRUE, ShowPlot = TRUE)
morton434aligned <-gpagen ( morton434slid, Proj = TRUE, PrinAxes = TRUE, ShowPlot = TRUE)
morton451aligned <-gpagen ( morton451slid, Proj = TRUE, PrinAxes = TRUE, ShowPlot = TRUE)
morton51aligned <-gpagen ( morton51slid, Proj = TRUE, PrinAxes = TRUE, ShowPlot = TRUE)
morton547aligned <-gpagen ( morton547slid, Proj = TRUE, PrinAxes = TRUE, ShowPlot = TRUE)
morton631aligned <-gpagen ( morton631slid, Proj = TRUE, PrinAxes = TRUE, ShowPlot = TRUE)
morton645aligned <-gpagen ( morton645slid, Proj = TRUE, PrinAxes = TRUE, ShowPlot = TRUE)
morton646aligned <-gpagen ( morton646slid, Proj = TRUE, PrinAxes = TRUE, ShowPlot = TRUE)
morton762aligned <-gpagen ( morton762slid, Proj = TRUE, PrinAxes = TRUE, ShowPlot = TRUE)
morton772aligned <-gpagen ( morton772slid, Proj = TRUE, PrinAxes = TRUE, ShowPlot = TRUE)
morton778aligned <-gpagen ( morton778slid, Proj = TRUE, PrinAxes = TRUE, ShowPlot = TRUE)
morton787aligned <-gpagen ( morton787slid, Proj = TRUE, PrinAxes = TRUE, ShowPlot = TRUE)
morton808aligned <-gpagen ( morton808slid, Proj = TRUE, PrinAxes = TRUE, ShowPlot = TRUE)
morton901aligned <-gpagen ( morton901slid, Proj = TRUE, PrinAxes = TRUE, ShowPlot = TRUE)
morton902aligned <-gpagen ( morton902slid, Proj = TRUE, PrinAxes = TRUE, ShowPlot = TRUE)
morton913aligned <-gpagen ( morton913slid, Proj = TRUE, PrinAxes = TRUE, ShowPlot = TRUE)
morton913erroraligned <-gpagen ( morton913errorslid, Proj = TRUE, PrinAxes = TRUE, ShowPlot = TRUE)
morton913error2aligned <-gpagen ( morton913error2slid, Proj = TRUE, PrinAxes = TRUE, ShowPlot = TRUE)
morton915aligned <-gpagen ( morton915slid, Proj = TRUE, PrinAxes = TRUE, ShowPlot = TRUE)
-pull out the coordinates into a separate variable
morton1103alignedproc <- morton1103aligned$coords
morton1188alignedproc <- morton1188aligned$coords
morton1192alignedproc <- morton1192aligned$coords
morton1306alignedproc <- morton1306aligned$coords
morton1306erroralignedproc <- morton1306erroraligned$coords
morton1306error2alignedproc <- morton1306error2aligned$coords
morton1319alignedproc <- morton1319aligned$coords
morton1329alignedproc <- morton1329aligned$coords
morton1486alignedproc <- morton1486aligned$coords
morton1973alignedproc <- morton1973aligned$coords
morton25alignedproc <- morton25aligned$coords
morton413alignedproc <- morton413aligned$coords
morton422alignedproc <- morton422aligned$coords
morton432alignedproc <- morton432aligned$coords
morton434alignedproc <- morton434aligned$coords
morton451alignedproc <- morton451aligned$coords
morton51alignedproc <- morton51aligned$coords
morton547alignedproc <- morton547aligned$coords
morton631alignedproc <- morton631aligned$coords
morton645alignedproc <- morton645aligned$coords
morton646alignedproc <- morton646aligned$coords
morton762alignedproc <- morton762aligned$coords
morton772alignedproc <- morton772aligned$coords
morton778alignedproc <- morton778aligned$coords
morton787alignedproc <- morton787aligned$coords
morton808alignedproc <- morton808aligned$coords
morton901alignedproc <- morton901aligned$coords
morton902alignedproc <- morton902aligned$coords
morton913alignedproc <- morton913aligned$coords
morton913erroralignedproc <- morton913erroraligned$coords
morton913error2alignedproc <- morton913error2aligned$coords
morton915alignedproc <- morton915aligned$coords
-calculate the Procrustes Distance (Overall asymmetry value)
ProcDistAll <- rep( NA, 28)
ProcDistAll [ [1]] <- sqrt( sum( (morton1103alignedproc[ ,, 1] -morton1103alignedproc[ ,, 2]) ^2))
ProcDistAll [ [2]] <- sqrt( sum( (morton1188alignedproc[ ,, 1] -morton1188alignedproc[ ,, 2]) ^2))
ProcDistAll [ [3]] <- sqrt( sum( (morton1192alignedproc[ ,, 1] -morton1192alignedproc[ ,, 2]) ^2))
ProcDistAll [ [4]] <- sqrt( sum( (morton1306alignedproc[ ,, 1] -morton1306alignedproc[ ,, 2]) ^2))
ProcDistAll [ [5]] <- sqrt( sum( (morton1319alignedproc[ ,, 1] -morton1319alignedproc[ ,, 2]) ^2))
ProcDistAll [ [6]] <- sqrt( sum( (morton1329alignedproc[ ,, 1] -morton1329alignedproc[ ,, 2]) ^2))
ProcDistAll [ [7]] <- sqrt( sum( (morton1486alignedproc[ ,, 1] -morton1486alignedproc[ ,, 2]) ^2))
ProcDistAll [ [8]] <- sqrt( sum( (morton1973alignedproc[ ,, 1] -morton1973alignedproc[ ,, 2]) ^2))
ProcDistAll [ [9]] <- sqrt( sum( (morton25alignedproc[ ,, 1] -morton25alignedproc[ ,, 2]) ^2))
ProcDistAll [ [10]] <- sqrt( sum( (morton413alignedproc[ ,, 1] -morton413alignedproc[ ,, 2]) ^2))
ProcDistAll [ [11]] <- sqrt( sum( (morton422alignedproc[ ,, 1] -morton422alignedproc[ ,, 2]) ^2))
ProcDistAll [ [12]] <- sqrt( sum( (morton432alignedproc[ ,, 1] -morton432alignedproc[ ,, 2]) ^2))
ProcDistAll [ [13]] <- sqrt( sum( (morton434alignedproc[ ,, 1] -morton434alignedproc[ ,, 2]) ^2))
ProcDistAll [ [14]] <- sqrt( sum( (morton451alignedproc[ ,, 1] -morton451alignedproc[ ,, 2]) ^2))
ProcDistAll [ [15]] <- sqrt( sum( (morton51alignedproc[ ,, 1] -morton51alignedproc[ ,, 2]) ^2))
ProcDistAll [ [16]] <- sqrt( sum( (morton547alignedproc[ ,, 1] -morton547alignedproc[ ,, 2]) ^2))
ProcDistAll [ [17]] <- sqrt( sum( (morton631alignedproc[ ,, 1] -morton631alignedproc[ ,, 2]) ^2))
ProcDistAll [ [18]] <- sqrt( sum( (morton645alignedproc[ ,, 1] -morton645alignedproc[ ,, 2]) ^2))
ProcDistAll [ [19]] <- sqrt( sum( (morton646alignedproc[ ,, 1] -morton646alignedproc[ ,, 2]) ^2))
ProcDistAll [ [20]] <- sqrt( sum( (morton762alignedproc[ ,, 1] -morton762alignedproc[ ,, 2]) ^2))
ProcDistAll [ [21]] <- sqrt( sum( (morton772alignedproc[ ,, 1] -morton772alignedproc[ ,, 2]) ^2))
ProcDistAll [ [22]] <- sqrt( sum( (morton778alignedproc[ ,, 1] -morton778alignedproc[ ,, 2]) ^2))
ProcDistAll [ [23]] <- sqrt( sum( (morton787alignedproc[ ,, 1] -morton787alignedproc[ ,, 2]) ^2))
ProcDistAll [ [24]] <- sqrt( sum( (morton808alignedproc[ ,, 1] -morton808alignedproc[ ,, 2]) ^2))
ProcDistAll [ [25]] <- sqrt( sum( (morton901alignedproc[ ,, 1] -morton901alignedproc[ ,, 2]) ^2))
ProcDistAll [ [26]] <- sqrt( sum( (morton902alignedproc[ ,, 1] -morton902alignedproc[ ,, 2]) ^2))
ProcDistAll [ [27]] <- sqrt( sum( (morton913alignedproc[ ,, 1] -morton913alignedproc[ ,, 2]) ^2))
ProcDistAll [ [28]] <- sqrt( sum( (morton915alignedproc[ ,, 1] -morton915alignedproc[ ,, 2]) ^2))
ProcDist_males <- ProcDistAll[ c( 2, 4, 5, 7, 8, 10, 12, 13, 18, 20, 21, 24, 25, 28)]
ProcDist_females <- ProcDistAll[ c( 1, 3, 6, 9, 11, 14, 15, 16, 17, 19, 22, 23, 26, 27)]
**ignore the variables that have the word error in them, they were for a test of the landmark placement error that was an incorrect method and not used in the analysis**
The coordinates should be saved in gpaspecimens_slid_coords
-
[1] "morton1103ply_flipped
[3] "morton1188ply_flipped
[5] "morton1192ply_flipped
[7] "morton1306ply_flipped
[9] "morton1306plyerror_flipped
[11] "morton1306plyerror2_flipped
[13] "morton1319ply_flipped
[15] "morton1329ply_flipped
[17] "morton1486ply_flipped
[19] "morton1973ply_flipped
[21] "morton25ply_flipped
[23] "morton413ply_flipped
[25] "morton422ply_flipped
[27] "morton432ply_flipped
[29] "morton434ply_flipped
[31] "morton451ply_flipped
[33] "morton51ply_flipped
[35] "morton547ply_flipped
[37] "morton631ply_flipped
[39] "morton645ply_flipped
[41] "morton646ply_flipped
[43] "morton762ply_flipped
[45] "morton772ply_flipped
[47] "morton778ply_flipped
[49] "morton787ply_flipped
[51] "morton808ply_flipped
[53] "morton901ply_flipped
[55] "morton902ply_flipped
[57] "morton913ply_flipped
[59] "morton913plyerror_flipped
[61] "morton913plyerror2_flipped
[63] "morton915ply_flipped
morton1103slid <- gpaspecimens_slid_coords
morton1188slid <- gpaspecimens_slid_coords
morton1192slid <- gpaspecimens_slid_coords
morton1306slid <- gpaspecimens_slid_coords
morton1306errorslid <- gpaspecimens_slid_coords
morton1306error2slid <- gpaspecimens_slid_coords
morton1319slid <- gpaspecimens_slid_coords
morton1329slid <- gpaspecimens_slid_coords
morton1486slid <- gpaspecimens_slid_coords
morton1973slid <- gpaspecimens_slid_coords
morton25slid <- gpaspecimens_slid_coords
morton413slid <- gpaspecimens_slid_coords
morton422slid <- gpaspecimens_slid_coords
morton432slid <- gpaspecimens_slid_coords
morton434slid <- gpaspecimens_slid_coords
morton451slid <- gpaspecimens_slid_coords
morton51slid <- gpaspecimens_slid_coords
morton547slid <- gpaspecimens_slid_coords
morton631slid <- gpaspecimens_slid_coords
morton645slid <- gpaspecimens_slid_coords
morton646slid <- gpaspecimens_slid_coords[ ,, 41:42]
morton762slid <- gpaspecimens_slid_coords[ ,, 43:44]
morton772slid <- gpaspecimens_slid_coords[ ,, 45:46]
morton778slid <- gpaspecimens_slid_coords[ ,, 47:48]
morton787slid <- gpaspecimens_slid_coords[ ,, 49:50]
morton808slid <- gpaspecimens_slid_coords[ ,, 51:52]
morton901slid <- gpaspecimens_slid_coords[ ,, 53:54]
morton902slid <- gpaspecimens_slid_coords[ ,, 55:56]
morton913slid <- gpaspecimens_slid_coords[ ,, 57:58]
morton913errorslid <- gpaspecimens_slid_coords[ ,, 59:60]
morton913errorslid <- gpaspecimens_slid_coords
morton913error2slid <- gpaspecimens_slid_coords[ ,, 61:62]
morton915slid <- gpaspecimens_slid_coords[ ,, 63:64]
- Procrustes align each pair (do not slide the semi-landmarks, they are fixed now)
morton1103aligned <- morton915slid <- gpaspecimens_slid_coords
- P
morton1188aligned <-
morton1192aligned <-
morton1306aligned <-
morton1306erroraligned <-
morton1306error2aligned <-
morton1319aligned <-
morton1329aligned <-
morton1486aligned <-
morton1973aligned <-
morton25aligned <-
morton413aligned <-
morton422aligned <-
morton432aligned <-
morton434aligned <-
morton451aligned <-
morton51aligned <-
morton547aligned <-
morton631aligned <-
morton645aligned <-
morton646aligned <-
morton762aligned <-
morton772aligned <-
morton778aligned <-
morton787aligned <-
morton808aligned <-
morton901aligned <-
morton902aligned <-
morton913aligned <-
morton913erroraligned <-
morton913error2aligned <-
morton915aligned <-
-
morton1103alignedproc <- morton1103aligned$coords
morton1188alignedproc <- morton1188aligned$coords
morton1192alignedproc <- morton1192aligned$coords
morton1306alignedproc <- morton1306aligned$coords
morton1306erroralignedproc <- morton1306erroraligned$coords
morton1306error2alignedproc <- morton1306error2aligned$coords
morton1319alignedproc <- morton1319aligned$coords
morton1329alignedproc <- morton1329aligned$coords
morton1486alignedproc <- morton1486aligned$coords
morton1973alignedproc <- morton1973aligned$coords
morton25alignedproc <- morton25aligned$coords
morton413alignedproc <- morton413aligned$coords
morton422alignedproc <- morton422aligned$coords
morton432alignedproc <- morton432aligned$coords
morton434alignedproc <- morton434aligned$coords
morton451alignedproc <- morton451aligned$coords
morton51alignedproc <- morton51aligned$coords
morton547alignedproc <- morton547aligned$coords
morton631alignedproc <- morton631aligned$coords
morton645alignedproc <- morton645aligned$coords
morton646alignedproc <- morton646aligned$coords
morton762alignedproc <- morton762aligned$coords
morton772alignedproc <- morton772aligned$coords
morton778alignedproc <- morton778aligned$coords
morton787alignedproc <- morton787aligned$coords
morton808alignedproc <- morton808aligned$coords
morton901alignedproc <- morton901aligned$coords
morton902alignedproc <- morton902aligned$coords
morton913alignedproc <- morton913aligned$coords
morton913erroralignedproc <- morton913erroraligned$coords
morton913error2alignedproc <- morton913error2aligned$coords
morton915alignedproc <- morton915aligned$coords
-
ProcDist_males <- ProcDistAll
ProcDist_females <- ProcDistAll
**ignore the variables that have the word error in them, they were for a test of the landmark placement error that was an incorrect method and not used in the analysis**
No comments:
Post a Comment