Unconfigured Ad

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Parharn
    Member
    • Jul 2013
    • 84

    #1

    summarizeOverlaps error

    Hi,
    I am trying to test the "RNA-Seq Data Pathway and Gene-set Analysis Workflows" manual by Weijun Luo. I get an error as follow:

    > gnCnt <- summarizeOverlaps(exByGn, bamfls, mode="Union", ignore.strand=TRUE, single.end=TRUE, param=param)
    Error: could not find function "summarizeOverlaps"

    Does anybody have any suggestions?

    Thanks,
    Parham
  • dpryan
    Devon Ryan
    • Jul 2011
    • 3478

    #2
    You need to load GenomicRanges:
    Code:
    library(GenomicRanges)

    Comment

    • Parharn
      Member
      • Jul 2013
      • 84

      #3
      I did! Still it cannot find the function!
      > library(GenomicRanges)
      > gnCnt <- summarizeOverlaps(exByGn, bamfls, mode="Union", ignore.strand=TRUE, single.end=FALSE, param=param)
      Error: could not find function "summarizeOverlaps"

      Do you have any other suggestion?

      Comment

      • dpryan
        Devon Ryan
        • Jul 2011
        • 3478

        #4
        That's a first. Try starting a new R session.

        Comment

        • dpryan
          Devon Ryan
          • Jul 2011
          • 3478

          #5
          And if that doesn't work, post the output of sessionInfo()

          Comment

          • Parharn
            Member
            • Jul 2013
            • 84

            #6
            Alright, it didn't work yet. Here is the code that I am trying (I couldn't figure out how you put a code in box as your first reply) however here it is:

            library(TxDb.Hsapiens.UCSC.hg19.knownGene)
            exByGn <- exonsBy(TxDb.Hsapiens.UCSC.hg19.knownGene, "gene")
            library(Rsamtools)
            fls <- list.files("tophat_all/", pattern="bam$", full.names =T)
            bamfls <- BamFileList(fls)
            flag <- scanBamFlag(isNotPrimaryRead=FALSE, isProperPair=TRUE)
            param <- ScanBamParam(flag=flag)
            gnCnt <- summarizeOverlaps(exByGn, bamfls, mode="Union",
            ignore.strand=TRUE, single.end=FALSE, param=param)
            hnrnp.cnts=assay(gnCnt)

            One thing I need to know is if I can load several libraries in the beginning of R?
            The next thing is for loading Rsamtools it said two packages are required (XVector and Biostrings) which I had installed them previously but it asked my again, and I had to install them again. I don't know what's wrong, but just wanted to provide that info to you.

            I am not developer, just trying to use linux and these softwares.

            Thanks!

            Comment

            • dpryan
              Devon Ryan
              • Jul 2011
              • 3478

              #7
              Yes, you can load as many libraries as you want at the beginning. What's the output of sessionInfo()?

              Comment

              • Parharn
                Member
                • Jul 2013
                • 84

                #8
                All right, good to know!
                Here it is:

                sessionInfo()
                R version 3.1.0 (2014-04-10)
                Platform: x86_64-pc-linux-gnu (64-bit)

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

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

                other attached packages:
                [1] Rsamtools_1.16.0
                [2] Biostrings_2.32.0
                [3] XVector_0.4.0
                [4] TxDb.Hsapiens.UCSC.hg19.knownGene_2.14.0
                [5] GenomicFeatures_1.16.2
                [6] AnnotationDbi_1.26.0
                [7] Biobase_2.24.0
                [8] GenomicRanges_1.16.3
                [9] GenomeInfoDb_1.0.2
                [10] IRanges_1.22.8
                [11] BiocGenerics_0.10.0

                loaded via a namespace (and not attached):
                [1] BatchJobs_1.2 BBmisc_1.6 BiocParallel_0.6.1
                [4] biomaRt_2.20.0 bitops_1.0-6 brew_1.0-6
                [7] BSgenome_1.32.0 codetools_0.2-8 DBI_0.2-7
                [10] digest_0.6.4 fail_1.2 foreach_1.4.2
                [13] GenomicAlignments_1.0.1 iterators_1.0.7 plyr_1.8.1
                [16] Rcpp_0.11.1 RCurl_1.95-4.1 RSQLite_0.11.4
                [19] rtracklayer_1.24.2 sendmailR_1.1-2 stats4_3.1.0
                [22] stringr_0.6.2 tools_3.1.0 XML_3.98-1.1
                [25] zlibbioc_1.10.0
                >

                Comment

                • Michael Love
                  Senior Member
                  • Jul 2013
                  • 333

                  #9
                  summarizeOverlaps() moved to the GenomicAlignments package for Bioc 2.14 / R 3.1

                  Code:
                  library(GenomicAlignments)

                  Comment

                  • Parharn
                    Member
                    • Jul 2013
                    • 84

                    #10
                    Thanks Michael, it worked. But then I got another error regarding the BAM file:

                    gnCnt <- summarizeOverlaps(exByGn, bamfls, mode="Union", ignore.strand=TRUE, single.end=FALSE, param=param)
                    Error: 1 errors; first error:
                    Error in value[[3L]](cond): failed to open BamFile: file(s) do not exist:
                    'tophat_all//ERR127302.bam'

                    For more information, use bplasterror(). To resume calculation, re-call
                    the function and set the argument 'BPRESUME' to TRUE or wrap the
                    previous call in bpresume().

                    First traceback:
                    34: summarizeOverlaps(exByGn, bamfls, mode = "Union", ignore.strand = TRUE,
                    single.end = FALSE, param = param)
                    33: summarizeOverlaps(exByGn, bamfls, mode = "Union", ignore.strand = TRUE,
                    single.end = FALSE, param = param)
                    32: .local(features, reads, mode, ignore.strand, ...)
                    31: .summarizeOverlaps_BamFileList(features, reads, mode, ignore.strand = ignore.strand,
                    inter.feature = inter.feature, singleEnd = singleEnd, fragments = fragments,
                    param = param, ...)
                    30: .dispatchBamFiles(features, reads, mode, ignore.strand, inter.feature = inter.feature,
                    singleEnd = singleEnd, fragments = fragments, param = pa

                    Do you have any advice for it?

                    Comment

                    • Michael Love
                      Senior Member
                      • Jul 2013
                      • 333

                      #11
                      Well, you'll have to make sure the files in bamfls (e.g. 'tophat_all/ERR127302.bam') exist and are correctly specified relative to your current working directory in R:

                      Code:
                      getwd()

                      Comment

                      • Parharn
                        Member
                        • Jul 2013
                        • 84

                        #12
                        Great, I fixed that. Thanks a lot!

                        Comment

                        Latest Articles

                        Collapse

                        • SEQadmin2
                          Multiomic Liquid Biopsy: What DNA/RNA Panels Reveal That DNA Alone Can’t
                          by SEQadmin2



                          Tumors contain complex mixtures of cell populations that evolve in response to treatment and host-specific factors. Tissue biopsies provide only static snapshots of a tumor’s state. But what if we could follow that evolution over time using a minimally invasive technique?

                          Liquid biopsies can detect tumor-derived material circulating in the bloodstream, providing a way to study treatment response, detect emerging resistance, and discover new biomarkers. Circulating
                          ...
                          10-14-2026, 09:55 AM
                        • SEQadmin2
                          New Genomics Technologies Take Aim at Long-Standing Limits
                          by SEQadmin2


                          Researchers using sequencing and genomics tools often have to make trade-offs. They can choose between speed or scale, short reads or long-range information, or targeted panels or a view of the whole transcriptome. New technologies that have been released this year are built to address those tough choices.

                          We asked six companies the same four questions to learn about their latest products. The new technologies bring a lot to the table, including rethinking sequencing
                          ...
                          09-28-2026, 10:25 AM

                        ad_right_rmr

                        Collapse

                        News

                        Collapse

                        Topics Statistics Last Post
                        Started by SEQadmin2, 10-15-2026, 10:52 AM
                        0 responses
                        18 views
                        0 reactions
                        Last Post SEQadmin2  
                        Started by SEQadmin2, 10-14-2026, 05:39 AM
                        0 responses
                        26 views
                        0 reactions
                        Last Post SEQadmin2  
                        Started by SEQadmin2, 10-13-2026, 09:56 AM
                        0 responses
                        22 views
                        0 reactions
                        Last Post SEQadmin2  
                        Started by SEQadmin2, 10-09-2026, 11:14 AM
                        0 responses
                        28 views
                        0 reactions
                        Last Post SEQadmin2  
                        Working...