[R] list genes w/n a genomic fragment

Martin Morgan mtmorgan at fhcrc.org
Tue Jul 8 07:24:08 CEST 2008


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



More information about the R-help mailing list