# NOT RUN {
## Create a gData object Using the data from the DROPS project.
## See the included vignette for a more extensive description on the steps.
data(dropsMarkers)
data(dropsMap)
data(dropsPheno)
## Add genotypes as row names of dropsMarkers and drop Ind column.
rownames(dropsMarkers) <- dropsMarkers[["Ind"]]
dropsMarkers <- dropsMarkers[colnames(dropsMarkers) != "Ind"]
## Add genotypes as row names of dropsMap.
rownames(dropsMap) <- dropsMap[["SNP.names"]]
## Rename Chomosome and Position columns.
colnames(dropsMap)[match(c("Chromosome", "Position"),
colnames(dropsMap))] <- c("chr", "pos")
## Convert phenotypic data to a list.
dropsPhenoList <- split(x = dropsPheno, f = dropsPheno[["Experiment"]])
## Rename Variety_ID to genotype and select relevant columns.
dropsPhenoList <- lapply(X = dropsPhenoList, FUN = function(trial) {
colnames(trial)[colnames(trial) == "Variety_ID"] <- "genotype"
trial <- trial[c("genotype", "grain.yield", "grain.number", "seed.size",
"anthesis", "silking", "plant.height", "tassel.height",
"ear.height")]
return(trial)
})
## Create gData object.
gDataDrops <- createGData(geno = dropsMarkers, map = dropsMap,
pheno = dropsPhenoList)
## Run single trait GWAS for trait 'grain.yield' for trial Mur13W.
# }
# NOT RUN {
GWASDrops <- runSingleTraitGwas(gData = gDataDrops,
trials = "Mur13W",
traits = "grain.yield")
# }
# NOT RUN {
## Run single trait GWAS for trait 'grain.yield' for trial Mur13W.
## Use chromosome specific kinship matrices calculated using vanRaden method.
# }
# NOT RUN {
GWASDropsMult <- runSingleTraitGwas(gData = gDataDrops,
trials = "Mur13W",
traits = "grain.yield",
kinshipMethod = "vanRaden",
GLSMethod = "multi")
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab