Question: Picard MarkDuplicates from bam files
0
gravatar for bandanaschapagain
12 weeks ago by
bandanaschapagain30 wrote:

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.

sequence next-gen picard • 223 views
ADD COMMENTlink modified 12 weeks ago • written 12 weeks ago by bandanaschapagain30

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

ADD REPLYlink written 12 weeks ago by Pierre Lindenbaum134k

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 REPLYlink written 12 weeks ago by bandanaschapagain30

what is the output of

samtools view -c Input.bam

?

ADD REPLYlink written 12 weeks ago by Pierre Lindenbaum134k

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

ADD REPLYlink written 12 weeks ago by bandanaschapagain30

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 REPLYlink modified 12 weeks ago • written 12 weeks ago by bandanaschapagain30
0
gravatar for bandanaschapagain
12 weeks ago by
bandanaschapagain30 wrote:

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 COMMENTlink written 12 weeks ago by bandanaschapagain30
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1925 users visited in the last hour
_