# NOT RUN {
setwd(tempdir())
Band(chr=1,pos=1234567) # using chr,pos vectors
rd <- RangedData(ranges=IRanges(start=87654321,end=87654321),space=1)
gr <- as(rd,"GRanges")
Band(rd) # using RangedData, autodetects this parameter should be 'ranges' not 'genes'
Band(ranges=gr) # using GRanges
Band("SLC6A4") # serotonin gene [5-HTT]
a.few.snps <- c("rs3842724","imm_11_2147527","rs9467354")
Band(a.few.snps) # using SNP ids in the 'genes' parameter (still works!)
Band(snps=a.few.snps) # using SNP ids with the dedicated 'snps' parameter is quicker
Band(chr="X",pos=8000000)
# Band() with longer ranges #
Band(chr=12,start=40000000,end=50000000,build="hg19") # concatenates if range spans multiple bands
Band(chr=12,start=40000000,end=50000000,build="hg18") # one extra band in the older annotation
# }
Run the code above in your browser using DataLab