Comments (6)
Running your code works perfectly fine for me...
Err... are you running them in an Rmarkdown document? If so, instead of selecting and running each line individually, select the whole chunk (or at least from plotKaryotype
until the the last plotting function) and run them at once.
If you are using a standard R script, did you close the plot after running plotKaryotype and before running kpDataBackground?
from karyoploter.
Thank you for your response. I was able to run it successfully based on your response. Now I am having another issue where I want to plot the kpPlotGenes below the graph. I am using plot.type = 2 and am getting the following error:
Error in ccf(chr = c(chr, chr), x = 0, y = c(0, t.mark.height)) :
If x is not NULL, it have to have the same length as chr
Here is my code for your reference:
par(mar=c(1,1,1,1))
plot.new()
pp <- getDefaultPlotParams(plot.type = 3)
pp$data1max <- 10
pp$data2max <- 10
kp <- plotKaryotype(zoom = toGRanges(data.frame("chr1", 1, 1e6)),
plot.type = 3,
main = "",
plot.params = pp,
ideogram.plotter = NULL)
kpDataBackground(kp, data.panel = 1, col = "#FFFFFF")
kpAxis(kp, r1 = 10, ymin = 0, ymax = 10, numticks = 5, cex = 1, data.panel = 1, side = 1)
kpPlotGenes(kp, data = TxDb.Hsapiens.UCSC.hg19.knownGene, plot.transcripts = T, data.panel = 2, r0 = 1, r1 = 3)
from karyoploter.
I can reproduce the problem.
I'll have to take a deeper look at it to see what's happening.
from karyoploter.
Thank you so much for looking into this. I really appreciate all your help and your awesome package!
from karyoploter.
Also, when I call kpPlotMarkers without calling kpPlotGenes, I get the following error:
Error in karyoplot$getDataPanelBoundingBox(data.panel) :
attempt to apply non-function
I ran a script that worked fine in karyoploteR version 1.4.2 (from Bioconductor), and am getting that error now.
from karyoploter.
Ok, there where a cuople of bugs due to recent changes for Bioconductor release! Thanks for reporting this.
The newest version in github (1.9.2) should work now. If you have any other problem, please open an issue here so we can take a look
In any case, ploease bear in mind that using the github version (from branch "master"), you are using the devel version of the package and that things will regularly break. Release branches are also available in github (latest one is branch "RELEASE_3_8") so you can use this if you want a more stable (less cutting edge) version of the package (bug fixes have also been applied to that branch).
from karyoploter.
Related Issues (20)
- How to get labels to not overlap other chromosomes? HOT 2
- How to get plot name? HOT 2
- kpBars will not change colors! HOT 2
- some blocks are lacking in kpRect function HOT 2
- plots bams that have no "chr" HOT 2
- Blue bands on ideogram HOT 1
- How to use karyoploteR for non-model species? HOT 1
- Change y-axis values
- How would I use kpLines with kpPlotGenes? HOT 1
- kpPlotGenes: Overlapping gene names margin increase HOT 3
- plotting bedgraph data for all chromosome at once HOT 6
- highlighting telomeres (adding custom symbols to chromosome ends) HOT 3
- Error in graphics::par HOT 3
- Borders of chromosomes in plot type 6 are not all the same HOT 1
- installation fail HOT 1
- CNV heatmap clustering and metadata HOT 1
- Overlapping labels and huge gap between them HOT 1
- Individual Colors for Histone Tracks HOT 5
- kpAddCytobandLabels with custom genome and cytoband file fails HOT 3
- kpHeatmap Fails when only one y value that is not 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from karyoploter.