I asked a similar question last week and got the solution with the help of
Valerie. I was looking for flanking genes and not necessarily the closest.
If you are interested, see my blog at
http://adairama.wordpress.com/2013/02/15/functionally-annotate-snps-and-indels-in-bioconductor/

Regards, Adai


On Tue, Feb 26, 2013 at 1:21 PM, Zhu, Lihua (Julie)
<Julie.Zhu@umassmed.edu>wrote:

> Molly,
>
> You might want to try annotatePeakInBatch in ChIPpeakAnno package with
> parameter output="both".
>
> Best regards,
>
> Julie
>
>
> On 2/25/13 4:35 PM, "Molly Hanlon" <hanlonmt@gmail.com> wrote:
>
> > Hi list,
> >
> > I've been using R for some time, but am new to bioconductor/biomaRt.
> Please
> > pardon that.
> >
> > I have a list of a couple thousand SNPs and I'm looking for the closest
> > gene to each of them.  Looking just within the gene, I only get a result
> > for about a third of them, so I obviously need something a bit more
> robust.
> >  Searching the archives, I've found mention of the findClosestGene in
> ACME,
> > however, I work in rice, so this isn't much help. Ideally, I'd like to
> > enter a position, say "9:12344567" and get an output that it lies 1234 bp
> > upstream from Loc_OsXXXXXX.
> >
> > I've also seen suggestions that include getting a data frame of all the
> > gene positions  and then using findOverlap with my frame, though I'm not
> > sure this would work because I have no strand information for my query
> and
> > they're single base pairs, thus without a range.
> >
> > Feel free to correct my assumptions, but any additional help you can
> > provide would be wonderful.
> >
> > Many thanks,
> > Molly
> >
> > [[alternative HTML version deleted]]
> >
> > _______________________________________________
> > Bioconductor mailing list
> > Bioconductor@r-project.org
> > https://stat.ethz.ch/mailman/listinfo/bioconductor
> > Search the archives:
> > http://news.gmane.org/gmane.science.biology.informatics.conductor
>
> _______________________________________________
> Bioconductor mailing list
> Bioconductor@r-project.org
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives:
> http://news.gmane.org/gmane.science.biology.informatics.conductor
>

	[[alternative HTML version deleted]]

