Git Product home page Git Product logo

Comments (6)

bernatgel avatar bernatgel commented on July 24, 2024 3

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.

andyjslee avatar andyjslee commented on July 24, 2024

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.

bernatgel avatar bernatgel commented on July 24, 2024

I can reproduce the problem.
I'll have to take a deeper look at it to see what's happening.

from karyoploter.

andyjslee avatar andyjslee commented on July 24, 2024

Thank you so much for looking into this. I really appreciate all your help and your awesome package!

from karyoploter.

andyjslee avatar andyjslee commented on July 24, 2024

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.

bernatgel avatar bernatgel commented on July 24, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.