Seqanswers Leaderboard Ad

Collapse

Announcement

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

  • #16
    Update on mike's tip on plotMA, it worked ! i used ;
    DESeq:: plotMA(res)
    or DESeq2:: plotMA(your requirements)

    I have another question. I am working with 4 animals as my samples with absolutely NO replicates !!! It is downright expensive to have replicate conditions for the animals and also during the process of library preparation , replicates were not made due to cost of running NGS on all of them and so on....but anyways, right now what I have is what I have My problem is this: I have used DESeq2 to perform the DE analysis as indicated in part one below and DESeq to perform DE analysis as indicated in part 2. For DESeq I am using per sample across its two conditions for evaluation.
    For my first part I have used all four samples (treated as replicates) for both untreated and treated condition> basically I have sample1,2,3,4 fed across both untreated and treated into DESeq2. I generated heatmaps of highly expressed genes. However I have only 3 genes differentially expressed with a Padj value of less than 0.05.
    Part 2: I am using DESeq per sample using its own untreated vs treated. To indicate I have no replicates I have used
    cds<-estimateDispersions(cds,method="blind",sharingMode="fit-only",fitType="local"). I get a result fo rbinom test with a lot of NA !!!!!downstream
    however when I do a :
    > cdsBlind = estimateDispersions( cds, method="blind" )
    > vsd = varianceStabilizingTransformation( cdsBlind )
    Error in (function (classes, fdef, mtable) :
    unable to find an inherited method for function ‘normalizationFactors’ for signature ‘"CountDataSet"’
    I get the above error...........why is that? I had normalized my counts and used that to perform this step . However I still get this error: plz see below;
    > a<-counts(cds,normalized=T)
    cds3<-estimateDispersions(a,method="blind",sharingMode="fit-only",fitType="local")
    Error in (function (classes, fdef, mtable) :
    unable to find an inherited method for function ‘estimateDispersions’ for signature ‘"matrix"’
    > cdsBlind = estimateDispersions( a, method="blind" )
    Error in (function (classes, fdef, mtable) :
    unable to find an inherited method for function ‘estimateDispersions’ for signature ‘"matrix"’

    Please could u suggest how I can get to get a top highly expressed gene list per sample WITHOUT REPLICATES in DESeq ? Why am I getting this error? I poked a little bit into this googling and I am confused. My "a" is normalized counts.

    Also can I compare fold2change values obtained from results of nbinom using DESeq to the fold2change I get from results dseq<-DESeq(dds) in DESeq2?
    I appreciate any input for such a condition where one is working without any replicates !!! Thanks very much in advance !
    Last edited by geneart; 04-14-2014, 03:41 AM.

    Comment


    • #17
      hi geneart,

      I wouldn't mix DESeq (old package) and DESeq2. The analysis without replicates will work automatically in DESeq2 using the same principles as before (samples are treated as replicates for estimation of dispersion).

      from ?estimateDispersions:

      estimateDispersions checks for the case of an analysis with as many samples as the number
      of coefficients to fit, and will temporarily substitute a design formula ~ 1 for the purposes of
      dispersion estimation. This treats the samples as replicates for the purpose of dispersion estimation.
      As mentioned in the DESeq paper: "While one may not want to draw strong conclusions from such
      an analysis, it may still be useful for exploration and hypothesis generation."

      Comment


      • #18
        Thanks Mike for the input. Appreciate it very much !
        geneart.

        Comment


        • #19
          Hi Mike,

          I was wondering if the release version of DESeq still needs the development version of R. I am still getting the same errors as cacti above with DESeq 1.4.5. Below I've pasted my loading attempt and the error message I received.

          > install.packages("~/Downloads/DESeq2_1.4.5.tgz", repos = NULL)
          Installing package into ‘/Users/co7/Library/R/3.0/library’
          (as ‘lib’ is unspecified)
          > library("DESeq2", lib.loc="/Users/co7/Library/R/3.0/library")
          Loading required package: GenomicRanges
          Loading required package: BiocGenerics
          Loading required package: parallel

          Attaching package: ‘BiocGenerics’

          The following objects are masked from ‘packagearallel’:

          clusterApply, clusterApplyLB, clusterCall, clusterEvalQ, clusterExport, clusterMap, parApply, parCapply,
          parLapply, parLapplyLB, parRapply, parSapply, parSapplyLB

          The following object is masked from ‘package:stats’:

          xtabs

          The following objects are masked from ‘package:base’:

          anyDuplicated, append, as.data.frame, as.vector, cbind, colnames, duplicated, eval, evalq, Filter, Find, get,
          intersect, is.unsorted, lapply, Map, mapply, match, mget, order, paste, pmax, pmax.int, pmin, pmin.int,
          Position, rank, rbind, Reduce, rep.int, rownames, sapply, setdiff, sort, table, tapply, union, unique, unlist

          Loading required package: IRanges
          Loading required package: XVector
          Loading required package: Rcpp
          Loading required package: RcppArmadillo
          Error in dyn.load(file, DLLpath = DLLpath, ...) :
          unable to load shared object '/Users/co7/Library/R/3.0/library/DESeq2/libs/DESeq2.so':
          dlopen(/Users/co7/Library/R/3.0/library/DESeq2/libs/DESeq2.so, 6): Library not loaded: /Library/Frameworks/R.framework/Versions/3.1/Resources/lib/libRlapack.dylib
          Referenced from: /Users/co7/Library/R/3.0/library/DESeq2/libs/DESeq2.so
          Reason: Incompatible library version: DESeq2.so requires version 3.1.0 or later, but libRlapack.dylib provides version 3.0.0
          In addition: Warning message:
          package ‘DESeq2’ was built under R version 3.1.0
          Error: package or namespace load failed for ‘DESeq2’

          I have gone back to using version 1.2.10 but I'm hoping to redo my analysis in the new version as soon as a stable release it out. Do you know when that might be? Thank you!

          Cheers,
          Kwasi

          Comment


          • #20
            hi Kwasi,

            If you are getting the same errors as above with plotMA, it is because you have Bioconductor packages out of sync. The best way to fix this is to upgrade all packages to the latest release version.

            In the Bioconductor x.y.z version number, if y is even, this means the package is a release version.

            So 1.4.5 is the current release version of DESeq2 which you can download if you upgrade to the newest release of R: 3.1.0.

            You should update R on your machine, and then update packages with the following advice:

            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
              Hi Mike,

              Everything worked like a charm! Thank you for the very prompt response.

              Cheers,
              Kwasi
              Last edited by Kwasi; 05-15-2014, 05:20 AM. Reason: spelling error

              Comment


              • #22
                I faced the same problem with plotMA of the DESeq2 package.
                The command gives error
                Error in as.vector(data):
                no method for coercing this S4 class to a vector


                I checked the input data to be of the correct format. Then later I realized that this was caused due to the limma library that was loaded. I was using limma to make other graphs, which I am doing much later in the script. However, I loaded limma library along with DESeq2 library at the start of the script.

                When I removed limma library from the start of the script and placed it exactly where it was needed (much later than the plotMA commands), then the problem with plotMA vanished. Obviously both packages offer this command and there seem to be differences in the input formats. In the case when I got the error, the command was defaulting to the limma package which was the reason for the error.

                Comment


                • #23
                  hi thanks for the note sridharacharya. I think you can also specify
                  Code:
                  DESeq2::plotMA
                  .

                  Comment


                  • #24
                    Hi Michael,

                    I'm sort of having the same problem. I upgraded to R 3.1.1 and then installed DESeq2 1.6.1. When installing DESeq2, I got the warning that it couldn't upgrade 3 packages including MASS. Afterwards, running the normalizationFactors script resulted in the following error:

                    > normalizationFactors(dds) <- NF
                    Error in (function (classes, fdef, mtable) :
                    unable to find an inherited method for function ‘normalizationFactors<-’ for signature ‘"DESeqDataSet", "data.frame"’

                    Following the suggestions on http://bioconductor.org/install/#upd...uctor-packages then (as per your suggestion), I recompiled all the Bioconductor packages, which at the end gave me the following warnings:

                    Warning messages:
                    1: packages ‘manipulate’, ‘rstudio’, ‘base’, ‘compiler’, ‘datasets’, ‘graphics’, ‘grDevices’, ‘grid’, ‘methods’, ‘parallel’, ‘splines’, ‘stats’, ‘stats4’, ‘tcltk’, ‘tools’, ‘utils’ are not available (for R version 3.1.1)
                    2: In install.packages(pkgs = pkgs, lib = lib, repos = repos, ...) :
                    installation of package ‘MASS’ had non-zero exit status
                    3: In install.packages(pkgs = pkgs, lib = lib, repos = repos, ...) :
                    installation of package ‘DESeq2’ had non-zero exit status

                    So at least the list of faulty packages was reduced to only MASS (from the 3 packages I mentioned above) and DESeq2. Here's the session info:
                    > sessionInfo()
                    R version 3.1.1 (2014-07-10)
                    Platform: x86_64-pc-linux-gnu (64-bit)

                    locale:
                    [1] LC_CTYPE=en_CA.UTF-8 LC_NUMERIC=C
                    [3] LC_TIME=fr_CA.UTF-8 LC_COLLATE=en_CA.UTF-8
                    [5] LC_MONETARY=fr_CA.UTF-8 LC_MESSAGES=en_CA.UTF-8
                    [7] LC_PAPER=fr_CA.UTF-8 LC_NAME=C
                    [9] LC_ADDRESS=C LC_TELEPHONE=C
                    [11] LC_MEASUREMENT=fr_CA.UTF-8 LC_IDENTIFICATION=C

                    attached base packages:
                    [1] stats graphics grDevices utils datasets methods base

                    other attached packages:
                    [1] BiocInstaller_1.16.0

                    loaded via a namespace (and not attached):
                    [1] BiocGenerics_0.12.0 GenomeInfoDb_1.2.0 IRanges_2.0.0
                    [4] parallel_3.1.1 S4Vectors_0.4.0 stats4_3.1.1
                    [7] tools_3.1.1 XVector_0.6.0

                    At that point, I tried removing DESeq2 and reinstalling it manually, which as was sort of expected incurred the following errors:

                    mv: cannot move `/home/golsheed/R/x86_64-pc-linux-gnu-library/3.1/DESeq2' to `/home/golsheed/R/x86_64-pc-linux-gnu-library/3.1/00LOCK-DESeq2/DESeq2': Permission denied
                    Warning in file.copy(f, instdir, TRUE) :
                    problem copying ./NAMESPACE to /home/golsheed/R/x86_64-pc-linux-gnu-library/3.1/DESeq2/NAMESPACE: Permission denied
                    Warning in file.copy(f, instdir, TRUE) :
                    problem copying ./NEWS to /home/golsheed/R/x86_64-pc-linux-gnu-library/3.1/DESeq2/NEWS: Permission denied
                    Warning in file(file, ifelse(append, "a", "w")) :
                    cannot open file '/home/golsheed/R/x86_64-pc-linux-gnu-library/3.1/DESeq2/DESCRIPTION': Permission denied
                    Error in file(file, ifelse(append, "a", "w")) :
                    cannot open the connection
                    ERROR: installing package DESCRIPTION failed for package ‘DESeq2’
                    * removing ‘/home/golsheed/R/x86_64-pc-linux-gnu-library/3.1/DESeq2’

                    The downloaded source packages are in
                    ‘/tmp/RtmpMfeWZz/downloaded_packages’
                    Warning message:
                    In install.packages(pkgs = pkgs, lib = lib, repos = repos, ...) :
                    installation of package ‘DESeq2’ had non-zero exit status

                    I'd greatly appreciate any input or comment, if you could please think of any.

                    Thanks,
                    Golsheed

                    Comment


                    • #25
                      Hmm, you should back up a bit. Basically, there's never a good reason to install Bioc package manually, you will just end up with a headache of incompatible packages.

                      I don't think there was any installation error.

                      If you lookup the help for the function you got an error with...

                      ?normalizationFactors

                      Code:
                      normalizationFactors(object, ...) <- value
                      
                      object a DESeqDataSet object.
                      
                      value the matrix of normalization factors
                      ...'value' should be a matrix.

                      Comment


                      • #26
                        Thanks a lot for the help, it works!

                        Golsheed

                        Comment


                        • #27
                          Thanks a lot for the help, it works!

                          Golsheed

                          Comment


                          • #28
                            Nested Mixed Model in DESeq2

                            Hi,

                            I was wondering whether I could use a nested mixed model in DESeq2? Specifically, the model I have in mind has two fixed effects A and B, and a random effect C nested in B. I was wondering whether the following could work?
                            design = ~ A + B + (1| C %in% B)
                            I'd appreciate any help or comment.

                            Thanks,
                            Golsheed


                            Originally posted by Michael Love View Post
                            Hmm, you should back up a bit. Basically, there's never a good reason to install Bioc package manually, you will just end up with a headache of incompatible packages.

                            I don't think there was any installation error.

                            If you lookup the help for the function you got an error with...

                            ?normalizationFactors

                            Code:
                            normalizationFactors(object, ...) <- value
                            
                            object a DESeqDataSet object.
                            
                            value the matrix of normalization factors
                            ...'value' should be a matrix.

                            Comment


                            • #29
                              it's best to make a new post for a different topic, rather than add on to a thread which is about something else.

                              Comment

                              Latest Articles

                              Collapse

                              • seqadmin
                                Current Approaches to Protein Sequencing
                                by seqadmin


                                Proteins are often described as the workhorses of the cell, and identifying their sequences is key to understanding their role in biological processes and disease. Currently, the most common technique used to determine protein sequences is mass spectrometry. While still a valuable tool, mass spectrometry faces several limitations and requires a highly experienced scientist familiar with the equipment to operate it. Additionally, other proteomic methods, like affinity assays, are constrained...
                                04-04-2024, 04:25 PM
                              • seqadmin
                                Strategies for Sequencing Challenging Samples
                                by seqadmin


                                Despite advancements in sequencing platforms and related sample preparation technologies, certain sample types continue to present significant challenges that can compromise sequencing results. Pedro Echave, Senior Manager of the Global Business Segment at Revvity, explained that the success of a sequencing experiment ultimately depends on the amount and integrity of the nucleic acid template (RNA or DNA) obtained from a sample. “The better the quality of the nucleic acid isolated...
                                03-22-2024, 06:39 AM

                              ad_right_rmr

                              Collapse

                              News

                              Collapse

                              Topics Statistics Last Post
                              Started by seqadmin, 04-11-2024, 12:08 PM
                              0 responses
                              25 views
                              0 likes
                              Last Post seqadmin  
                              Started by seqadmin, 04-10-2024, 10:19 PM
                              0 responses
                              29 views
                              0 likes
                              Last Post seqadmin  
                              Started by seqadmin, 04-10-2024, 09:21 AM
                              0 responses
                              25 views
                              0 likes
                              Last Post seqadmin  
                              Started by seqadmin, 04-04-2024, 09:00 AM
                              0 responses
                              52 views
                              0 likes
                              Last Post seqadmin  
                              Working...
                              X