# NOT RUN {
# various chain files downloadable from http://crossmap.sourceforge.net/ #
options(ucsc="hg18")
gene.labs <- c("CTLA4","IL2RA","HLA-C")
snp.ids <- c("rs3842724","rs9729550","rs1815606","rs114582555","rs1240708","rs6603785")
pp <- Pos(snp.ids); cc <- Chr(snp.ids)
conv.36.37(chr=cc,pos=pp,ids=snp.ids)
pp <- Pos(gene.labs)
gg <- GRanges(ranges=IRanges(start=pp$start,end=pp$end),seqnames=pp$chr)
conv.36.37(gg) # order of output is preserved
rr <- as(gg,"RangedData")
conv.36.37(rr) # note the result is same as GRanges, but in genome order
# }
Run the code above in your browser using DataLab