Description Usage Arguments See Also Examples
Create a table of the top snp associations
1 2 |
scan1_output |
Output of |
snpinfo |
Data frame with SNP information with the following
columns (the last three are generally derived with
|
lodcolumn |
Selected LOD score column to (a numeric index, or a character string for a column name). Only one value allowed. |
chr |
Selected chromosome; only one value allowed. |
drop |
Show all SNPs with LOD score within this amount of the maximum SNP association. |
show_all_snps |
If TRUE, expand to show all SNPs. |
index_snps()
, genoprob_to_snpprob()
, scan1snps()
, plot_snpasso()
in R/qtl2plot
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | ## Not run:
# load example DO data from web
library(qtl2geno)
file <- paste0("https://raw.githubusercontent.com/rqtl/",
"qtl2data/master/DOex/DOex.zip")
DOex <- read_cross2(file)
# subset to chr 2
DOex <- DOex[,"2"]
# calculate genotype probabilities and convert to allele probabilities
pr <- calc_genoprob(DOex, error_prob=0.002)
apr <- genoprob_to_alleleprob(pr)
# download snp info from web
tmpfile <- tempfile()
file <- paste0("https://raw.githubusercontent.com/rqtl/",
"qtl2data/master/DOex/c2_snpinfo.rds")
download.file(file, tmpfile, quiet=TRUE)
snpinfo <- readRDS(tmpfile)
unlink(tmpfile)
# calculate strain distribution patterns
snpinfo$sdp <- calc_sdp(snpinfo[,-(1:4)])
# identify groups of equivalent SNPs
snpinfo <- index_snps(DOex$pmap, snpinfo)
# convert to snp probabilities
snppr <- genoprob_to_snpprob(apr, snpinfo)
# perform SNP association analysis (here, ignoring residual kinship)
out_snps <- scan1(snppr, DOex$pheno)
# table with top SNPs
top_snps(out_snps, snpinfo)
# top SNPs among the distinct subset at which calculations were performed
top_snps(out_snps, snpinfo, show_all_snps=FALSE)
# top SNPs within 0.5 LOD of max
top_snps(out_snps, snpinfo, 0.5)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.