[BioC] RE : Find all the genes n genes either side on the chromosome

Simon Noël simon.noel.2 at ulaval.ca
Thu Jul 21 18:46:09 CEST 2011


An esay but not optimised solution to get the N genes around will be to set a "big" range around the gene of interest and use the liste you get to take the N gene.  It's not bad when N is small but it's not the best solution when N is big.

Simon Noël
CdeC
________________________________________
De : bioconductor-bounces at r-project.org [bioconductor-bounces at r-project.org] de la part de Steve Lianoglou [mailinglist.honeypot at gmail.com]
Date d'envoi : 21 juillet 2011 11:40
À : James Perkins
Cc : Bioconductor at r-project.org
Objet : Re: [BioC] Find all the genes n genes either side on the chromosome

Hi,

On Thu, Jul 21, 2011 at 11:23 AM, James Perkins
<jperkins at biochem.ucl.ac.uk> wrote:
> Dear all,
>
> Given a gene of interest, is there an easy way to get the n nearest
> genes either side (i.e. 5' and 3' direction) on the chromosome,
> without leaving R?
>
> I looked in biomart for a way to get the nearest gene either side but
> couldn't see anything obvious. If this exists I suppose that could be
> one way, just repeat the getBM call n times.
>
> Any pointers at how to go about doing this would be very gladly received.

Bird's eye view:

Create yourself a TranscriptDb object and extract your genes of
interest from it into a GRanges object (perhaps by calling
`transcripts`)

`precede` and `follow` will find you neighboring ranges to a query
given a subject, which will give you the closes genes on either side
of your points of interest.

I'll leave getting N such genes as an exercise for the reader :-)

-steve

--
Steve Lianoglou
Graduate Student: Computational Systems Biology
 | Memorial Sloan-Kettering Cancer Center
 | Weill Medical College of Cornell University
Contact Info: http://cbio.mskcc.org/~lianos/contact

_______________________________________________
Bioconductor mailing list
Bioconductor at r-project.org
https://stat.ethz.ch/mailman/listinfo/bioconductor
Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor


More information about the Bioconductor mailing list