We've moved!
This site is now read-only. You can find our new documentation site and support forum for posting questions here.
Be sure to read our welcome blog!

picard CollectTargetedPcrMetrics.jar error

I was trying to use picard-tools-1.119/CollectTargetedPcrMetrics.jar, got errors:
I=1.bam O=targetPCRmetrics.txt AI=fullintervals TI=noprimerintervals R=.../ftp.broadinstitute.org/bundle/2.8/hg19/ucsc.hg19.fasta PER_TARGET_COVERAGE=perTargetCov.txt

[Wed Dec 16 15:45:13 CST 2015] picard.analysis.directed.CollectTargetedPcrMetrics done. Elapsed time: 0.00 minutes.
Runtime.totalMemory()=504889344
To get help, see http://picard.sourceforge.net/index.shtml#GettingHelp
Exception in thread "main" htsjdk.samtools.SAMException: Invalid interval record contains 1 fields: chr1 43814951 43815064
at htsjdk.samtools.util.IntervalList.fromReader(IntervalList.java:338)
at htsjdk.samtools.util.IntervalList.fromFile(IntervalList.java:277)
at htsjdk.samtools.util.IntervalList.fromFiles(IntervalList.java:293)
at picard.analysis.directed.CollectTargetedMetrics.doWork(CollectTargetedMetrics.java:87)
at picard.cmdline.CommandLineProgram.instanceMain(CommandLineProgram.java:183)
at picard.analysis.directed.CollectTargetedPcrMetrics.main(CollectTargetedPcrMetrics.java:50)

The ref and bed file used to generate the interval files both had 'chr' in the chromosome field. Why did I get this error? Thanks!

Answers

  • Geraldine_VdAuweraGeraldine_VdAuwera Cambridge, MAMember, Administrator, Broadie admin

    Check if the separator between the chr1 and the positions is made of a space or a tab. If it's a space, you need to change it to a tab.

  • wchenwchen Member

    Changed it to tab, now new error:
    Exception in thread "main" htsjdk.samtools.SAMException: Invalid interval record contains 3 fields: chr1 43814951 43815064
    at htsjdk.samtools.util.IntervalList.fromReader(IntervalList.java:338)
    at htsjdk.samtools.util.IntervalList.fromFile(IntervalList.java:277)
    at htsjdk.samtools.util.IntervalList.fromFiles(IntervalList.java:293)
    at picard.analysis.directed.CollectTargetedMetrics.doWork(CollectTargetedMetrics.java:87)
    at picard.cmdline.CommandLineProgram.instanceMain(CommandLineProgram.java:183)
    at picard.analysis.directed.CollectTargetedPcrMetrics.main(CollectTargetedPcrMetrics.java:50)

  • SheilaSheila Broad InstituteMember, Broadie admin

    @wchen
    Hi,

    It looks like your interval file is malformed. You can use Picard's BedToIntervalList to create a properly formatted file.

    -Sheila

Sign In or Register to comment.