Find all the genes n genes either side on the chromosome
1
0
Entering edit mode
james perkins ▴ 300
@james-perkins-2675
Last seen 9.6 years ago
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. Many thanks, Jim -- James Perkins, PhD student Institute of Structural and Molecular Biology Division of Biosciences University College London Gower Steet London, WC1E 6BT UK email: jperkins at biochem.ucl.ac.uk phone: 0207 679 2198
GO biomaRt GO biomaRt • 750 views
ADD COMMENT
0
Entering edit mode
@steve-lianoglou-2771
Last seen 14 months ago
United States
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
ADD COMMENT
0
Entering edit mode
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
ADD REPLY

Login before adding your answer.

Traffic: 492 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6