Question: KaryoploteR for copy number
0
gravatar for rthapa
3 months ago by
rthapa10
rthapa10 wrote:

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
karyoploter genome • 203 views
ADD COMMENTlink modified 3 months ago by Philipp Bayer6.7k • written 3 months ago by rthapa10

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 REPLYlink modified 3 months ago • written 3 months ago by Friederike6.1k

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 REPLYlink modified 3 months ago • written 3 months ago by rthapa10
0
gravatar for Philipp Bayer
3 months ago by
Philipp Bayer6.7k
Australia/Perth/UWA
Philipp Bayer6.7k wrote:

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 COMMENTlink written 3 months ago by Philipp Bayer6.7k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1078 users visited in the last hour