R/convert.genes.to.GRanges.R

# Given a set of genes from the get.MGI.features() function, convert them
# to GRanges.
convert.genes.to.GRanges <- 
function(mgi) {
  if(is.null(mgi)) {
    stop("convert.genes.to.GRanges: mgi cannot be null.")
  } # if(is.null(mgi))
  gr = GRanges(seqnames = mgi$seqid, ranges = IRanges(start = mgi$start,
         end = mgi$stop))
  metadata(gr) = list(Name = mgi$Name)
  return(gr)
}

Try the DOQTL package in your browser

Any scripts or data that you put into this service are public.

DOQTL documentation built on May 6, 2019, 3:09 a.m.