#permit to plot an HicPainteRObj on karyoploteR
kpHiC<-function(kp,hicPobj,r0=0,r1=1,lim_dist=5e6,...){
if (!is.na(lim_dist)){
hicPobj$cMap<- hicPobj$cMap %>% filter(end-start<lim_dist)
}
chr=seqlevels(hicPobj$cMap[1])
kpPoints(karyoplot=kp,
chr=chr,
x=hicPobj$cMap$edge,
y=hicPobj$cMap$Ys,
col=hicPobj$cMap$colors,
r0=r0,
r1=r1,
pch=hicPobj$param$pchP,
cex=hicPobj$param$cexP,
clipping=TRUE)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.