Seqanswers Leaderboard Ad

Collapse

Announcement

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

  • Picard MergeBam Alignment issue

    Hello everyone. I've scourged the internet and this forum in particular and I have not been able to get past this problem. Ultimately, I want to be able to use Picard's Mark Dups.

    I have paired-end reads aligned to the human genome using GSnap. From previous experience, I already know that to use MarkDups I had to go through all of the pre-processing just to get the bam file up to Picard's standards. And so, I used FastQtoSam to make an unaligned bam file (queryname sorted). I then went to merge this unaligned file with my original GSnap output. I get this error:
    Exception in thread "main" java.lang.IllegalStateException: Aligned record iterator (HWI-ST970:586:C2PY6ACXX:1:1115:10000:27368) is behind t
    he unmapped reads (HWI-ST970:586:C2PY6ACXX:1:1115:10000:3435)
    at net.sf.picard.sam.AbstractAlignmentMerger.mergeAlignment(AbstractAlignmentMerger.java:332)
    at net.sf.picard.sam.SamAlignmentMerger.mergeAlignment(SamAlignmentMerger.java:156)
    at net.sf.picard.sam.MergeBamAlignment.doWork(MergeBamAlignment.java:236)
    at net.sf.picard.cmdline.CommandLineProgram.instanceMain(CommandLineProgram.java:177)
    at net.sf.picard.sam.MergeBamAlignment.main(MergeBamAlignment.java:205)

    I even tried merging my unaligned bam file with a sorted version of my aligned bam file (I tried both using coordinate sorted and queryname). In each try I get the same exact error. I am using the latest version of Picard and I can find nothing else on the internet that has solved my problem. Thanks in advance for any suggestions.

  • #2
    I moved my files to a different server, used the same commands, with the same version of picard and now I am getting a different error.

    It appears that the merge almost finishes but then something happens.

    [Mon Nov 18 10:15:34 EST 2013] net.sf.picard.sam.MergeBamAlignment done. Elapsed time: 27.55 minutes.
    Runtime.totalMemory()=5144641536
    To get help, see http://picard.sourceforge.net/index.shtml#GettingHelp
    Exception in thread "main" java.lang.NullPointerException
    at net.sf.picard.sam.AbstractAlignmentMerger.updateCigarForTrimmedOrClippedBases(AbstractAlignmentMerger.java:529)
    at net.sf.picard.sam.AbstractAlignmentMerger.transferAlignmentInfoToFragment(AbstractAlignmentMerger.java:418)
    at net.sf.picard.sam.AbstractAlignmentMerger.transferAlignmentInfoToPairedRead(AbstractAlignmentMerger.java:432)
    at net.sf.picard.sam.AbstractAlignmentMerger.mergeAlignment(AbstractAlignmentMerger.java:274)
    at net.sf.picard.sam.SamAlignmentMerger.mergeAlignment(SamAlignmentMerger.java:156)
    at net.sf.picard.sam.MergeBamAlignment.doWork(MergeBamAlignment.java:236)
    at net.sf.picard.cmdline.CommandLineProgram.instanceMain(CommandLineProgram.java:177)
    at net.sf.picard.sam.MergeBamAlignment.main(MergeBamAlignment.java:205)

    Please help. I am out of ideas for this.

    Comment


    • #3
      At least one of the bam files may not be sorted in precisely the manner Picard expects. You could try removing that assumption with the Picard parameter "ASSUME_SORTED=false".

      Or try "samtools sort" on each bam followed by a "samtools merge", instead of Picard.

      Only the GSnap alignment, and not the unaligned reads, will be relevant when running Picard's MarkDuplicates anyway. Duplicates are calculated from aligned positions, not the content of the sequences.

      Comment

      Latest Articles

      Collapse

      • 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
      • 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

      ad_right_rmr

      Collapse

      News

      Collapse

      Topics Statistics Last Post
      Started by seqadmin, Today, 08:47 AM
      0 responses
      9 views
      0 likes
      Last Post seqadmin  
      Started by seqadmin, 04-11-2024, 12:08 PM
      0 responses
      60 views
      0 likes
      Last Post seqadmin  
      Started by seqadmin, 04-10-2024, 10:19 PM
      0 responses
      57 views
      0 likes
      Last Post seqadmin  
      Started by seqadmin, 04-10-2024, 09:21 AM
      0 responses
      53 views
      0 likes
      Last Post seqadmin  
      Working...
      X