This function takes raw molecular count data as input and returns a
pheno data frame, which can be passed to
map_qtl using the pheno argument.
preprocess_pheno(count, anno, covar = NULL, num.pc = 10, list = FALSE)A matrix containing molecular counts (non-negative integers). The row and column names correspond to feature IDs and sample IDs, respectively.
A data frame containing sample IDs, subject IDs, and treatment conditions. The columns must be named as "sample", "subject", and "condition".
A data frame containing fixed effect covariates. The first column must contain sample IDs. The rest of the columns must contain covariate values. Each row corresponds to each sample. Each column corresponds to each covariate.
An integer specifying the number of molecular phenotype principal components to control for.
A logical scalar. If TRUE, the PCA result,
i.e., the output from the prcomp function in the stats
package, will be returned as an element of a list.
A data frame containing pre-processed phenotype data or a list containing the following elements:
pheno - A data frame containing pre-processed
phenotype data.
pca - A list object from the prcomp function in
the stats package.