[R] RSNPper SNPinfo and making it handle a vector
Vincent Carey 525-2265
stvjc at channing.harvard.edu
Mon Feb 5 02:23:55 CET 2007
> If I run an analysis which generates statistical tests on many SNPs I would
> naturally want to get more details on the most significant SNPs. Directly
> from within R one can get the information by loading RSNPer (from
> Bioconductor) and simply issuing a command SNPinfo(2073285). Unfortunately,
> the command cannot handle a vector and therefore only wants to do one at a
> time.
> I tried the lapply and sapply functions but was stymied temporarily
> lapply(best.snp,SNPinfo) #where best.snp is a vector of SNPs
> Error in FREQ[[1]] : subscript out of bounds [I do not know what that means]
> Nevertheless, I found that one of the SNPs was causing this and could bypass
> it by using the try function.
>
> lapply(best.snp,function(x) try(SNPinfo(x))) which let R continue
> One can then extract numbers or values out of the resultant output but this
> method lacks finesse and is not easy.
looks pretty easy to me. there is the nuisance of digging through
the output but i have no use cases or -- to my knowledge, until you
wrote -- any active users other than myself. so little motivation
to push further.
additionally, snpper is not particularly well maintained (builds seem
pretty old) and i think it is going to be replaced. so i don't plan
to put much more effort into it until i learn more about snpper.chip.org
durability.
>
> Do you know of another method that would read the data and then write the
> resultant data to a dataframe?
i think you'll be able to do this with your lapply -- and contribute
the code?
>
> Another very useful feature for which I would like to use the same treatment
> is to use the SNPinfo as a way to get the gene information
> lapply(best.snp,function(x) try(geneDetails(SNPinfo(x))))
as above
More information about the R-help
mailing list