KaryoploteR for copy number
Hi,
I am trying to plot a genome-wide Copy number variation using KaryoploteR. I am getting an error saying duplicate chromosome names in the genome. But I have CN in several locations of the same chromosome. Does anyone have any idea? Thanks
> head(custom.genome)
GRanges object with 6 ranges and 1 metadata column:
seqnames ranges strand | CN
<Rle> <IRanges> <Rle> | <numeric>
[1] Chr01 38005-43167 * | 1.999678
[2] Chr01 43335-46922 * | 1.415342
[3] Chr01 50386-50877 * | 1.398499
[4] Chr01 76659-79583 * | 2.41541
[5] Chr01 102003-104811 * | 1.357889
[6] Chr01 105542-109696 * | 1.629476
> plotKaryotype(genome = custom.genome)
Error in plotKaryotype(genome = custom.genome) :
There are duplicate chromosome names in the genome. Chromosome names must be unique. Chromosome names are: Chr01, Chr01, Chr01, Chr01
• 2,018 views
•
link
1 answer
I think you switched up your variables, custom.genome needs the actual chromosome lengths and no other measurements, the table you have there needs to be given to kpPlotDensity(), not to plotKarytyope()
Have a look at this code I wrote a while ago which uses custom.genome too: https://github.com/philippbayer/B_oleracea_R_genes_supplementary/blob/master/MakeDensityPlot.R
• 0 views
•
link
Log in to answer this question.
I am not sure if you can specify the genome yourself. Did you follow some tutorial for this?
You may also want to add a tag for 'karyoplotr`; the author of the package is more likely to catch your post then.
EDIT: It would also help a lot if you could provide a sketch/description of the type of plot you're envisioning.
Thank you for the advice. Here is the example of a plot I want to make. I didn't find a way to insert the image here.
https://media.springernature.com/full/springer-static/image/art%3A10.1186%2Fs12864-015-2096-x/MediaObjects/12864_2015_2096_Fig4_HTML.gif