QTLscan {polyqtlR} | R Documentation |
General QTL function that allows for co-factors, completely randomised block designs and the possibility to derive LOD thresholds using a permutation test
Description
Function to run QTL analysis using IBD probabilties given (possibly replicated) phenotypes, assuming randomised experimental design
Usage
QTLscan(
IBD_list,
Phenotype.df,
genotype.ID,
trait.ID,
block = NULL,
cofactor_df = NULL,
allelic_interaction = FALSE,
folder = NULL,
filename.short,
prop_Pheno_rep = 0.5,
perm_test = FALSE,
N_perm.max = 1000,
alpha = 0.05,
gamma = 0.05,
ncores = 1,
log = NULL,
verbose = TRUE,
...
)
Arguments
IBD_list |
List of IBD probabilities |
Phenotype.df |
A data.frame containing phenotypic values |
genotype.ID |
The colname of |
trait.ID |
The colname of |
block |
The blocking factor to be used, if any (must be colname of |
cofactor_df |
A 3-column data frame of co-factor(s); column 1 gives the numeric linkage group identifier(s),
column 2 specifies the cM position of the co-factor(s), column 3 specifies whether the QTL was fitted using "a" = additive effects or
"f" = full allelic interactions (note that any other symbol for the full model will also be accepted, as long as it is not "a").
For backward compatibility with package versions <= 0.0.9, it is possible to just supply the first two columns,
in which case an additive-effects model is assumed for each cofactor (so, a third column will be automatically filled with "a").
By default |
allelic_interaction |
The QTL detection model can be for additive main effects only (by default |
folder |
If markers are to be used as co-factors, the path to the folder in which the imported IBD probabilities is contained can be provided here.
By default this is |
filename.short |
If TetraOrigin was used and co-factors are being included, the shortened stem of the filename of the |
prop_Pheno_rep |
The minimum proportion of phenotypes represented across blocks. If less than this, the individual is removed from the analysis. If there is incomplete data, the missing phenotypes are imputed using the mean values across the recorded observations. |
perm_test |
Logical, by default |
N_perm.max |
The maximum number of permutations to run if |
alpha |
The P-value to be used in the selection of a threshold if |
gamma |
The width of the confidence intervals used around the permutation test threshold using the approach of Nettleton & Doerge (2000), by default 0.05. |
ncores |
Number of cores to use if parallel computing is required. Works both for Windows and UNIX (using |
log |
Character string specifying the log filename to which standard output should be written. If |
verbose |
Logical, by default |
... |
Arguments passed to |
Value
A nested list; each list element (per linkage group) contains the following items:
- QTL.res
Single matrix of QTL results with columns chromosome, position, LOD, adj.r.squared and PVE (percentage variance explained).
- Perm.res
If
perm_test
=FALSE
, this will beNULL
. Otherwise, Perm.res contains a list of the results of the permutation test, with list items "quantile","threshold" and "scores". Quantile refers to which quantile of scores was used to determine the threshold. Note that scores are each of the maximal LOD scores across the entire genome scan per permutation, thus returning a genome-wide threshold rather than a chromosome-specific threshold. If the latter is preferred, restricting theIBD_list
to a single chromosome and re-running the permutation test will provide the desired threshold.- Residuals
If a blocking factor or co-factors are used, this is the (named) vector of residuals used as input for the QTL scan. Otherwise, this is the set of (raw) phenotypes used in the QTL scan.
- Map
Original map of genetic marker positions upon which the IBDs were based, most often used for adding rug of marker positions to QTL plots.
- LG_names
Names of the linkage groups
- allelic_interaction
Whether argument
allelic_interaction
wasTRUE
orFALSE
in the QTL scan
Examples
data("IBD_4x","Phenotypes_4x")
qtl_LODs.4x <- QTLscan(IBD_list = IBD_4x,
Phenotype.df = Phenotypes_4x,
genotype.ID = "geno",
trait.ID = "pheno",
block = "year")