Picard MarkDuplicates from bam files
1
0
Entering edit mode
4.0 years ago

Hi, I am using Picard to find duplicate reads. My command is:

java -jar  build/libs/picard.jar MarkDuplicates \
      I=Input.bam \
      O=marked_duplicate.bam \
      M=marked_dup_metrics.txt

I followed this syntax from here https://broadinstitute.github.io/picard/command-line-overview.html#MarkDuplicates I am getting the error which says that:

picard.sam.markduplicates.MarkDuplicates done. Elapsed time: 0.02 minutes.

But there is nothing in marked_duplicate.bam

I don't know what is th error. It would be helpful if I could get a lead.

Picard next-gen sequence • 3.6k views
ADD COMMENT
0
Entering edit mode

What is the version ?. It cannot be the only message. Picard first prints all the parameters.

ADD REPLY
0
Entering edit mode

Hi, picard version is picard-2.23.8 The error message includes MarkDuplicates option and also inclide the same webpage https://broadinstitute.github.io/picard/command-line-overview.html#MarkDuplicates.

ADD REPLY
0
Entering edit mode

what is the output of

samtools view -c Input.bam

?

ADD REPLY
0
Entering edit mode

Hi, with the above command I got this number 24556057 which means my input file contains these many alignments right?

ADD REPLY
0
Entering edit mode

To get help, see http://broadinstitute.github.io/picard/index.html#GettingHelp Exception in thread "main" java.lang.IllegalArgumentException: A reference must be supplied (reference sequence SAMSequenceRecord(name=AF396436.1,length=47577,dict_index=1158,assembly=null) not found). at htsjdk.samtools.cram.build.CRAMReferenceRegion.getReferenceBases(CRAMReferenceRegion.java:77) at htsjdk.samtools.cram.structure.Slice.normalizeCRAMRecords(Slice.java:450) at htsjdk.samtools.cram.structure.Container.getSAMRecords(Container.java:322) at htsjdk.samtools.CRAMIterator.nextContainer(CRAMIterator.java:112) at htsjdk.samtools.CRAMIterator.hasNext(CRAMIterator.java:204) at htsjdk.samtools.SamReader$AssertingIterator.hasNext(SamReader.java:591) at picard.sam.markduplicates.MarkDuplicates.buildSortedReadEndLists(MarkDuplicates.java:523) at picard.sam.markduplicates.MarkDuplicates.doWork(MarkDuplicates.java:257) at picard.cmdline.CommandLineProgram.instanceMain(CommandLineProgram.java:303) at picard.cmdline.PicardCommandLine.instanceMain(PicardCommandLine.java:103) at picard.cmdline. PicardCommandLine.main(PicardCommandLine.java:113)

This is the error I get all the time

ADD REPLY
1
Entering edit mode
4.0 years ago

I found the solution: I didn't sort my bam file and Picard was not taking in.So, I first sort that by coordinates.

ADD COMMENT

Login before adding your answer.

Traffic: 2377 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6