The current GATK version is 3.8-0
Examples: Monday, today, last week, Mar 26, 3/26/04

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Get notifications!

You can opt in to receive email notifications, for example when your questions get answered or when there are new announcements, by following the instructions given here.

Got a problem?

1. Search using the upper-right search box, e.g. using the error message.
2. Try the latest version of tools.
3. Include tool and Java versions.
4. Tell us whether you are following GATK Best Practices.
5. Include relevant details, e.g. platform, DNA- or RNA-Seq, WES (+capture kit) or WGS (PCR-free or PCR+), paired- or single-end, read length, expected average coverage, somatic data, etc.
6. For tool errors, include the error stacktrace as well as the exact command.
7. For format issues, include the result of running ValidateSamFile for BAMs or ValidateVariants for VCFs.
8. For weird results, include an illustrative example, e.g. attach IGV screenshots according to Article#5484.
9. For a seeming variant that is uncalled, include results of following Article#1235.

Did we ask for a bug report?

Then follow instructions in Article#1894.

Formatting tip!

Wrap blocks of code, error messages and BAM/VCF snippets--especially content with hashes (#)--with lines with three backticks ( ``` ) each to make a code block as demonstrated here.

Jump to another community
Download the latest Picard release at
GATK version 4.beta.3 (i.e. the third beta release) is out. See the GATK4 beta page for download and details.

Picard tools MarkDuplicates using cram format ...How to pass A valid CRAM reference?

Hello there!

I am trying to use picard tools to mark duplicates using a cram format file; however I could not find any documentation to address this problem. How can I pass a valid CRAM reference?

Thanks in advance,


[Sat Feb 06 16:09:42 CST 2016] Executing as antunes@gpu10 on Linux 2.6.32-431.29.2.el6.x86_64 amd64; Java HotSpot(TM) 64-Bit Server VM 1.8.0_40-b26; Picard version: 2.1.0(25ebc07f7fbaa7c1a4a8e6c130c88c1d10681802_1454776546) IntelDeflater
[Sat Feb 06 16:09:42 CST 2016] picard.sam.markduplicates.MarkDuplicatesWithMateCigar done. Elapsed time: 0.00 minutes.
To get help, see
Exception in thread "main" java.lang.IllegalStateException: A valid CRAM reference was not supplied and one cannot be acquired via the property settings reference_fasta or use_cram_ref_download
at htsjdk.samtools.cram.ref.ReferenceSource.getDefaultCRAMReferenceSource(
at htsjdk.samtools.SamReaderFactory$
at picard.sam.markduplicates.util.AbstractMarkDuplicatesCommandLineProgram.openInputs(
at picard.sam.markduplicates.MarkDuplicatesWithMateCigar.doWork(
at picard.cmdline.CommandLineProgram.instanceMain(
at picard.cmdline.PicardCommandLine.instanceMain(
at picard.cmdline.PicardCommandLine.main(


Issue · Github
by Sheila

Issue Number
Last Updated
Closed By

Best Answer


  • SheilaSheila Broad InstituteMember, Broadie, Moderator


    I have to check with the team. We will get back to you shortly.


  • Hi Sheila, were you able to find something about this issue?



  • deklingdekling Broad InstituteMember
    edited February 2016

    Hi Lili: I too obtained the same result using MarkedDuplicates with a cram file. However, the tool works fine with an equivalent bam file. Thus, I would tentatively conclude that the support for cram in Picard is not ubiquitous. An easy workaround would be to convert your cram to a bam file using the "bam" command in cramtools. Let us know if this works.

  • la_br2016la_br2016 Member
    edited February 2016

    Hi @dekling

    This is exactly what I have been doing and it works fine.

    I was hoping to get this pipeline to not use bam file anymore (save space and it is easier to transfer files from servers) but Picard Markduplicate is the only exception for now.

    Any thoughts about Picard tools having CRAM support any time soon?

    Thanks for your feedback.


  • Geraldine_VdAuweraGeraldine_VdAuwera Cambridge, MAMember, Administrator, Broadie

    Hi @la_br2016,

    Picard tools do support CRAM. The underlying issue here is that CRAM, as a format, is entirely reference-based: only information that differs from the reference is stored in the file, so the CRAM's content is useless without a reference.

    I think that you should be able to provide the reference to MarkDuplicates using the REFERENCE_SEQUENCE argument, which according to the Picard docs is applicable to all Picard tools.

    Let us know if that doesn't work.

  • Hi @Geraldine_VdAuwera

    Yes! I did run passing the argument R=${REF} but it didn't recognize that argument and complained about it; I've also tried REFERENCE_SEQUENCE = ${REF} and gave the same error. (I don't have the error message file handy now but I can post later)

    I see that Picard tools in some application ask for reference option R= fasta; however under Markduplicates ( it does not have R= option. that was my understanding about CRAM format, having to provide the reference file... and GATK CRAM support (I was not sure about Picard Tool in its full extent - since MarkDuplicates didn't handle well) and it was the reason for this question; "How to pass A valid CRAM reference".



  • that will be super!

    Thanks a lot @Geraldine_VdAuwera

  • cdiaz81cdiaz81 Cambridge, UKMember

    Hello there,
    I wonder if there's any way around this issue as I am also having this same problem with markduplicates. I have tried adding the reference but it complains that "A valid CRAM reference was not supplied and one cannot be acquired via the property settings reference_fasta or use_cram_ref_download"
    Many thanks

  • SheilaSheila Broad InstituteMember, Broadie, Moderator


    I believe Geraldine has answered your question here.


Sign In or Register to comment.