The current GATK version is 3.7-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!

Did you remember to?


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!


Surround blocks of code, error messages and BAM/VCF snippets--especially content with hashes (#)--with lines with three backticks ( ``` ) each to make a code block.
Powered by Vanilla. Made with Bootstrap.
Picard 2.9.0 is now available. Download and read release notes here.
GATK 3.7 is here! Be sure to read the Version Highlights and optionally the full Release Notes.

Picard ViewSam Performance

ayangayang TorontoMember Posts: 2
edited June 2016 in Ask the GATK team

Hi,

I have been playing around with the latest Picard Tools build (2.4.1) with the intention of eventually using HTSJDK directly to manipulate SAM/BAM/CRAM files. I've found that when I run the ViewSam Picard Tool on a CRAM, it takes a very long time to run. In this example, my "interval.txt" contains a single range 7:169000-170000 that has been converted from a Bed file into an Interval file with a SequenceDictionary I constructed from a FASTA file.

Running the same query in SamTools 1.3.1 View is extremely quick - a matter of seconds. The ViewSam Picard Tool takes 33 minutes.

java -jar /picard-tools-2.4.1/picard.jar ViewSam INPUT=sample.cram INTERVAL_LIST=interval.txt REFERENCE_SEQUENCE=genome.fa

[Wed Jun 22 20:41:31 UTC 2016] picard.sam.ViewSam INPUT=sample.cram INTERVAL_LIST=interval.txt REFERENCE_SEQUENCE=genome.fa ALIGNMENT_STATUS=All PF_STATUS=All HEADER_ONLY=false RECORDS_ONLY=false VERBOSITY=INFO QUIET=false VALIDATION_STRINGENCY=STRICT COMPRESSION_LEVEL=5 MAX_RECORDS_IN_RAM=500000 CREATE_INDEX=false CREATE_MD5_FILE=false GA4GH_CLIENT_SECRETS=client_secrets.json

Running this on the BAM version of the file also takes a long time. The sample CRAM file I'm testing with is approximately 88 GB. Both my reference file and my CRAM file are indexed (I have genome.fa.fai and sample.cram.crai in the same directory as genome.fa and sample.cram)

What factors might be contributing to the long processing time? Are there additional parameters I should be specifying? Or is this expected due to how ViewSam is implemented. I haven't gone through the source code yet - I guess I'm hoping for a quick sanity check before committing time to chasing this down.

Thanks,
Andy

Tagged:

Answers

  • Geraldine_VdAuweraGeraldine_VdAuwera Administrator, Dev Posts: 11,163 admin

    Hmm, that's a surprising observation, at least to me. Maybe try relaxing the validation stringency, in case it's due to the validation checks? That's the most obvious difference I can think of relative to samtools view.

    If that doesn't explain what you're seeing, and since it's more a developer question, I would recommend reposting it as an issue in the Picard repository on GitHub.

    Geraldine Van der Auwera, PhD

  • ayangayang TorontoMember Posts: 2

    Thanks for the suggestion. I set VALIDATION_ to SILENT but it still took the same time. I've reposted the question as a Picard issue in Github

Sign In or Register to comment.