Question: Function to convert genomic ranges to browser-friendly coordinates ?
0
gravatar for Charles Plessy
3.1 years ago by
Japan
Charles Plessy110 wrote:

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.

 

ADD COMMENTlink modified 3.1 years ago by Michael Lawrence11k • written 3.1 years ago by Charles Plessy110
Answer: Function to convert genomic ranges to browser-friendly coordinates ?
2
gravatar for Michael Lawrence
3.1 years ago by
United States
Michael Lawrence11k wrote:

It's just as.character(gr2).
 

ADD COMMENTlink written 3.1 years ago by Michael Lawrence11k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 270 users visited in the last hour