Create table of top snp associations
Create a table of the top snp associations
top_snps( scan1_output, snpinfo, lodcolumn = 1, chr = NULL, drop = 1.5, show_all_snps = TRUE )
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. |
Data frame like the input snpinfo
with just the selected
subset of rows, and with an added column with the LOD score.
## Not run: # load example DO data from web 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) # query function for grabbing info about variants in region dbfile <- system.file("extdata", "cc_variants_small.sqlite", package="qtl2") query_variants <- create_variant_query_func(dbfile) # SNP association scan, keep information on all SNPs out_snps <- scan1snps(apr, DOex$pmap, DOex$pheno, query_func=query_variants, chr=2, start=97, end=98, keep_all_snps=TRUE) # table with top SNPs top_snps(out_snps$lod, out_snps$snpinfo) # top SNPs among the distinct subset at which calculations were performed top_snps(out_snps$lod, out_snps$snpinfo, show_all_snps=FALSE) # top SNPs within 0.5 LOD of max top_snps(out_snps$lod, out_snps$snpinfo, drop=0.5) ## End(Not run)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.