Function to convert genomic ranges to browser-friendly coordinates ?
1
0
Entering edit mode
@charles-plessy-7857
Last seen 15 months ago
Japan

I was just wondering if there is already a Bioconductor function somewhere that takes GRanges and outputs browser-friendly coordinates.  For instance:

iranges2name <- function(IR)
  paste(start(IR), end(IR), sep="-")

granges2name <- function(GR)
  paste(seqnames(GR), iranges2name(GR), sep=":")

granges2name(gr2)

 [1] "chr1:1-5"   "chr1:2-6"   "chr1:3-7"   "chr2:4-8"   "chr2:5-9"  
 [6] "chr2:6-10"  "chr3:7-11"  "chr3:8-12"  "chr3:9-13"  "chr3:10-14"

(Where gr2 was generated with "example(GRanges)").

I thought I was reinventing the wheel, but my favourite search engines did not return anything relevant to me.

 

granges coordinate genome browser • 1.1k views
ADD COMMENT
2
Entering edit mode
@michael-lawrence-3846
Last seen 3.1 years ago
United States

It's just as.character(gr2).
 

ADD COMMENT

Login before adding your answer.

Traffic: 655 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