genoClasses2JoinMap | R Documentation |
Convert SNP genotypes of an outbred bi-parental cross from genotypic classes into the JoinMap format. For the moment, missing genotypes in parents result in the SNP being ignored, but we could imagine using genotypes in offsprings to impute such cases.
genoClasses2JoinMap(
x,
reformat.input = TRUE,
na.string = "--",
thresh.counts = NULL,
thresh.na = NULL,
is.F2 = FALSE,
verbose = 1
)
x |
data.frame of bi-allelic SNP genotypes, with SNPs in rows and genotypes in columns; row names should contain SNP identifiers, the first column should contain the SNP genotypes of the first parent (traditionnaly the mother), the second column should contain the SNP genotypes of the second parent (traditionnaly the father), and the remaining columns should contain the SNP genotypes of the offsprings (full siblings); if it is a matrix, it will be silently transformed into a data frame |
reformat.input |
if TRUE, the function |
na.string |
a character to be interpreted as NA values by |
thresh.counts |
threshold (per SNP) on the number of offsprings having a particular genotypic class, below which counts are converted into |
thresh.na |
threshold (per SNP) on the number of offsprings having |
is.F2 |
if TRUE, it is assumed that the two outbred parents were crossed once to make a F1 which was then autofecundated multiple times to make the offsprings; note that the SNP genotypes of the F1 should not be given (and they are often unavailable) |
verbose |
verbosity level (0/1) |
data.frame
Timothee Flutre
reformatGenoClasses
, writeSegregJoinMap
## Not run:
nb.snps <- 6
x <- data.frame(par1=c("AA", "GC", "CG", "AT", NA, "AA"),
par2=c("AT", "GC", "GG", "AT", "AT", "AT"),
off1=c("AA", "GG", "CG", "AA", "AA", "AT"),
off2=c("AT", "GG", "CG", "AT", "AT", "AA"),
off3=c("AT", "GG", "GG", "TT", "TT", NA),
off4=c(NA, NA, NA, NA, NA, NA),
row.names=paste0("snp", 1:nb.snps),
stringsAsFactors=FALSE)
genoClasses2JoinMap(x=x, reformat.input=TRUE, thresh.na=2, verbose=1)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.