setGeneric('GRmidpoint', function(Object) standardGeneric('GRmidpoint'))
setMethod('GRmidpoint', 'GRanges', function(Object) {
mp <- round(start(Object) + end(Object)) / 2
start(Object) <- mp
end(Object) <- mp
return(Object)
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.