Enviromic_pipeline.md

Envirotyping Pipeline with EnvRtype

last update: December 21th 2020

# Software ```{r, eval=FALSE} library(devtools) install_github('allogamous/EnvRtype') library(EnvRtype) wzxhzdk:0 # Raw-Data Collection
### 1. Daily weather and elevation > * Creating vectors or a data.frame with latitude, longitude, environment identification and collection time intervals (beginning and end) facilitates the sampling of multiple environments. ```{r, eval=FALSE} env.i = c("1_AN","1_PI","2_AN","2_PI") # environment ID lat = c(-22.875,-22.705,-22.875,-22.705) # latitude coordinates lon = c(-47.997,-47.637,-47.997,-47.637) # longitude coordinates plant.date = c("2016-01-26","2016-01-21","2017-01-12","2017-01-10") # year-month-day harv.date = c('2016-08-01',"2016-07-14","2017-07-25","2017-07-15") wzxhzdk:1 > * Lets consider tropical maize, with cardinals Tbase1 = 8,Tbase2 = 45,Topt1 = 30,Topt2 = 37 ```{r, eval=FALSE} # Processing Raw-weather data df.clim = processWTH(env.data = df.clim,Tbase1 = 8,Tbase2 = 45,Topt1 = 30,Topt2 = 37) head(df.clim) # novel processed df.clim set wzxhzdk:2 > * Finally, you can combine the weather and soil data into a single data.frame ```{r, eval=FALSE} require(reshape2) (soil_data = dcast(soil_data,env~Feature,value.var = 'Soil_Grid')) df.clim = merge(df.clim,soil_data,by='env') wzxhzdk:3
# Environmental Covariables (ECs) > * the function W_matrix allow the creation of panels of environmental covariables and a matrix of ECs for predictive breeding (**W**): ```{r, eval=FALSE} (var.i = names(df.clim)[c(2,10:16,21:31)]) EC = W_matrix(env.data = df.clim,env.id = 'env',var.id = var.i,statistic = 'mean') plot_panel(EC,title = 'Panel of Environmental Covariables') wzxhzdk:4


allogamous/EnvRtype documentation built on Nov. 1, 2024, 3:48 a.m.