Unconfigured Ad

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • Carlos Borroto
    Member
    • Mar 2011
    • 19

    What is the meaning density in CummeRbund plots?

    Hi,

    I recently started using CummeRbund for downstream analysis of cuffdiff output. Really nice tool BTW. I can't figured out exactly how to read the density plot:


    Any help on this? What is the meaning of density in this context?
    Thanks,
    Carlos
  • lgoff
    Member
    • Feb 2008
    • 82

    #2
    Density plot

    Hi Carlos,
    You can think of the density as a 'smoothed' representation of a histogram. In this particular case, the csDensity plot is being used to examine the distribution of FPKM values across individual samples.

    Check out http://en.wikipedia.org/wiki/Kernel_density_estimation for more specific information on what is being represented.

    Thanks for trying cummeRbund!

    Cheers,
    Loyal

    Comment

    • Carlos Borroto
      Member
      • Mar 2011
      • 19

      #3
      Thanks for the answer, I understand now.

      Looking forward for the cookbook recipes.

      Comment

      • apadr007
        Member
        • Oct 2011
        • 21

        #4
        Since we're on the subject, what is the criteria for something having significance in volcano plots?

        I noticed that in some of my graphs my p-value may be less than 0.05 and not be significant according to whats plotted. Can you please elaborate on this.

        Much appreciated,

        Comment

        • lgoff
          Member
          • Feb 2008
          • 82

          #5
          Originally posted by apadr007 View Post
          Since we're on the subject, what is the criteria for something having significance in volcano plots?

          I noticed that in some of my graphs my p-value may be less than 0.05 and not be significant according to whats plotted. Can you please elaborate on this.

          Much appreciated,
          Hi apadr007,
          The significance calls in cummeRbund were originally done against the 'significant' output field from cuffdiff. This was across the board as we were letting cuffdiff decide on a significance threshold. We have since implemented the MTC in cummeRbund and you can specify your own alpha for calls to 'getSig()' for example. However, to your point, I have neglected to include this in the csVolcano plotting methods. So as of now, it's still plotting on the original 'significant' field from cuffdiff. I will make this change for a future version such that you can either turn off the significance callouts and/or provide an alpha value to csVolcano on which to draw your significance threshold.

          Thanks for pointing this out!

          Cheers,
          Loyal

          Comment

          • billstevens
            Senior Member
            • Mar 2012
            • 120

            #6
            Originally posted by lgoff View Post
            Hi Carlos,
            You can think of the density as a 'smoothed' representation of a histogram. In this particular case, the csDensity plot is being used to examine the distribution of FPKM values across individual samples.

            Check out http://en.wikipedia.org/wiki/Kernel_density_estimation for more specific information on what is being represented.

            Thanks for trying cummeRbund!

            Cheers,
            Loyal
            Hi,
            I also have a quick question on the graph. Since its a log graph, does this graph just not show FPKM values less than 1? One of the reasons I am wondering is because my probability density function (just for from eyeing it) looks like it is less than 1.

            Comment

            • apadr007
              Member
              • Oct 2011
              • 21

              #7
              Thank you, Loyal. Also, how can one generate a table based on the data that csVolcano is plotting? The reason I ask is because after manually inspecting my cuff diff output I am not seeing some of the extremely high points csVolcano is plotting. So is there a way to produce a txt file from csVolcano as well as its graph?

              Comment

              • sdriscoll
                I like code
                • Sep 2009
                • 436

                #8
                Originally posted by billstevens View Post
                Hi,
                I also have a quick question on the graph. Since its a log graph, does this graph just not show FPKM values less than 1? One of the reasons I am wondering is because my probability density function (just for from eyeing it) looks like it is less than 1.
                I think in the log plots where they are plotting FPKM values they add 1 to the data. If you don't the density plot looks totally different.

                try this in R (assuming you imported your data to a variable 'cuff' and your samples are named 'sample1' and 'sample2').

                plot(density(diffData(cuff@genes,"sample1","sample2")$value_1))

                verses

                plot(density(diffData(cuff@genes,"sample1","sample2")$value_1+1))

                R's kernel density algorithm extends the smoothed line past the actual extent of the data its smoothing. So you'll see the density line go below 1 even if 1 is the lowest value.
                /* Shawn Driscoll, Gene Expression Laboratory, Pfaff
                Salk Institute for Biological Studies, La Jolla, CA, USA */

                Comment

                • lgoff
                  Member
                  • Feb 2008
                  • 82

                  #9
                  Originally posted by billstevens View Post
                  Hi,
                  I also have a quick question on the graph. Since its a log graph, does this graph just not show FPKM values less than 1? One of the reasons I am wondering is because my probability density function (just for from eyeing it) looks like it is less than 1.
                  Hi Bill,
                  For the csDensity plot, (and in general), when logMode=T then a pseudocount (accessible as 'pseudocount' argument and default=1) is added prior to log transformation.

                  Loyal

                  Comment

                  • lgoff
                    Member
                    • Feb 2008
                    • 82

                    #10
                    Originally posted by apadr007 View Post
                    Thank you, Loyal. Also, how can one generate a table based on the data that csVolcano is plotting? The reason I ask is because after manually inspecting my cuff diff output I am not seeing some of the extremely high points csVolcano is plotting. So is there a way to produce a txt file from csVolcano as well as its graph?
                    The csVolcano is generated from data that can be retrieved by using the diffData() method around a CuffData, CuffGeneSet, or CuffGene object:

                    e.g.

                    myDiff<-diffData(genes(cuff))

                    Cheers,
                    Loyal

                    Comment

                    • billstevens
                      Senior Member
                      • Mar 2012
                      • 120

                      #11
                      How do you change the plotting parameters (title, x-axis, sample names, etc.) in csDensity? I tried to put it in the call, but that didn't work:

                      densityplot1 <- csDensity(genes(cuffy), xlab="xaxis")

                      When I then ran densityplot1, it didn't change the name of the x-axis.

                      I also tried just adjusting it after it plotted, but I kept getting an error saying plot.new has not been created.

                      Comment

                      • sdriscoll
                        I like code
                        • Sep 2009
                        • 436

                        #12
                        They are using the ggplot2 package. I came across a short tutorial for it somewhere. You can't use they typical R options but you can edit the plots after they are generated. I don't remember the. Commands though. Google that package and look for their tutorial.
                        /* Shawn Driscoll, Gene Expression Laboratory, Pfaff
                        Salk Institute for Biological Studies, La Jolla, CA, USA */

                        Comment

                        • lgoff
                          Member
                          • Feb 2008
                          • 82

                          #13
                          Originally posted by sdriscoll View Post
                          I think in the log plots where they are plotting FPKM values they add 1 to the data. If you don't the density plot looks totally different.
                          Hi All, this is correct. In general when we have to log-transform, we add a pseudocount and we default to using '1'. When we do this however, we always add a 'pseudocount' argument that you can change to whatever value you would prefer to add.

                          Cheers
                          Loyal

                          Comment

                          • ftorri
                            Member
                            • Oct 2010
                            • 11

                            #14
                            Hi,

                            I am trying to pull out from the scatter plot the list of the outliers, but I haven't found a way through. Does anyone of you have any suggestions?

                            Thanks!
                            Fed

                            Comment

                            • apadr007
                              Member
                              • Oct 2011
                              • 21

                              #15
                              ^ This would be helpful ^

                              Comment

                              Latest Articles

                              Collapse

                              • SEQadmin2
                                Nine Things a Sample Prep Scientist Thinks About Before Sequencing
                                by SEQadmin2


                                I’m not a sequencing expert. I’m a purification scientist who uses NGS to evaluate workflows my group develops. With this perspective, we think about the sample first and the NGS workflow second. The sequencer is an exceptionally honest reporter, but it can only report on what you give it, so whether you get clean, interpretable data from an NGS workflow is largely determined before you begin.

                                Here are nine questions we think about, in roughly the order they matter, before...
                                06-18-2026, 07:11 AM
                              • SEQadmin2
                                From Collection to Sequencing: Why Sample Preparation and Preservation Define Sequencing Data
                                by SEQadmin2


                                Data variability is still an issue in sequencing technologies despite the advances in reproducibility and accuracy of these platforms. But the problem does not originate in the sequencing itself, but in the previous steps, before the sample reaches the sequencer.


                                The first step is collection, followed by preservation and sample preparation for analysis. Most scientists overlook those steps, but not being careful might just be skewing the experiment’s results.
                                ...
                                06-02-2026, 10:05 AM

                              ad_right_rmr

                              Collapse

                              News

                              Collapse

                              Topics Statistics Last Post
                              Started by SEQadmin2, 06-26-2026, 11:10 AM
                              0 responses
                              12 views
                              0 reactions
                              Last Post SEQadmin2  
                              Started by SEQadmin2, 06-17-2026, 06:09 AM
                              0 responses
                              46 views
                              0 reactions
                              Last Post SEQadmin2  
                              Started by SEQadmin2, 06-09-2026, 11:58 AM
                              0 responses
                              105 views
                              0 reactions
                              Last Post SEQadmin2  
                              Started by SEQadmin2, 06-05-2026, 10:09 AM
                              0 responses
                              125 views
                              0 reactions
                              Last Post SEQadmin2  
                              Working...