Seqanswers Leaderboard Ad

Collapse

Announcement

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

  • DiffBind error- bad magic number

    Hello everyone,
    I am having problems running diffbind count function. I keep getting the following error (running in R on Mac):

    > H3K9me3 = dba.count(H3K9me3, minOverlap=2)
    Error: Error processing one or more read files. Check warnings().
    In addition: Warning messages:
    1: In mclapply(arglist, fn, ..., mc.preschedule = TRUE, mc.allow.recursive = TRUE) :
    all scheduled cores encountered errors in user code
    2: file '~/Desktop/H3K9me3_bam/Wt1_H2K9me3_chip_sorted.bam.bam' does not appear to be a BAM file (bad magic number)

    I checked the numerical code at the end of my bam file and it appears to be correct:

    00029de0 7f 02 32 f0 24 b6 00 ed 00 00 1f 8b 08 04 00 00 |..2.$...........|
    00029df0 00 00 00 ff 06 00 42 43 02 00 1b 00 03 00 00 00 |......BC........|
    00029e00 00 00 00 00 00 00 |......|
    00029e06

    I have sorted and resorted with sam tools with no change. The bam file works fine for loading into IGV and such, so it is not unreadable. Any ideas?

    Thanks so much!

  • #2
    This is presumably referring to the magic number* at the beginning of the file, which is "BAM\1". If that's there then this is likely a bug in diffbind. What version are you using (just post the output of sessionInfo()).

    *Well, "magic string"

    Comment


    • #3
      If you could re-post this issue to the Bioconductor support site:
      https://support.bioconductor.org/'

      we can address this there. Please do include the sessionInfo() output.

      The way you are using dba.count(), without using the summits parameter, there is a workaround you can try. If you set bUseSummarizeOverlaps=TRUE, a different method will be used to access the bam files and that might work (let us know if it does in support post).

      Cheers-
      Rory

      Comment


      • #4
        Hello,

        Thank you so much for the responses. I did try the "bUseSummarizeOverlaps=TRUE" addition to the count function and that appears to have fixed the problem. :-) Thanks so much!


        The session info is as follows:

        R version 3.2.2 (2015-08-14)
        Platform: x86_64-apple-darwin13.4.0 (64-bit)
        Running under: OS X 10.10.3 (Yosemite)

        locale:
        [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

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

        other attached packages:
        [1] DiffBind_1.14.6 RSQLite_1.0.0
        [3] DBI_0.3.1 locfit_1.5-9.1
        [5] GenomicAlignments_1.4.1 Rsamtools_1.20.4
        [7] Biostrings_2.36.4 XVector_0.8.0
        [9] limma_3.24.15 GenomicRanges_1.20.8
        [11] GenomeInfoDb_1.4.3 IRanges_2.2.7
        [13] S4Vectors_0.6.6 BiocGenerics_0.14.0
        [15] BiocInstaller_1.18.4

        loaded via a namespace (and not attached):
        [1] Rcpp_0.12.1 lattice_0.20-33
        [3] GO.db_3.1.2 gtools_3.5.0
        [5] digest_0.6.8 plyr_1.8.3
        [7] futile.options_1.0.0 BatchJobs_1.6
        [9] ShortRead_1.26.0 ggplot2_1.0.1
        [11] gplots_2.17.0 zlibbioc_1.14.0
        [13] annotate_1.46.1 gdata_2.17.0
        [15] Matrix_1.2-2 checkmate_1.6.2
        [17] systemPipeR_1.2.23 proto_0.3-10
        [19] GOstats_2.34.0 splines_3.2.2
        [21] BiocParallel_1.2.21 stringr_1.0.0
        [23] pheatmap_1.0.7 munsell_0.4.2
        [25] sendmailR_1.2-1 base64enc_0.1-3
        [27] BBmisc_1.9 fail_1.2
        [29] edgeR_3.10.2 XML_3.98-1.3
        [31] AnnotationForge_1.10.1 MASS_7.3-44
        [33] bitops_1.0-6 grid_3.2.2
        [35] RBGL_1.44.0 xtable_1.7-4
        [37] GSEABase_1.30.2 gtable_0.1.2
        [39] magrittr_1.5 scales_0.3.0
        [41] graph_1.46.0 KernSmooth_2.23-15
        [43] amap_0.8-14 stringi_0.5-5
        [45] hwriter_1.3.2 reshape2_1.4.1
        [47] genefilter_1.50.0 latticeExtra_0.6-26
        [49] futile.logger_1.4.1 brew_1.0-6
        [51] rjson_0.2.15 lambda.r_1.1.7
        [53] RColorBrewer_1.1-2 tools_3.2.2
        [55] Biobase_2.28.0 Category_2.34.2
        [57] survival_2.38-3 AnnotationDbi_1.30.1
        [59] colorspace_1.2-6 caTools_1.17.1

        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 on Modified Bases...
          Yesterday, 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, 04-11-2024, 12:08 PM
        0 responses
        51 views
        0 likes
        Last Post seqadmin  
        Started by seqadmin, 04-10-2024, 10:19 PM
        0 responses
        50 views
        0 likes
        Last Post seqadmin  
        Started by seqadmin, 04-10-2024, 09:21 AM
        0 responses
        44 views
        0 likes
        Last Post seqadmin  
        Started by seqadmin, 04-04-2024, 09:00 AM
        0 responses
        55 views
        0 likes
        Last Post seqadmin  
        Working...
        X