Unconfigured Ad

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ruoft
    Junior Member
    • May 2015
    • 5

    #1

    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!
  • dpryan
    Devon Ryan
    • Jul 2011
    • 3478

    #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

    • rory
      Member
      • Aug 2008
      • 28

      #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

      • ruoft
        Junior Member
        • May 2015
        • 5

        #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

        • SEQadmin2
          Beyond CRISPR/Cas9: Understand, Choose, and Use the Right Genome Editing Tool
          by SEQadmin2



          CRISPR/Cas9 sparked the gene editing revolution for both research and therapeutics.1 But this system still showed severe issues that limited its applications. The most prominent were the heavy reliance on PAM sequences, delivery limitations, double-stranded breaks that prompt unintended edits and cell death, and editing inefficiency (both in targeting and in knock-in reliability).

          Despite this, “CRISPR helped turn genome editing from a specialized technique into
          ...
          07-31-2026, 11:01 AM
        • SEQadmin2
          Proteomic Platforms: How to Choose the Right Analytical Strategy to Improve Detection and Clinical Applications
          by SEQadmin2


          Proteomics platforms are evolving rapidly, with advances in mass spectrometry and affinity-based approaches expanding what researchers can detect and at what scale. As the field moves toward deeper proteome coverage and clinical applications, scientists face an increasingly complex landscape of tools. This article will explore how researchers are navigating these choices to find the right platform for their work.

          The systematic characterization of the human proteome has
          ...
          07-20-2026, 11:48 AM
        • SEQadmin2
          Advanced Sequencing Platforms Tackle Neuroscience’s Toughest Genomics Problems
          by SEQadmin2



          Genomics studies in neuroscience face a special challenge due to the brain’s complexity and scarcity of samples. Mapping changes in cell type and state using conventional next-generation sequencing methods remains challenging. Advances in technologies like single-cell sequencing, spatial transcriptomics, and long-read sequencing have opened the door to deeper studies of the brain and diseases like Alzheimer’s, amyotrophic lateral sclerosis (ALS), and schizophrenia.
          ...
          07-09-2026, 11:10 AM

        ad_right_rmr

        Collapse

        News

        Collapse

        Topics Statistics Last Post
        Started by SEQadmin2, 08-03-2026, 10:13 AM
        0 responses
        14 views
        0 reactions
        Last Post SEQadmin2  
        Started by SEQadmin2, 07-31-2026, 02:55 AM
        0 responses
        32 views
        0 reactions
        Last Post SEQadmin2  
        Started by SEQadmin2, 07-24-2026, 12:17 PM
        0 responses
        23 views
        0 reactions
        Last Post SEQadmin2  
        Started by SEQadmin2, 07-23-2026, 11:41 AM
        0 responses
        21 views
        0 reactions
        Last Post SEQadmin2  
        Working...