Network plot
Network plot of testing and training individuals from an object of the class 'SSI'
plotNet(fm, B, Z = NULL, K, indexK = NULL, subsetG = NULL, tst = NULL, U = NULL, d = NULL, group = NULL, group.shape = NULL, set.color = NULL, set.size = NULL, df = NULL, title, axis.labels = TRUE, curve = FALSE, bg.color = "gray20", unified = TRUE, ntst = 36, line.color = "gray90", line.tick = 0.3, legend.pos="right", point.color = "gray20", sets = c("Testing","Supporting","Non-active"))
fm |
An object of the 'SSI' class |
B |
(numeric matrix) (Optional) Regression coefficients for individuals corresponding to |
Z |
(numeric matrix) Design matrix for random effects. When |
K |
(numeric matrix) Kinship relationships. This can be a (character) name of a binary file where the matrix is stored |
indexK |
(integer vector) Which columns and rows will be read when |
subsetG |
(integer vector) Which columns (and rows) from |
tst |
(integer vector) Which individuals are in testing set and to plot. It must be contained in |
U |
(numeric matrix) Eigenvectors from spectral value decomposition of G = U D U' |
d |
(numeric vector) Eigenvalues from spectral value decomposition of G = U D U' |
group |
(data.frame) Column grouping for the individuals. The rows must match with the rows in |
df |
(numeric) Average number of training individuals contributing to the prediction (active) of testing individuals. Default |
title |
(character/expression) Title of the plot |
bg.color |
(character) Plot background color |
line.color |
(character) Color of lines connecting 'active' training individuals with each individual in testing set |
line.tick |
(numeric) Tick of lines connecting 'active' training individuals with each individual in testing set |
set.color |
(character vector) Color point of each level of 'testing', 'active', and 'non-active' elements, respectively |
set.size |
(numeric vector) Size of 'testing', 'active', and 'non-active' elements, respectively |
group.shape |
(integer vector) Shape of each level of the grouping column provided as |
curve |
|
axis.labels |
|
unified |
|
point.color |
(character) Color of the points in the plot |
ntst |
(integer) Maximum number of individuals in 'testing' that are plotted separated as indicated by |
legend.pos |
(character) Either "right", topright","bottomleft","bottomright","topleft", or "none" indicating where the legend is positioned in the plot |
sets |
(character vector) Names of the sets: testing group, predictors with non-zero coefficient, and predictors with zero coefficient in the SSI, respectively |
Returns the top-2 PC's plot connecting testing (predicted) individuals with training (predictors) individuals
Marco Lopez-Cruz (maraloc@gmail.com) and Gustavo de los Campos
require(SFSI) data(wheatHTP) X = scale(X[1:200,])/sqrt(ncol(X)) # Subset and scale markers G = tcrossprod(X) # Genomic relationship matrix y = as.vector(scale(Y[1:200,"YLD"])) # Subset ans scale response variable fm = SSI(y,K=G,tst=1:20,trn=21:length(y)) # Basic setting plotNet(fm,K=G,bg.color="white",line.color="gray25") plotNet(fm,K=G,unified=FALSE) # Passing a matrix of coefficients B = as.matrix(coef(fm,df=15)) plotNet(fm,B=B,K=G,curve=TRUE,set.size=c(3.5,1.5,1)) # Using Spectral Value Decomposition and grouping EVD = eigen(G) gp = data.frame(group=kmeans(EVD$vectors[,1:3],centers=5)$cluster) plotNet(fm,curve=TRUE,group=gp,U=EVD$vectors,d=EVD$values)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.