Seqanswers Leaderboard Ad

Collapse

Announcement

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

  • [PICARD] Problems with SAM/BAM files without header

    Hi there,

    I have several problems when dealing with SAM/BAM files without an appropriate header inside. First of all, if there is a correct header the PicardTools SDK I use in my tool works without any flaws. If there is however no header, I had to change my tool to use the
    VALIDATION_STRINGENCY=LENIENT setting, otherwise it would crash giving me the information that there is no header (so far so good and expected).

    My problem now is: If I have a file without a header, but my reads have a corresponding header reference set (e.g. gi|040304024...) this is set to "*" by picard, without any necessity. Downstream my analysis, this is causing several issues in the pipeline. Can I force Picard to leave the already existing reference IDs set in each read as they are somehow?

    Thanks,
    Hope this is getting clear for anybody ;-)

  • #2
    Header of SAM file is a very simple thing. Try to create manually.

    Comment


    • #3
      I'm not particularly familiar with the SAM JDK (I use the samtools C API mostly), but I can at least explain why this is happening. For both picard and samtools, alignments are stored internally in something like the BAM format, regardless of how they're written in a file. In a BAM file, the chromosome/contig name is absent, there's just a number (in the C API, this is read->core.tid, I don't know what the equivalent is in java). This number is just an index into an array stored in the header. At least in the C API, you can use an arbitrary header when reading a SAM/BAM file, since the reader function is given the header as an argument. Since java is an OO language, I wouldn't be surprised if there's no equivalently convenient way to do this in java. You might have to look at the code for SAMFileReader and see if you can manually change what it uses as a SAMFileHeader.

      Comment

      Latest Articles

      Collapse

      • seqadmin
        Advancing Precision Medicine for Rare Diseases in Children
        by seqadmin




        Many organizations study rare diseases, but few have a mission as impactful as Rady Children’s Institute for Genomic Medicine (RCIGM). “We are all about changing outcomes for children,” explained Dr. Stephen Kingsmore, President and CEO of the group. The institute’s initial goal was to provide rapid diagnoses for critically ill children and shorten their diagnostic odyssey, a term used to describe the long and arduous process it takes patients to obtain an accurate...
        12-16-2024, 07:57 AM
      • seqadmin
        Recent Advances in Sequencing Technologies
        by seqadmin



        Innovations in next-generation sequencing technologies and techniques are driving more precise and comprehensive exploration of complex biological systems. Current advancements include improved accessibility for long-read sequencing and significant progress in single-cell and 3D genomics. This article explores some of the most impactful developments in the field over the past year.

        Long-Read Sequencing
        Long-read sequencing has seen remarkable advancements,...
        12-02-2024, 01:49 PM

      ad_right_rmr

      Collapse

      News

      Collapse

      Topics Statistics Last Post
      Started by seqadmin, 12-17-2024, 10:28 AM
      0 responses
      33 views
      0 likes
      Last Post seqadmin  
      Started by seqadmin, 12-13-2024, 08:24 AM
      0 responses
      49 views
      0 likes
      Last Post seqadmin  
      Started by seqadmin, 12-12-2024, 07:41 AM
      0 responses
      34 views
      0 likes
      Last Post seqadmin  
      Started by seqadmin, 12-11-2024, 07:45 AM
      0 responses
      46 views
      0 likes
      Last Post seqadmin  
      Working...
      X