getPrincipalAxes: getPrincipalAxes

Description Usage Arguments Value Examples

View source: R/getbuds.R

Description

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.

Usage

1

Arguments

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.

Value

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.

Examples

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)

maekiniemi/yeastTracker documentation built on June 9, 2020, 1:40 p.m.