Re: [R] list genes w/n a genomic fragment

From: Martin Morgan <mtmorgan_at_fhcrc.org>
Date: Mon, 07 Jul 2008 22:24:08 -0700

Hi runner...

runner <sunnyside500_at_gmail.com> writes:

> Hi, is there any package/function in Bioconductor that can do this:

As Bert says, this should be directed to the Bioconductor mailing list. Let's have any follow-up conversation there. But...

> if given the chromosome positions of a fragment, find out all genes
> within, and with the information about which strand is the sense
> strand.

Organism-centric packages contain information about chromosome locations of ENTREZ gene IDs, so...

> library(org.Mm.eg.db)
> tbl <- toTable(org.Mm.egCHRLOC)
> idx <- with(tbl,

+             Chromosome == 1 &
+             abs(start_location) > 10^7 &
+             abs(start_location) < 2*10^7)

> tbl[idx,]
gene_id start_location Chromosome 1426 14048 -14159038 1 1709 14545 17135477 1 2745 17087 16678536 1 2961 17681 -14743428 1 3106 17978 -13129239 1 4066 19989 -16091378 1

...

the '-' indicates strand.

> And vice versa.

easy to look up the chromosome locations of an ENTREZ id, if that's what you mean...

> mget("20671", org.Mm.egCHRLOC)

$`20671`

       1
-4481008

or

> tbl[tbl$gene_id=="20671",]

     gene_id start_location Chromosome
4445   20671       -4481008          1

Martin

> Thanks a lot.
>
> -----
> Appreciate your time & attention!
> --
> View this message in context: http://www.nabble.com/list-genes-w-n-a-genomic-fragment-tp18331452p18331452.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> R-help_at_r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

-- 
Martin Morgan
Computational Biology / Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N.
PO Box 19024 Seattle, WA 98109

Location: Arnold Building M2 B169
Phone: (206) 667-2793

______________________________________________
R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Received on Tue 08 Jul 2008 - 05:29:46 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 08 Jul 2008 - 05:31:07 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive