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
        Exploring the Dynamics of the Tumor Microenvironment
        by seqadmin




        The complexity of cancer is clearly demonstrated in the diverse ecosystem of the tumor microenvironment (TME). The TME is made up of numerous cell types and its development begins with the changes that happen during oncogenesis. “Genomic mutations, copy number changes, epigenetic alterations, and alternative gene expression occur to varying degrees within the affected tumor cells,” explained Andrea O’Hara, Ph.D., Strategic Technical Specialist at Azenta. “As...
        07-08-2024, 03:19 PM
      • seqadmin
        Exploring Human Diversity Through Large-Scale Omics
        by seqadmin


        In 2003, researchers from the Human Genome Project (HGP) announced the most comprehensive genome to date1. Although the genome wasn’t fully completed until nearly 20 years later2, numerous large-scale projects, such as the International HapMap Project and 1000 Genomes Project, continued the HGP's work, capturing extensive variation and genomic diversity within humans. Recently, newer initiatives have significantly increased in scale and expanded beyond genomics, offering a more detailed...
        06-25-2024, 06:43 AM

      ad_right_rmr

      Collapse

      News

      Collapse

      Topics Statistics Last Post
      Started by seqadmin, 07-10-2024, 07:30 AM
      0 responses
      23 views
      0 likes
      Last Post seqadmin  
      Started by seqadmin, 07-03-2024, 09:45 AM
      0 responses
      198 views
      0 likes
      Last Post seqadmin  
      Started by seqadmin, 07-03-2024, 08:54 AM
      0 responses
      209 views
      0 likes
      Last Post seqadmin  
      Started by seqadmin, 07-02-2024, 03:00 PM
      0 responses
      191 views
      0 likes
      Last Post seqadmin  
      Working...
      X