Function to run a single marker regression using marker dosages
singleMarkerRegression(
dosage_matrix,
Phenotype.df,
genotype.ID,
trait.ID,
maplist = NULL,
perm_test = FALSE,
N_perm = 1000,
alpha = 0.05,
ncores = 1,
return_R2 = FALSE,
log = NULL
)
A list containing the following components:
The -log(p) of the model fit per marker are returned as "LOD" scores, although "LOP" would have been a better description. If requested, R2 values are also returned in column "R2adj"
The results of the permutation test if performed, otherwise NULL
The linkage map if provided, otherwise NULL
Names of the linkage groups, if a map was provided, otherwise NULL
An integer matrix with markers in rows and individuals in columns. All markers in this matrix will be tested for association with the trait.
A data.frame containing phenotypic values
The colname of Phenotype.df
that contains the population identifiers (F1 names) (must be a colname of Phenotype.df
)
The colname of Phenotype.df
that contains the response variable to use in the model (must be a colname of Phenotype.df
)
Option to include linkage map in the format returned by MDSMap_from_list
from polymapR
. If maplist is
not specified (by default NULL
) then no ordering of markers from dosage-matrix is performed. Note that all markers in dosage_matrix are tested;
markers with dosages that were not on the maplist will be assigned unordered to linkage group 0 with dummy cM positions 1,2,3 etc.
Logical, by default FALSE
. If TRUE
, a permutation test will be performed to determine a
genome-wide significance threshold.
Integer. The number of permutations to run if perm_test
is TRUE
; by default this is 1000.
Numeric. The P-value to be used in the selection of a threshold if perm_test
is TRUE
;
by default 0.05 (i.e. the 0.95 quantile).
Number of cores to use if parallel processing required. Works both for Windows and UNIX (using doParallel
).
Use parallel::detectCores()
to find out how many cores you have available.
Should the (adjusted) R2 of the model fit also be determined?
Character string specifying the log filename to which standard output should be written. If NULL
log is send to stdout.
data("SNP_dosages.4x","BLUEs.pheno")
Trait_1.smr <- singleMarkerRegression(dosage_matrix = SNP_dosages.4x,
Phenotype.df = BLUEs.pheno,genotype.ID = "Geno",trait.ID = "BLUE")
Run the code above in your browser using DataLab