Description Usage Arguments Value Examples
This function loads the contour of an object and performs a principal component analysis on it. It returns a list object with principal component 1 and principal component 2 as well as their intersection coordinates.
1 | getPrincipalAxes(contour, plot = F)
|
contour |
two dimensional array where the first column constist of x values and the second column constist of y values. |
plot |
a boolean value specifying whether to plot the ROI including PC1 and PC2. Defauls value is FALSE. |
Returns one matrix for each principal component where the first row represents x,y coordinates for the end of the vector with lowest x value. The second row represents x,y coordinates for the end of the PC2 vector with highest x value. It also returns a matrix with the x,y coordinates for hte PC1 and PC2 intersection, which represents the centroid of the polygon.
1 2 3 | filename<-system.file('data/YET629_02_w1L488nm-L561nm_sequence-10000.zip', package='yeast')
roi <- read.ijzip(filename)
PCAresult<-getPrincipalAxes(roi$`001_005`$coords, plot=T)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.