How to adjust/add cytoband information in specific regions of karyoplot?
1
1
Entering edit mode
4.4 years ago

Hi

I am trying to plot copy number information using karyoploteR over the karyotype plot; a snapshot of which looks something like this

k

I just want to have the cytoband in the regions where there is either a pink or a green bar. For example, you can notice that there is no cytoband information at the regions where there is a pink rectangle at chr15 in the image. I know we can forcefully add all cytobands but this is not what I want as it become clumsy.

This is how I am plotting.

Plotting the ideogram

kp <- plotKaryotype(genome = "hg19", main="Copy Number data",plot.type=2, plot.params = pp)

Adding the cytoband information

kpAddCytobandLabels(kp)

Could you please help? Tagging bernatgel

karyoploter cnv bioconductor R • 1.4k views
ADD COMMENT
0
Entering edit mode
4.4 years ago
zx8754 11k

Not tested (will check later when have more time).

kp$cytobands has cytoband ranges, we need to subset by overlap with our pink regions and update, something like:

kp$cytobands <- myRangeMergeByOverlapFun(kp$cytobands, myPinkRanges)

then call:

kpAddCytobandLabels(kp, force.all = TRUE)
ADD COMMENT

Login before adding your answer.

Traffic: 2547 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6