Problem in merging two BAM file in Galaxy. Thanks for help.
Hi All, I tried many times to merge two BAM files (3.3 GB and 7.7MB) using different versions of Galaxy. But every time I only got an empty file and it showed some info like this: [Wed Sep 14 08:56:06 EDT 2011] net.sf.picard.sam.MergeSamFiles done. Elapsed time: 0.02 minutes. Runtime.totalMemory()=310116352 Exception in thread "main" java.lang.IllegalArgumentException: Cannot add sequence that already exists in SAMSequenceDictionary: contig00311 at net.sf.samtools.SAMSequenceDictionary.setSequences(SAMSequenceDictionary.java:62) at net.sf.samtools.SAMSequenceDictionary.<init>(SAMSequenceDictionary.java:40) at net.sf.samtools.SAMTextHeaderCodec.decode(SAMTextHeaderCodec.java:106) at net.sf.samtools.BAMFileReader.readHeader(BAMFileReader.java:364) at net.sf.samtools.BAMFileReader.<init>(BAMFileReader.java:118) at net.sf.samtools.BAMFileReader.<init>(BAMFileReader.java:97) at net.sf.samtools.SAMFileReader.init(SAMFileReader.java:504) at net.sf.samtools.SAMFileReader.<init>(SAMFileReader.java:165) at net.sf.samtools.SAMFileReader.<init>(SAMFileReader.java:120) at net.sf.picard.sam.MergeSamFiles.doWork(MergeSamFiles.java:100) at net.sf.picard.cmdline.CommandLineProgram.instanceMain(CommandLineProgram.java:175) at net.sf.picard.sam.MergeSamFiles.main(MergeSamFiles.java:84) Does anybody have the similar problem and thanks for any suggestion in handling this issue. Best wishes, Bin
Hello Bin, The tools under "NGS: Picard (beta) -> BAM/SAM Cleaning" can help to label the reads with the same identifier in the two SAM files appropriately so that they do not trigger this type of error. Specifically, the reads need to be assigned to different run groups. Hopefully this helps, Jen Galaxy team On 9/27/11 8:52 AM, Binbin You wrote:
Hi All,
I tried many times to merge two BAM files (3.3 GB and 7.7MB) using different versions of Galaxy. But every time I only got an empty file and it showed some info like this:
[Wed Sep 14 08:56:06 EDT 2011] net.sf.picard.sam.MergeSamFiles done. Elapsed time: 0.02 minutes. Runtime.totalMemory()=310116352 Exception in thread "main" java.lang.IllegalArgumentException: Cannot add sequence that already exists in SAMSequenceDictionary: contig00311 at net.sf.samtools.SAMSequenceDictionary.setSequences(SAMSequenceDictionary.java:62) at net.sf.samtools.SAMSequenceDictionary.<init>(SAMSequenceDictionary.java:40) at net.sf.samtools.SAMTextHeaderCodec.decode(SAMTextHeaderCodec.java:106) at net.sf.samtools.BAMFileReader.readHeader(BAMFileReader.java:364) at net.sf.samtools.BAMFileReader.<init>(BAMFileReader.java:118) at net.sf.samtools.BAMFileReader.<init>(BAMFileReader.java:97) at net.sf.samtools.SAMFileReader.init(SAMFileReader.java:504) at net.sf.samtools.SAMFileReader.<init>(SAMFileReader.java:165) at net.sf.samtools.SAMFileReader.<init>(SAMFileReader.java:120) at net.sf.picard.sam.MergeSamFiles.doWork(MergeSamFiles.java:100) at net.sf.picard.cmdline.CommandLineProgram.instanceMain(CommandLineProgram.java:175) at net.sf.picard.sam.MergeSamFiles.main(MergeSamFiles.java:84)
Does anybody have the similar problem and thanks for any suggestion in handling this issue.
Best wishes,
Bin
___________________________________________________________ The Galaxy User list should be used for the discussion of Galaxy analysis and other features on the public server at usegalaxy.org. Please keep all replies on the list by using "reply all" in your mail client. For discussion of local Galaxy instances and the Galaxy source code, please use the Galaxy Development list:
http://lists.bx.psu.edu/listinfo/galaxy-dev
To manage your subscriptions to this and other Galaxy lists, please use the interface at:
-- Jennifer Jackson http://usegalaxy.org http://galaxyproject.org/Support
participants (2)
-
Binbin You
-
Jennifer Jackson