Unconfigured Ad

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • apeltzer
    Junior Member
    • Feb 2014
    • 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

      • mylaser
        Reply to Advanced Sequencing Platforms Tackle Neuroscience’s Toughest Genomics Problems
        by mylaser
        Kheloyar – Everything You Need to Know About Kheloyaar Login and Kheoyar Id
        If you are looking for an online gaming platform that offers a user-friendly experience, Kheloyar has become a name that many users search for. Whether you're interested in creating a new account, accessing your dashboard through Kheloyaar Login, or learning how to obtain a Kheoyar Id, understanding the platform's features and account process is essential.
        This guide explains everything you need to know about...
        Today, 01:13 AM
      • SEQadmin2
        Advanced Sequencing Platforms Tackle Neuroscience’s Toughest Genomics Problems
        by SEQadmin2



        Genomics studies in neuroscience face a special challenge due to the brain’s complexity and scarcity of samples. Mapping changes in cell type and state using conventional next-generation sequencing methods remains challenging. Advances in technologies like single-cell sequencing, spatial transcriptomics, and long-read sequencing have opened the door to deeper studies of the brain and diseases like Alzheimer’s, amyotrophic lateral sclerosis (ALS), and schizophrenia.
        ...
        07-09-2026, 11:10 AM
      • SEQadmin2
        Cancer Drug Resistance: The Lingering Barrier to Rising Survival
        by SEQadmin2



        Cancer survival rates have significantly increased in the last few decades in the United States, reaching a combined 70% 5-year survival rate by 2021. Behind this number, there are years of research to find new therapies, drug targets, and early detection methods. But there is one core challenge that keeps slowing down these advances, and it’s about drug resistance.

        There is no single reason why many patients don’t respond to treatment as expected. Cancer is...
        07-08-2026, 05:17 AM

      ad_right_rmr

      Collapse

      News

      Collapse

      Topics Statistics Last Post
      Started by SEQadmin2, 07-09-2026, 10:04 AM
      0 responses
      16 views
      0 reactions
      Last Post SEQadmin2  
      Started by SEQadmin2, 07-08-2026, 10:08 AM
      0 responses
      10 views
      0 reactions
      Last Post SEQadmin2  
      Started by SEQadmin2, 07-07-2026, 11:05 AM
      0 responses
      22 views
      0 reactions
      Last Post SEQadmin2  
      Started by SEQadmin2, 07-02-2026, 11:08 AM
      0 responses
      31 views
      0 reactions
      Last Post SEQadmin2  
      Working...