scan1snps | R Documentation |
Perform a single-QTL scan across the genome or a defined region at SNPs genotyped in the founders, by Haley-Knott regression or a liear mixed model, with possible allowance for covariates.
scan1snps(
genoprobs,
map,
pheno,
kinship = NULL,
addcovar = NULL,
Xcovar = NULL,
intcovar = NULL,
weights = NULL,
reml = TRUE,
model = c("normal", "binary"),
query_func = NULL,
chr = NULL,
start = NULL,
end = NULL,
snpinfo = NULL,
batch_length = 20,
keep_all_snps = FALSE,
cores = 1,
...
)
genoprobs |
Genotype probabilities as calculated by
|
map |
Physical map for the positions in the |
pheno |
A numeric matrix of phenotypes, individuals x phenotypes. |
kinship |
Optional kinship matrix, or a list of kinship matrices (one per chromosome), in order to use the LOCO (leave one chromosome out) method. |
addcovar |
An optional numeric matrix of additive covariates. |
Xcovar |
An optional numeric matrix with additional additive covariates used for null hypothesis when scanning the X chromosome. |
intcovar |
An optional numeric matrix of interactive covariates. |
weights |
An optional numeric vector of positive weights for the
individuals. As with the other inputs, it must have |
reml |
If |
model |
Indicates whether to use a normal model (least
squares) or binary model (logistic regression) for the phenotype.
If |
query_func |
Function for querying SNP information; see
|
chr |
Chromosome or chromosomes to scan |
start |
Position defining the start of an interval to scan.
Should be a single number, and if provided, |
end |
Position defining the end of an interval to scan.
Should be a single number, and if provided, |
snpinfo |
Optional data frame of SNPs to scan; if provided,
|
batch_length |
Interval length (in units of |
keep_all_snps |
SNPs are grouped into equivalence classes based
on position and founder genotypes; if |
cores |
Number of CPU cores to use, for parallel calculations.
(If |
... |
Additional control parameters passed to |
The analysis proceeds as follows:
Call query_func()
to grab all SNPs over a region.
Use index_snps()
to group SNPs into equivalence classes.
Use genoprob_to_snpprob()
to convert genoprobs
to SNP probabilities.
Use scan1()
to do a single-QTL scan at the SNPs.
A list with two components: lod
(matrix of LOD scores)
and snpinfo
(a data frame of SNPs that were scanned,
including columns index
which indicates groups of equivalent
SNPs)
scan1()
, genoprob_to_snpprob()
, index_snps()
, create_variant_query_func()
, plot_snpasso()
## Not run:
# load example data and calculate genotype probabilities
file <- paste0("https://raw.githubusercontent.com/rqtl/",
"qtl2data/main/DOex/DOex.zip")
DOex <- read_cross2(file)
probs <- calc_genoprob(DOex, error_prob=0.002)
snpdb_file <- system.file("extdata", "cc_variants_small.sqlite", package="qtl2")
queryf <- create_variant_query_func(snpdb_file)
out <- scan1snps(probs, DOex$pmap, DOex$pheno, query_func=queryf, chr=2, start=97, end=98)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.