Open pkerbs opened 8 months ago
Hi, can anyone please help out?
For anyone who is facing the same issue:
The problem seems to be that I only want to plot "chr1" but I provide 'genome' and 'cytoband ' GRanges objects containing all chromosomes. The parameter chromosomes
of the plotKaryotype()
function seems not to work with my custom references that I provide to the function (probably some specific formatting is needed that I'm missing).
Anyways, I figured that when I subset the GRanges objects to only "chr1" it works.
kp <- plotKaryotype(plot.type = 1,
chromosomes = "chr1",
genome = genome[genome@seqnames=="chr1",],
cytobands = cytobands[cytobands@seqnames=="chr1",]
)
Best, Paul
Thanks, Paul for the hint, I just wanted to share that your method didn't fully work for me, but this worked
kp <- plotKaryotype(genome = custom.genome[seqnames(custom.genome)=='chr10'], cytobands = custom.cytobands[seqnames(custom.cytobands)=='chr10'], chromosome='chr10')
Where custom.genome
and custom.cytobands
are GRanges made using toGRanges()
function similar to the karyoploteR tutorial.
Then I call kpAddCytobandLabels
to add the labels, sometimes not all labels are added, one can force all labels using the argument force.all=TRUE
I hope this can help someone
Hi, I am trying to plot Cytoband labels on the ideogram. It works if I use the default hg19 genome, but not when I use my own genome region and cytoband files. This is my code:
This is an excerpt from chm13v2.bed:
This is an excerpt from cytobands_chm13v2.bed:
Unfortunately, I get this error message:
Can you please have a look what I'm doing wrong? Will it be possible to just set the
genome
parameter in theplotKaryotype
function to the new assembly, so I dont have to provide genome range and cytoband file?Thanks in advance, Paul