Seqanswers Leaderboard Ad

Collapse

Announcement

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

  • Potentially corrupted BAM files

    Hi all,
    I have a question about detecting possible corruptions to BAM files. Essentially, we had a serious hard drive issue and failure across our network. While we have been able to restore our hard drives and retrieve our data, we have noticed issues with many files. for example, in some text files, some information has been changed to non ascii data, or lines deleted from them. We still do not yet know the full extend of the issues but are trying to figure it out. One, potential issue is that we have many 1000's of mapped bam files. We do not know if the files have been corrupted in anyway, and are interested in finding out. One approach (I think) would be to try to convert them back to SAM files, and if it breaks then the file is somehow corrupted. But I was wondering if anyone knew of some other method that can check the file.

    I should note that we do have most of this backed up on a tape storage system that we could go back to, but this would take an exceedingly long time to do for our whole system. So we would like to maybe find the 'bad' files and replace those only. Also, I am not a software engineer, so hopefully this all makes sense

  • #2
    zcat the bam file and check for errors ... example ...

    rfinney@pigdog:~$ file test.bam
    test.bam: gzip compressed data, extra field

    rfinney@pigdog:~$ samtools index test.bam

    rfinney@pigdog:~$ cat test.bam | tr " " "x" > test2.bam # corrupt the file test2.bam

    rfinney@pigdog:~$ samtools index test2.bam
    [E::bam_hdr_read] invalid BAM binary header
    samtools index: "test2.bam" is corrupted or unsorted

    rfinney@pigdog:~$ zcat test.bam > /dev/null

    rfinney@pigdog:~$ zcat test2.bam > /dev/null
    gzip: test2.bam: invalid compressed data--crc error
    gzip: test2.bam: invalid compressed data--length error
    Last edited by Richard Finney; 09-01-2016, 11:46 AM.

    Comment

    Latest Articles

    Collapse

    • seqadmin
      Recent Advances in Sequencing Analysis Tools
      by seqadmin


      The sequencing world is rapidly changing due to declining costs, enhanced accuracies, and the advent of newer, cutting-edge instruments. Equally important to these developments are improvements in sequencing analysis, a process that converts vast amounts of raw data into a comprehensible and meaningful form. This complex task requires expertise and the right analysis tools. In this article, we highlight the progress and innovation in sequencing analysis by reviewing several of the...
      05-06-2024, 07:48 AM
    • 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

    ad_right_rmr

    Collapse

    News

    Collapse

    Topics Statistics Last Post
    Started by seqadmin, Yesterday, 06:57 AM
    0 responses
    12 views
    0 likes
    Last Post seqadmin  
    Started by seqadmin, 05-06-2024, 07:17 AM
    0 responses
    16 views
    0 likes
    Last Post seqadmin  
    Started by seqadmin, 05-02-2024, 08:06 AM
    0 responses
    19 views
    0 likes
    Last Post seqadmin  
    Started by seqadmin, 04-30-2024, 12:17 PM
    0 responses
    24 views
    0 likes
    Last Post seqadmin  
    Working...
    X