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
        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
      • seqadmin
        Strategies for Sequencing Challenging Samples
        by seqadmin


        Despite advancements in sequencing platforms and related sample preparation technologies, certain sample types continue to present significant challenges that can compromise sequencing results. Pedro Echave, Senior Manager of the Global Business Segment at Revvity, explained that the success of a sequencing experiment ultimately depends on the amount and integrity of the nucleic acid template (RNA or DNA) obtained from a sample. “The better the quality of the nucleic acid isolated...
        03-22-2024, 06:39 AM

      ad_right_rmr

      Collapse

      News

      Collapse

      Topics Statistics Last Post
      Started by seqadmin, 04-11-2024, 12:08 PM
      0 responses
      27 views
      0 likes
      Last Post seqadmin  
      Started by seqadmin, 04-10-2024, 10:19 PM
      0 responses
      30 views
      0 likes
      Last Post seqadmin  
      Started by seqadmin, 04-10-2024, 09:21 AM
      0 responses
      26 views
      0 likes
      Last Post seqadmin  
      Started by seqadmin, 04-04-2024, 09:00 AM
      0 responses
      52 views
      0 likes
      Last Post seqadmin  
      Working...
      X