getGRangesFormat <- function(segments){
nc = ncol(segments)
if(!is.multiseg(segments)){
gr <- GRanges(seqnames=segments$chrom,
ranges=IRanges(start=segments$start.pos,end=segments$end.pos,names=segments$sampleID))
mcols(gr) <- DataFrame(segments[,c(3,6:nc)])
}else{
gr <- GRanges(seqnames=segments$chrom,
ranges=IRanges(start=segments$start.pos,end=segments$end.pos))
mcols(gr) <- DataFrame(segments[,c(2,5:nc)])
}
return(gr)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.