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

        • kinpict.com
          Reply to 16S/ITS Profiling vs. Shotgun Metagenomics: What Changes in Your Workflow?
          by kinpict.com
          The part about this topic feels surprisingly grounded, and the details on the page is the bit that made me slow down. I’d keep <a href="https://kinpict.com/">ai family photo generator</a> bookmarked for later.
          Today, 06:37 PM
        • SEQadmin2
          16S/ITS Profiling vs. Shotgun Metagenomics: What Changes in Your Workflow?
          by SEQadmin2





          NGS has revolutionized clinical microbiology by offering new ways to identify and surveil pathogens without prior knowledge of the target. One popular approach is 16S rRNA and ITS amplicon sequencing, which targets specific microbial markers. But studies are increasingly incorporating shotgun metagenomics, a technique that sequences all DNA from a sample without targeting specific microbial markers. This approach allows more detailed taxonomic classification,...
          10-30-2026, 06:46 AM

        ad_right_rmr

        Collapse

        News

        Collapse

        Topics Statistics Last Post
        Started by SEQadmin2, 11-12-2026, 07:59 AM
        0 responses
        27 views
        0 reactions
        Last Post SEQadmin2  
        Started by SEQadmin2, 11-05-2026, 09:25 AM
        0 responses
        35 views
        0 reactions
        Last Post SEQadmin2  
        Started by SEQadmin2, 11-03-2026, 11:54 AM
        2 responses
        56 views
        0 reactions
        Last Post kinpict.com  
        Started by SEQadmin2, 10-28-2026, 09:57 AM
        0 responses
        175 views
        0 reactions
        Last Post SEQadmin2  
        Working...