Step 0: Loading the library Install the library code (EASiP.R) in your RStudio console.
Estimating A-biotic Stress in Plants This package attempt to evaluate most of the indices of tolerance and sensitivity to abiotic stress, rank the genotypes and identify the most tolerant and susceptible genotypes based on different graphs. The steps for using this package and its functions are as follows:
1- Reading data
data <- read.csv (file="F:/testR/education/ricedrt.csv", sep = ";", header = TRUE) head(data,3) Gen yp ys 1 TM1 4915 2788 2 TM2 4587 2163 3 TM3 4784 2178 tail(data,3) Gen yp ys 16 Hashemi 4157 1621 17 Tarom 3597 1859 18 Gilaneh 4779 1576
2-calculating the mean of dependent traits under stress and non-stress conditions and estimating stress index This function estimated average of response variable in stress and non-stress conditions and stress index.
avr.si(data,x,y) Yp Ys SI 4482.2222222 1816.8888889 0.5946455
3- Plotting two dimensional graph based on yp ad ys This function plotted a two dimensional graph based on yp ad ys with genotype number or name.
yp.ysplot.genname (data,x,y)
4- Estimation common stress tolerance and susceptibility indices This function estimated the common stress tolerance and susceptibility indices. Details: This function is the main function of presented packages, using the mentioned formula calculated the indices and put the indices in a data frame (df1) to use in the other functions.
indices(data,x,y) yp ys YEI TOL SSI MP GMP STI YI YSI HM RDI DI 1 4915 2788 1.683 2127 0.728 3851.5 3701.759 0.682 1.534 0.567 3557.840 1.399 0.870 2 4587 2163 1.218 2424 0.889 3375.0 3149.870 0.494 1.190 0.472 2939.757 1.163 0.561 ... YR ATI SSPI SNPI 1 0.433 2954.093 23.727 4748.216 2 0.528 2864.664 27.040 3599.285
5- Estimation ranking of genotypes according to stress tolerance and susceptibility indices This function estimated the ranking of genotypes according to stress tolerance and susceptibility indices, as well as sum (SR), average (AR) and standard deviation (Std) of each genotypes. The lower value of AR and SR indicated the more superior the genotype (Pour-Aboughadareh et al., 2019). I used this function from the source codes in R language (R Development Core Team, 2014) and supporting the fuctions on GitHub (https ://github.com/pour-aboug hadar eh/iPAST IC/). df1: a data frame which obtained from indices function
geno_ranks(df1) yp ys YEI TOL SSI MP GMP STI YI YSI HM RDI DI YR ATI SSPI SNPI SR AR Std. 1 2 1 1 17 18 1 1 1 1 1 1 1 1 18 8 17 1 91 5.352941 7.149661 2 9 5 5 13 15 5 5 5 5 4 5 4 3 15 9 13 5 125 7.352941 4.122214 ...
6- Estimation correlation coefficients and plotting the heatmap for correlation matrixes This function estimated the correlation coefficients and presented in a matrix and ggcorrplot. It is need to install and running ggcorrplot packages. This function was also used cor function from stats packages.
corind(df1) yp ys YEI TOL SSI MP GMP STI YI YSI HM RDI DI YR ATI SSPI SNPI yp 1.00 0.44 0.63 0.26 -0.15 0.78 0.61 0.63 0.44 0.15 0.51 0.15 0.31 -0.15 0.95 0.26 0.44 ys 0.44 1.00 0.97 -0.75 -0.95 0.90 0.98 0.97 1.00 0.95 0.99 0.95 0.97 -0.95 0.39 -0.75 1.00 ... 7- Estimation of first three principal components and plotting a scree plot.
This function estimated the first three principal components and plotting a screeplot. This function used percomp function from stats packages and plot function from graphics packages.
pca.stress(df1) Importance of first k=3 (out of 17) components: PC1 PC2 PC3 Standard deviation 3.7011 1.7764 0.36998 Proportion of Variance 0.8058 0.1856 0.00805 Cumulative Proportion 0.8058 0.9914 0.99945
Rotation (n x k) = (17 x 3): PC1 PC2 PC3 yp -0.10931940 0.51306889 0.18885747 ys -0.26991207 0.02328359 0.04202385 ...
8- Plotting a graph based on first two principal components This function plotted a biplot according to fist PCAs. This function used biplot function from stats packages.
ind.biplot(df1)
9- Estimation of Distance Matrix This function estimated the Distance Matrix by dist function from stats packages. Details: The Arguments of this function is all of the dist function, except of df1 that is fixed an obtained from indices function.
ind.dist(df1) 1 2 3 4 5 6 7 8 9 10 2 1681.70 3 1618.95 421.39 4 1646.21 793.88 372.56 5 2162.17 687.41 545.07 667.80 6 2340.31 791.93 1166.25 1519.87 1083.59 7 1148.79 555.05 682.16 944.40 1167.71 1205.72 8 2878.73 1201.89 1352.13 1575.06 916.09 847.66 1751.02 9 2871.67 1262.70 1266.36 1387.98 735.55 1181.02 1808.10 450.76 10 2987.87 1389.66 1379.47 1481.38 841.93 1298.16 1932.97 526.57 129.64 ...
10- Plotting a cluster diagram This function estimated used the Distance Matrix from previous stage and Plotted a cluster diagram by hclust function from stats packages.
Details: The Arguments of this function is all of the hclust function, except of df1 that is fixed an obtained from indices function.
ind.clust(dh, "complete")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.