View source: R/create_METData.R
create_METData | R Documentation |
This function combines all types of data sources (genotypic, phenotypic,
information about the environments, environmental data if available...)
in a single data object of class METData
.
new_create_METData(
geno = NULL,
map = NULL,
pheno = NULL,
info_environments = NULL,
raw_weather_data = NULL,
climate_variables = NULL,
soil_variables = NULL,
compute_climatic_ECs = FALSE,
use_dtw = FALSE,
path_to_save = NULL,
as_test_set = FALSE,
get_public_soil_data = FALSE,
...
)
create_METData(
geno = NULL,
pheno = NULL,
info_environments = NULL,
map = NULL,
climate_variables = NULL,
compute_climatic_ECs = FALSE,
soil_variables = NULL,
raw_weather_data = NULL,
path_to_save = NULL,
...
)
validate_create_METData(x, ...)
geno |
|
map |
Map object not mandatory. |
pheno |
From the fourth column on: each column is
|
info_environments |
The two next columns are required only if weather data should be
retrieved from NASA POWER data using the argument
|
raw_weather_data |
Available weather data provided by user must be a subset of the following weather variable names. Colnames must be given as following:
It is not required that weather data for ALL environments are provided by the user. If weather data for some environments are missing, they will be retrieved by the NASA |
climate_variables |
Columns 3 and + should be numeric and contain the climate (weather-based)
covariates.
|
soil_variables |
Columns 3 and + should be numeric and contain the soil-based environmental
covariates. |
compute_climatic_ECs |
|
path_to_save |
Path where daily weather data (if retrieved) and plots based on k-means clustering are saved. |
as_test_set |
If using a prediction set (i.e. no phenotypic values for the new data to predict), should be set to TRUE. Default is FALSE. |
get_public_soil_data |
|
A formatted list
of class METData
which contains the
following elements:
geno: matrix
with genotype values of phenotyped individuals.
map: data.frame
with genetic map.
pheno: data.frame
with phenotypic trait values.
compute_EC_by_geno: logical
indicates if environmental
covariates were required to be retrieved via the package by the user.
env_data: data.frame
with the environmental covariates per
environment
list_climatic_predictors: character
with the names of the climatic predictor variables
list_soil_predictors: character
with the names of the soil-based predictor variables
info_environments: data.frame
contains basic information on
each environment.
ECs_computed: logical
subelement added in the output
to indicate if the function get_ECs()
was run within the pipeline.
climate_data_retrieved: logical
subelement added in the output
to indicate if NASAPOWER data were retrieved within the pipeline.
Cathy C. Westhues cathy.jubin@hotmail.com
data(geno_G2F)
data(pheno_G2F)
data(map_G2F)
data(info_environments_G2F)
data(soil_G2F)
# Create METData and get climate variables from NASAPOWER data & use soil variables
METdata_G2F <- create_METData(geno=geno_G2F,pheno=pheno_G2F,map=map_G2F,climate_variables = NULL,compute_climatic_ECs = TRUE,info_environments = info_environments_G2F,soil_variables=soil_G2F, path_to_save = "~/g2f_data")
data(geno_indica)
data(map_indica)
data(pheno_indica)
data(info_environments_indica)
data(climate_variables_indica)
METdata_indica <- create_METData(geno=geno_indica,pheno=pheno_indica,climate_variables = climate_variables_indica,compute_climatic_ECs = FALSE,info_environments = info_environments_indica,map = map_indica, path_to_save = "~/indica")
data(geno_japonica)
data(map_japonica)
data(pheno_japonica)
data(info_environments_japonica)
data(climate_variables_japonica)
METdata_japonica <- create_METData(geno=geno_japonica,pheno=pheno_japonica,climate_variables = climate_variables_japonica,compute_climatic_ECs = FALSE,info_environments = info_environments_japonica,map = map_japonica, path_to_save = "~/japonica")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.