Unconfigured Ad

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • apeltzer
    Junior Member
    • Feb 2014
    • 1

    #1

    [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 ;-)
  • TiborNagy
    Senior Member
    • Mar 2010
    • 329

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

    Comment

    • dpryan
      Devon Ryan
      • Jul 2011
      • 3478

      #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

      • 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

      ad_right_rmr

      Collapse

      News

      Collapse

      Topics Statistics Last Post
      Started by SEQadmin2, 08-11-2026, 10:35 AM
      0 responses
      11 views
      0 reactions
      Last Post SEQadmin2  
      Started by SEQadmin2, 08-06-2026, 07:41 AM
      0 responses
      30 views
      0 reactions
      Last Post SEQadmin2  
      Started by SEQadmin2, 08-03-2026, 10:13 AM
      0 responses
      48 views
      0 reactions
      Last Post SEQadmin2  
      Started by SEQadmin2, 07-31-2026, 02:55 AM
      0 responses
      48 views
      0 reactions
      Last Post SEQadmin2  
      Working...