Seqanswers Leaderboard Ad

Collapse

Announcement

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

  • 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

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

    Comment


    • #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


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

        Comment


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

          Comment


          • #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


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

              Comment


              • #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


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

                  Code:
                  library(GenomicAlignments)
                  Provides efficient containers for storing and manipulating short genomic alignments (typically obtained by aligning short reads to a reference genome). This includes read counting, computing the coverage, junction detection, and working with the nucleotide content of the alignments.

                  Comment


                  • #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


                    • #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


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

                        Comment

                        Latest Articles

                        Collapse

                        • seqadmin
                          Essential Discoveries and Tools in Epitranscriptomics
                          by seqadmin




                          The field of epigenetics has traditionally concentrated more on DNA and how changes like methylation and phosphorylation of histones impact gene expression and regulation. However, our increased understanding of RNA modifications and their importance in cellular processes has led to a rise in epitranscriptomics research. “Epitranscriptomics brings together the concepts of epigenetics and gene expression,” explained Adrien Leger, PhD, Principal Research Scientist...
                          04-22-2024, 07:01 AM
                        • 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

                        ad_right_rmr

                        Collapse

                        News

                        Collapse

                        Topics Statistics Last Post
                        Started by seqadmin, Today, 11:49 AM
                        0 responses
                        12 views
                        0 likes
                        Last Post seqadmin  
                        Started by seqadmin, Yesterday, 08:47 AM
                        0 responses
                        16 views
                        0 likes
                        Last Post seqadmin  
                        Started by seqadmin, 04-11-2024, 12:08 PM
                        0 responses
                        61 views
                        0 likes
                        Last Post seqadmin  
                        Started by seqadmin, 04-10-2024, 10:19 PM
                        0 responses
                        60 views
                        0 likes
                        Last Post seqadmin  
                        Working...
                        X