Seqanswers Leaderboard Ad

Collapse

Announcement

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

  • #16
    Originally posted by zhang51 View Post
    Dear Simon and everyone,

    I have downloaded DESeq2 package with no trouble. But when I tried to run your example R code, I got trouble even with the first line "dds <- DESeqDataSet(se = se, design = ~ condition)". The error message is "error in evaluating the argument 'x' in selecting a method for function 'assays': Error: object 'se' not found".

    I have run "library(DESeq2)" at the very beginning. I wonder what else I should do to make it work?
    Assuming you're following the vignette, you missed a few lines, which would have setup "se".

    Code:
    library("parathyroidSE")
    data("parathyroidGenesSE")
    se <- parathyroidGenesSE
    colnames(se) <- colData(se)$run
    Edit: Just go to the next page of the vignette, I expect what you're looking at is the "Quick Start" section.
    Last edited by dpryan; 08-13-2013, 07:38 AM.

    Comment


    • #17
      To Simon,

      I'm running code in the file http://www.bioconductor.org/packages...doc/DESeq2.pdf

      I encountered the same problem when running meanSdPlot function. It works only when normalized=FALSE. There is an error message when using normalized=TRUE. Please see below:

      In is.na(sizeFactors(object)) :
      is.na() applied to non-(list or vector) of type 'NULL'
      Error in meanSdPlot(log2(counts(dds, normalized = TRUE)[notAllZero, ] + :
      error in evaluating the argument 'x' in selecting a method for function 'meanSdPlot': Error in .local(object, ...) :
      first calculate size factors, add normalizationFactors, or set normalized=FALSE

      What would be the solution to this problem?

      Thanks

      Comment


      • #18
        I figured it out. I did not run DESeq function first before making this plot. Now it works.

        Thanks

        Comment


        • #19
          Hello,

          DESeq was great in that the nbinomTest() function allowed for me to specify which conditions I wanted to run the test on. However, DESeq2 appears to not have this functionality. I have data that was run through HTSeq and so am using the DESeqDataSetFromHTSeqCount() function. I am analyzing data that underwent two different exposure concentrations at different percentages of vehicle (i.e. 1% vehicle control, 10uM chemical in 1% vehicle, 0.1% vehicle control, and 1uM chemical in 0.1% vehicle). There are four total conditions for this experiment and I want to compare the expression between pairs with the same percentage of vehicle (i.e. 1% vehicle control versus 10uM chemical in 1% vehicle). However, when I run DESeq() the resultsNames() I get to choose from are only from four comparisons and not the pairwise comparisons I need. Is this possible in DESeq2 as it was in the original DESeq to specify which conditions I want to test? Or would it just be easier to initially have the comparisons I want to analyze already separated instead of how I am doing it currently? Thoughts?

          Thanks!

          Comment


          • #20
            For making comparisons of multiple conditions (not only against the base level of a condition), we have recently implemented contrasts in the development branch. This allows one to fit a single model, then generate log2 fold change estimates, standard errors and tests of null hypotheses for other comparisons.

            The functionality is described in section 3.2 of the vignette, 'Contrasts' and in the man page for ?results, for DESeq2 version 1.1.x which is paired with Bioc 2.13.



            You can either try using the devel branch of Bioconductor...

            A.1 Which version of R? Package authors should develop against the version of R that will be available to users when the Bioconductor devel branch becomes the Bioconductor release branch. R has a...


            or this version will be released in Oct 15, 2013:

            The Bioconductor project aims to develop and share open source software for precise and repeatable analysis of biological data. We foster an inclusive and collaborative community of developers and data scientists.

            Comment


            • #21
              Glad to see contrasts appear in DESeq2, thanks!

              One minor thing I noticed when running contrasts:
              When you use the Cooks Outlier filtering on the base analysis, the outlier genes (with "NA" pvalues in the regular analysis) are no longer filtered when you do a contrast. I'm not sure if that is intentional or not?

              Comment


              • #22
                You're right. Thanks for pointing this out.

                I will work on a fix, probably moving the cooksCutoff argument to results() function, so it can be modified without rerunning the GLM fitting.

                Comment


                • #23
                  I committed this fix in version 1.1.31 of the devel branch. It made sense to move the outlier detection by Cook's distance as well as all p-value adjustment to the results() function.

                  Comment


                  • #24
                    baseMeanA and baseMeanB

                    Hello,

                    In DESeq, it was possible to view/export the baseMean values for each condition (baseMeanA and baseMeanB) in addition to the overall baseMean. In DESeq2, I have only been able to view/export the overall baseMean. Is it possible to acquire the baseMean values for each condition as well? Thanks!

                    Comment


                    • #25
                      We generalized the code, and as these columns are only appropriate for a 2 condition analysis, they were dropped.

                      You can get these with some custom code though:

                      baseMeanA <- rowMeans(counts(dds,normalized=TRUE)[,colData(dds)$condition == "A"])

                      More general:

                      baseMeanPerLvl <- sapply(levels(colData(dds)$condition), function(lvl) rowMeans(counts(dds,normalized=TRUE)[,colData(dds)$condition == lvl]))

                      Comment


                      • #26
                        Hi,

                        I'm new in DESeq2 and i'm having problems to create my dds.

                        I have a matrix with eXpress results (read counts) with 2 conditions (SP, EB) and 2 replicates/condition.

                        This is what i'm doing:

                        Code:
                        Cele_SPvsEB = read.csv (file.choose(), header=TRUE, row.names=1)
                        CeleDesign <- data.frame(
                          row.names = colnames(Cele_SPvsEB),
                          condition = factor(c("SP", "SP", "EB", "EB")))
                        dds <- DESeqDataSetFromMatrix(countData = Cele_SPvsEB,
                                                      colData = CeleDesign,
                                                      design = ~ condition)
                        dds
                        And i'm getting this error message:

                        Code:
                        Error in get(name, envir = asNamespace(pkg), inherits = FALSE) : 
                          object '.setDummyField' not found
                        Any help?
                        Thanks.

                        Comment


                        • #27
                          Can you show the output of traceback()

                          and also can you show the output of head(Cele_SPvsEB)

                          Comment


                          • #28
                            Sure!

                            Code:
                            > traceback()
                            14: get(name, envir = asNamespace(pkg), inherits = FALSE)
                            13: methods:::.setDummyField
                            12: (function (value) 
                                {
                                    if (missing(value)) 
                                        `.->data`
                                    else {
                                        methods:::.setDummyField(.self, ".->data", "SimpleList", 
                                            "data", FALSE, value)
                                        value
                                    }
                                })(quote(<S4 object of class "SimpleList">))
                            11: assign(field, value, envir = env)
                            10: envRefSetField(.Object, field, classDef, selfEnv, elements[[field]])
                            9: methods::initRefFields(.Object, classDef, selfEnv, list(...))
                            8: initialize(value, ...)
                            7: initialize(value, ...)
                            6: methods::new(def, ...)
                            5: .ShallowSimpleListAssays$new(data = assays)
                            4: .local(assays, ...)
                            3: SummarizedExperiment(assays = SimpleList(counts = countData), 
                                   colData = colData, ...)
                            2: SummarizedExperiment(assays = SimpleList(counts = countData), 
                                   colData = colData, ...)
                            1: DESeqDataSetFromMatrix(countData = Cele_SPvsEB, colData = CeleDesign, 
                                   design = ~condition)
                            Code:
                            > head(Cele_SPvsEB)
                                                C4_APR10_spermatic_cysts CRL_2APR10_spermatic_cysts CRL_1_15JUL11_embryos
                            comp100_c0_seq1                           21                         24                     0
                            comp100004_c0_seq1                        48                          0                   494
                            comp1000074_c0_seq1                       42                          0                    55
                            comp1000109_c0_seq1                       32                         18                     0
                            comp100011_c0_seq1                        40                          3                   298
                            comp100013_c0_seq1                        92                          0                    62
                                                CRL_2_15JUL11_embryos
                            comp100_c0_seq1                         0
                            comp100004_c0_seq1                      0
                            comp1000074_c0_seq1                     0
                            comp1000109_c0_seq1                     0
                            comp100011_c0_seq1                      0
                            comp100013_c0_seq1                      0

                            Comment


                            • #29
                              Googling the setDummyField error I came to this thread



                              Where they suggest there might be a problem with using R 3.0.0 with packages built with R 3.0.1. Could this be the case? Can you paste your sessionInfo()

                              Comment


                              • #30
                                Done! I updated R and now is working perfecly.
                                Thanks Michael!

                                Comment

                                Latest Articles

                                Collapse

                                • seqadmin
                                  Techniques and Challenges in Conservation Genomics
                                  by seqadmin



                                  The field of conservation genomics centers on applying genomics technologies in support of conservation efforts and the preservation of biodiversity. This article features interviews with two researchers who showcase their innovative work and highlight the current state and future of conservation genomics.

                                  Avian Conservation
                                  Matthew DeSaix, a recent doctoral graduate from Kristen Ruegg’s lab at The University of Colorado, shared that most of his research...
                                  03-08-2024, 10:41 AM
                                • seqadmin
                                  The Impact of AI in Genomic Medicine
                                  by seqadmin



                                  Artificial intelligence (AI) has evolved from a futuristic vision to a mainstream technology, highlighted by the introduction of tools like OpenAI's ChatGPT and Google's Gemini. In recent years, AI has become increasingly integrated into the field of genomics. This integration has enabled new scientific discoveries while simultaneously raising important ethical questions1. Interviews with two researchers at the center of this intersection provide insightful perspectives into...
                                  02-26-2024, 02:07 PM

                                ad_right_rmr

                                Collapse

                                News

                                Collapse

                                Topics Statistics Last Post
                                Started by seqadmin, 03-14-2024, 06:13 AM
                                0 responses
                                32 views
                                0 likes
                                Last Post seqadmin  
                                Started by seqadmin, 03-08-2024, 08:03 AM
                                0 responses
                                71 views
                                0 likes
                                Last Post seqadmin  
                                Started by seqadmin, 03-07-2024, 08:13 AM
                                0 responses
                                80 views
                                0 likes
                                Last Post seqadmin  
                                Started by seqadmin, 03-06-2024, 09:51 AM
                                0 responses
                                68 views
                                0 likes
                                Last Post seqadmin  
                                Working...
                                X