\name{getGRanges} \alias{getGRanges} %- Also NEED an '\alias' for EACH other topic documented here. \title{ acquire a GRanges instance with eQTL scores for all SNP for a given gene } \description{ acquire a GRanges instance with eQTL scores for all SNP for a given gene } \usage{ getGRanges(mgr, ffind, geneind, seqnames, namedlocs) } %- maybe also 'usage' for other objects documented here. \arguments{ \item{mgr}{ instance of \code{\link{eqtlTestsManager-class}} } \item{ffind}{ index into the list of \code{ff} files that are being managed, typically a sequential index into the list of chromosomes analyzed } \item{geneind}{ identifier or index of gene of interest } \item{seqnames}{ chromosome name } \item{namedlocs}{ a named vector of integer locations, as generated by \code{getNamedLocs} for example } } %\details{ %%% ~~ If necessary, more details than the description above ~~ %} %\value{ %%% ~Describe the value returned %%% If it is a LIST, use %%% \item{comp1 }{Description of 'comp1'} %%% \item{comp2 }{Description of 'comp2'} %%% ... %} %\references{ %%% ~put references to the literature/web site here ~ %} %\author{ %%% ~~who you are~~ %} %\note{ %%% ~~further notes~~ %} %% ~Make other sections like Warning with \section{Warning }{....} ~ %\seealso{ %%% ~~objects to See Also as \code{\link{help}}, ~~~ %} \examples{ if (require("SNPlocs.Hsapiens.dbSNP.20100427")) { if (!exists("hmceuB36.2021")) data(hmceuB36.2021) library(illuminaHumanv1.db) cptag = get("CPNE1", revmap(illuminaHumanv1SYMBOL)) indc = which(featureNames(hmceuB36.2021) == cptag[1]) hm = hmceuB36.2021[c(indc,1:19),] # reduce problem td = tempdir() curd = getwd() setwd(td) time.lapply = unix.time(e1 <- eqtlTests( hm, ~male, targdir="ggr" )) ggg = getGRanges(e1, 1, cptag, "ch20", getNamedLocs(slpack="SNPlocs.Hsapiens.dbSNP.20100427", chr="ch20")) ggg # now combine with cis ranges for a set of genes example(cisRanges) cc = cisRanges(m1[1:10], "chr20", "illuminaHumanv1.db") seqnames(cc) = "ch20" FF = findOverlaps(ggg, cc) GG = split(FF@matchMatrix[,1], FF@matchMatrix[,2]) names(GG) = m1[1:10] sapply(GG,length) myl = lapply(GG, function(x) ggg[x, ]) names(myl) sapply(myl, function(x) max(elementMetadata(x)$score)) } } % Add one or more standard keywords, see file 'KEYWORDS' in the % R documentation directory. \keyword{ models }