Seqanswers Leaderboard Ad

Collapse

Announcement

Collapse
No announcement yet.
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • cummeRbund / ggplot2

    Thank you Loyal and team for cummeRbund, it's a great way to get a good feel for cuffdiff data and perform some nice analyses.

    i'm having a little bit of a hard time adjusting certain aspects of the plots, which i believe based on the documentation should be possible as they are all ggplot2 objects. i am not an expert in R, so my questions might be naive.

    given a scatter plot (as a matrix) from:

    scatterM <- csScatterMatrix(genes(cuff))
    scatterM

    I would like to adjust what in ggplot2 is alpha, or transparency; i'd like to leave the density plot portion the same (where same conditions are compared).

    i've tried a few ggplot2 things, but no luck. i've used ggplot2 in the past with success, but not here, e.g.

    scatterM + (geom_point(alpha=1/20))
    Error: geom_point requires the following missing aesthetics: x, y

    thanks!

    -sf

  • #2
    Any progress?

    Has anyone figured this out? I'm struggling as well. In ggplot2, it seems like the issue is an inability to change the "default" layer of the plot, on account of the "data" being fed from the method, rather than a standard, named data frame.

    It would be great to get a solution to this.

    Thanks.

    Comment


    • #3
      I am not sure if I understood your question correctly, but have you tried to change the theme of the ggplot session?
      http://sape.inf.usi.ch/quick-reference/ggplot2/themes

      It should, in principle, set all the visual properties (or change) in a particular session, that is for all the plots generated after the theme is set. My guess is that overrides the cummeRbund call but I am not sure.

      Comment


      • #4
        Hi,
        I am getting same kind of an error while trying to execute following command.
        csVolcanoMatrix(genes(cuff_data))

        Error: geom_vline requires the following missing aesthetics: xintercept

        I tried changing ggplot theme, but it didn't work.
        Could anyone please help?

        TPH

        Comment


        • #5
          Hi here I am getting same error.

          geom_vline requires the following missing aesthetics: xintercept

          could anyone help... since I tried all aspects of installing reinstalling the things.

          Thanks,

          Originally posted by TPH View Post
          Hi,
          I am getting same kind of an error while trying to execute following command.
          csVolcanoMatrix(genes(cuff_data))

          Error: geom_vline requires the following missing aesthetics: xintercept

          I tried changing ggplot theme, but it didn't work.
          Could anyone please help?

          TPH

          Comment


          • #6
            I unfortunately can't give you a ready-to-use solution, because I never worked with cummeRbund, but I have quite some experience with the underlying ggplot2 and can shed some light on the error message itself.

            aesthetics in ggplot2 are something completely different than the theme. A theme defines the plot's appearence (font sizes, background color, spacing and such), the aesthetics define which data is represented in what way: What is shown on the x-axis, the y-axis and are there categorical variables represented as different colors, sizes, shapes of the dots or patterns of the lines and such.

            In your case, geom_vline() is a function to draw a vertical line in the plot, however it lacks the information where this line should be drawn (intersect the x-axis). I guess that is supposed to appear at the median FPKM value or such and that this computation fails, so you have to provide this value manually via the pass-through argument mapping.

            Code:
            csVolcanoMatrix(cuffdata,mapping=aes(xintercept=2))
            Also make sure that you provide the correct data type. The function requests objects of the classes CuffData, CuffFeatureSet, or CuffGeneSet. You can check that with the class function

            Code:
            class(cuffdata)
            class(genes(cuffdata))
            I don't know that the genes() function is and from which package, but it might e.g. return a data.frame, which is no longer suitable.

            Hope that helps a bit...
            Last edited by Thias; 08-12-2016, 02:13 AM.

            Comment


            • #7
              Thank You Thias... I hope this should work. I believe that this could be an issue for different version of R.

              Best,
              Amit

              Comment

              Latest Articles

              Collapse

              • seqadmin
                Recent Developments in Metagenomics
                by seqadmin





                Metagenomics has improved the way researchers study microorganisms across diverse environments. Historically, studying microorganisms relied on culturing them in the lab, a method that limits the investigation of many species since most are unculturable1. Metagenomics overcomes these issues by allowing the study of microorganisms regardless of their ability to be cultured or the environments they inhabit. Over time, the field has evolved, especially with the advent...
                09-23-2024, 06:35 AM
              • seqadmin
                Understanding Genetic Influence on Infectious Disease
                by seqadmin




                During the COVID-19 pandemic, scientists observed that while some individuals experienced severe illness when infected with SARS-CoV-2, others were barely affected. These disparities left researchers and clinicians wondering what causes the wide variations in response to viral infections and what role genetics plays.

                Jean-Laurent Casanova, M.D., Ph.D., Professor at Rockefeller University, is a leading expert in this crossover between genetics and infectious...
                09-09-2024, 10:59 AM

              ad_right_rmr

              Collapse

              News

              Collapse

              Topics Statistics Last Post
              Started by seqadmin, 10-02-2024, 04:51 AM
              0 responses
              13 views
              0 likes
              Last Post seqadmin  
              Started by seqadmin, 10-01-2024, 07:10 AM
              0 responses
              22 views
              0 likes
              Last Post seqadmin  
              Started by seqadmin, 09-30-2024, 08:33 AM
              0 responses
              26 views
              0 likes
              Last Post seqadmin  
              Started by seqadmin, 09-26-2024, 12:57 PM
              0 responses
              19 views
              0 likes
              Last Post seqadmin  
              Working...
              X