# load example dataset
data(exampleRAD)
# get genotype posterior probabilities
exampleRAD <- IterateHWE(exampleRAD)
# export to GAPIT
exampleGAPIT <- ExportGAPIT(exampleRAD)
# export to rrBLUP
example_rrBLUP_A <- Export_rrBLUP_Amat(exampleRAD)
example_rrBLUP_GWAS <- Export_rrBLUP_GWAS(exampleRAD)
# export to TASSEL
outfile <- tempfile() # temporary file for example
Export_TASSEL_Numeric(exampleRAD, outfile)
# for mapping populations
data(exampleRAD_mapping)
# specify donor and recurrent parents
exampleRAD_mapping <- SetDonorParent(exampleRAD_mapping, "parent1")
exampleRAD_mapping <- SetRecurrentParent(exampleRAD_mapping, "parent2")
# run the pipeline
exampleRAD_mapping <- PipelineMapping2Parents(exampleRAD_mapping)
# convert to polymapR format
examplePMR <- Export_polymapR(exampleRAD_mapping)
examplePMR2 <- Export_polymapR_probs(exampleRAD_mapping)
# export to MAPpoly
outfile2 <- tempfile() # temporary file for example
# generate a dummy phenotype matrix containing random numbers
mypheno <- matrix(rnorm(200), nrow = 100, ncol = 2,
dimnames = list(GetTaxa(exampleRAD_mapping)[-(1:2)],
c("Height", "Yield")))
Export_MAPpoly(exampleRAD_mapping, file = outfile2, pheno = mypheno)
# load data into MAPpoly
# require(mappoly) # can uncomment once mappoly is on CRAN
# mydata <- read_geno_dist(outfile2)
# export to GWASpoly
outfile3 <- tempfile() # temporary file for example
Export_GWASpoly(exampleRAD, outfile3)
# export to Structure
outfile4 <- tempfile() # temporary file for example
Export_Structure(exampleRAD, outfile4)
# export to adegenet
if(requireNamespace("adegenet", quiet = TRUE)){
mygenind <- Export_adegenet_genind(exampleRAD)
}
Run the code above in your browser using DataLab