KaryoploteR for copy number
1
0
Entering edit mode
3.8 years ago
rthapa ▴ 90

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
genome KaryoploteR • 1.4k views
ADD COMMENT
0
Entering edit mode

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.

ADD REPLY
0
Entering edit mode

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

The input file looks like,
CHROM   START   END CN
Chr01   3647    4113    1.830792
Chr01   19860   23276   1.900404
Chr01   25267   27282   1.06339
Chr01   225962  226693  2.475208
ADD REPLY
0
Entering edit mode
3.8 years ago

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

ADD COMMENT

Login before adding your answer.

Traffic: 2013 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