discard.markers {synbreed} | R Documentation |
The function produces subsets from an object of class gpData
with
reduced markers. Marker informartion will be discarded from elements
geno
and map
discard.markers(gpData, which = NULL, whichNot = NULL)
gpData |
object of class |
which |
character vector identifying names of markers which get
discarded in |
whichNot |
character vector identifying names of markers which get kept
in |
Object of class gpData
Valentin Wimmer and Hans-Juergen Auinger
create.gpData
, add.markers
,
add.individuals
, discard.individuals
# example data set.seed(311) pheno <- data.frame(Yield = rnorm(10, 200, 5), Height = rnorm(10, 100, 1)) rownames(pheno) <- letters[1:10] geno <- matrix(sample(c("A", "A/B", "B", NA), size = 120, replace = TRUE, prob = c(0.6, 0.2, 0.1, 0.1) ), nrow = 10) rownames(geno) <- letters[1:10] colnames(geno) <- paste("M", 1:12, sep = "") # one SNP is not mapped (M5) map <- data.frame(chr = rep(1:3, each = 4), pos = rep(1:12)) map <- map[-5, ] rownames(map) <- paste("M", c(1:4, 6:12), sep = "") gp <- create.gpData(pheno = pheno, geno = geno, map = map) summary(gp) # remove unmapped SNP M5 (which has no postion in the map) gp2 <- discard.markers(gp, "M5") summary(gp2) ## Not run: # add one new DH line to maize data library(synbreedData) data(maize) # delete markers maize2 <- discard.individuals(maize, colnames(maize$geno)[1:50]) summary(maize2) ## End(Not run)