Header Leaderboard Ad

Collapse

Picard MergeBam Alignment issue

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
        How RNA-Seq is Transforming Cancer Studies
        by seqadmin



        Cancer research has been transformed through numerous molecular techniques, with RNA sequencing (RNA-seq) playing a crucial role in understanding the complexity of the disease. Maša Ivin, Ph.D., Scientific Writer at Lexogen, and Yvonne Goepel Ph.D., Product Manager at Lexogen, remarked that “The high-throughput nature of RNA-seq allows for rapid profiling and deep exploration of the transcriptome.” They emphasized its indispensable role in cancer research, aiding in biomarker...
        09-07-2023, 11:15 PM
      • seqadmin
        Methods for Investigating the Transcriptome
        by seqadmin




        Ribonucleic acid (RNA) represents a range of diverse molecules that play a crucial role in many cellular processes. From serving as a protein template to regulating genes, the complex processes involving RNA make it a focal point of study for many scientists. This article will spotlight various methods scientists have developed to investigate different RNA subtypes and the broader transcriptome.

        Whole Transcriptome RNA-seq
        Whole transcriptome sequencing...
        08-31-2023, 11:07 AM

      ad_right_rmr

      Collapse

      News

      Collapse

      Topics Statistics Last Post
      Started by seqadmin, Yesterday, 09:05 AM
      0 responses
      14 views
      0 likes
      Last Post seqadmin  
      Started by seqadmin, 09-21-2023, 06:18 AM
      0 responses
      11 views
      0 likes
      Last Post seqadmin  
      Started by seqadmin, 09-20-2023, 09:17 AM
      0 responses
      13 views
      0 likes
      Last Post seqadmin  
      Started by seqadmin, 09-19-2023, 09:23 AM
      0 responses
      28 views
      0 likes
      Last Post seqadmin  
      Working...
      X