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 Multi-Fasta Problem

ValjaValja GermanyMember Posts: 2

Hi!

I have a problem running Picard's CollectAlignmentSummaryMetrics: I aligned Illumina paired-end reads (processed with Trimmomatic) against a genome from NCBI RefSeq (GCF_000187205.2_ASM18720v4) using BWA (bwa-0.7.8). The reference is a multifasta with NC_017847, NC_017848 and NC_020524. Then a SAM file was created and I called Picard's SortSam, MarkDuplicates and CollectAlignmentSummaryMetrics:

java -jar picard-tools-1.119/SortSam.jar INPUT=mapped.sam OUTPUT=mapped_sorted.bam SORT_ORDER=coordinate VALIDATION_STRINGENCY=LENIENT
java -jar picard-tools-1.119/MarkDuplicates.jar INPUT=mapped_sorted.bam METRICS_FILE=dedup_metrics.txt OUTPUT=mapped_sorted_dedup.bam VALIDATION_STRINGENCY=LENIENT
java -jar picard-tools-1.119/CollectAlignmentSummaryMetrics.jar INPUT=mapped_sorted_dedup.bam R=GCF_000187205.2_ASM18720v4.fa O=alignment_metrics.txt VALIDATION_STRINGENCY=LENIENT

The error is Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: -1 after calling CollectAlignmentSummaryMetrics. So, I thought it would be a good idea to check the SAM file, ran

java -jar picard-tools-1.119/ValidateSamFile.jar I=mapped_sorted_dedup.bam REFERENCE_SEQUENCE=GCF_000187205.2_ASM18720v4.fa

and got

ERROR: Record 1, Read name HWI-ST751:181:C3VLMACXX:3:2106:15520:100263, Mate Alignment start should != 0 because reference name != *.
ERROR: Record 1, Read name HWI-ST751:181:C3VLMACXX:3:2106:15520:100263, Alignment start should != 0 because reference name != *.
[...]
Exception in thread "main" htsjdk.samtools.SAMException: Exception counting mismatches for read HWI-ST751:181:C3VLMACXX:3:2106:15520:100263 1/2 101b aligned read.

Removing this read and another two reads causing the same error from the BAM file finally worked. These problematic reads have the following entries in the BAM file:

HWI-ST751:181:C3VLMACXX:3:2106:15520:100263 73  NC_017847   0   37  101M    =   0   0   ATTTAAAATCTTTTCTTTTTTTCTTTTAGAGGGCCTGAAACGATTGCTAATAAATGCTTTGAAAGCCTATTAAGGTACAAAAACTCCGTTTCAGCGGTACA   BCCFFFFFGHHHHJIJJJJJJJJJJJJIIJJIBHHHIGEGJJJJJIJJJJJJJJJJIIJJJJHHHHHFFFFFFFDEEEEEDDDDCCDDACDDECDDDDDBD   X0:i:1  X1:i:0  MD:Z:0  PG:Z:MarkDuplicates RG:Z:C5120-5141_R   XG:i:0  AM:i:0  NM:i:0  SM:i:37 XM:i:4  XO:i:0  XT:A:U
HWI-ST751:181:C3VLMACXX:3:2106:15520:100263 133 NC_017847   0   0   *   =   0   0   GAATATTTGTACCGTAATTAAAACTTTTTGTACCGTTAAAACGGAGTATTTGTACCGCTGAAACGGAGTTTTTGTACCTTAATAGGCTTTCAAAGCATTTA   CCCFFFFFHHHHHJIIJJJIJJJJJJJJJJFIIIJJJJJJJJJJIJ7BGIHGFHIJJJJGFIHHHHDD;AEEDDDEEDDDDDEEDCDDDDDDDDDDDDDD@   PG:Z:MarkDuplicates RG:Z:C5120-5141_R

HWI-ST751:181:C3VLMACXX:3:1205:16810:95215 113 NC_017847   0   37  97M NC_020524   18  0   CCGCTGAAACGGAGTTTTTGTACCTTAATAGGCTTTCAAAGCATTTATTAGCAATCGTTTCAGGCCCTCTAAAAGAAAAAAAGAAAAGATTTTAAAT   5.:;@:9CB<>@>>?;(>6666@EEDDC?76CHEHFIHGHHF;HCFF=4B9;GHE?GAB???::)9GEE>IIHIGGBGIC?@>GDD>FD:DDDD@@;   X0:i:1  X1:i:0  MD:Z:0  PG:Z:MarkDuplicates RG:Z:C5120-5141_R   XG:i:0  AM:i:37 NM:i:0  SM:i:37 XM:i:1  XO:i:0  XT:A:U
HWI-ST751:181:C3VLMACXX:3:1205:16810:95215  177 NC_020524   18  37  101M    NC_017847   0   0   TTTAACGGTACAAAAAGTTTTAATTACGGTACAAATATTCCTTTTTAACGGTACAAAAATTCTGGCCTTTAATTTCAATAGCTTAAAAGGTACAAAAATTC   A8<<,;:3A?8ABBA>>CBBDB?<DDFFEC;FEFEE>FAF@>B@CFFFD?99?6IEFFFBF=FBC:<IIHDC@IEFEHEDDADDFEIGDFC2D?B:DB:<?   X0:i:1  X1:i:0  MD:Z:101    PG:Z:MarkDuplicates RG:Z:C5120-5141_R   XG:i:0  AM:i:37 NM:i:0  SM:i:37 XM:i:0  XO:i:0  XT:A:U

HWI-ST751:181:C3VLMACXX:3:2215:21036:11255 177 NC_017847   0   37  101M    NC_020524   135 0   TACCGCTGAAACGGAGTTTTTGTACCTTAATAGGCTTTCAAAGCATTTATTAGCAATCGTTTCAGGCCCTCTAAAAGAAAAAAAGAAAAGATTTTAAATTC   9BDDCDEDDDDDDDDDDDDDDEC>C>EDFFFFFHHHHHHJJJIGIIGIIH@IJIJJJJIIJIIIJIGIIIHGJJJJIJJJJJJJIJJJHHHHHFFFFFBB@   X0:i:1  X1:i:0  MD:Z:0  PG:Z:MarkDuplicates RG:Z:C5120-5141_R   XG:i:0  AM:i:37 NM:i:0  SM:i:37 XM:i:2  XO:i:0  XT:A:U
HWI-ST751:181:C3VLMACXX:3:2215:21036:11255  113 NC_020524   135 37  101M    NC_017847   0   0   ACGGTACATTTTCTCCGTTAAAAGTCCTATAAAGGTACAAAAACTCCGAATAAGTACCTTTTAAAGCCATTTTTCCATTAACTTAAAGAATACATAAAAGG   DDDEEFDDDDD@CADFFFFFGHFGHIJJIJJJJJIJJJJJIHDIGJJJJJJJIGFDIJJIIHJJIIJJIIJJIJIJHJ9IJJJJJJJJHHHHHFFFFFCCC   X0:i:1  X1:i:0  MD:Z:101    PG:Z:MarkDuplicates RG:Z:C5120-5141_R   XG:i:0  AM:i:37 NM:i:0  SM:i:37 XM:i:0  XO:i:0  XT:A:U

As far as I can see, I would say that the problem is that the reads are mapped to different reference sequences (at least the two last ones). Is there a way to avoid this problem when using Picard?

Thanks in advance!

Tagged:

Comments

  • ValjaValja GermanyMember Posts: 2

    After updating all used tools to their newest version there are no errors or exceptions any more. At least for this reference genome and the used sample.

    Just in case someone needs it: The following software versions worked for me:

    bwa-0.7.12
    samtools-1.2
    picard-tools-1.119
    GenomeAnalysisTK-3.5
  • Geraldine_VdAuweraGeraldine_VdAuwera Cambridge, MAMember, Administrator, Broadie Posts: 11,388 admin

    Glad to hear your problem was solved by upgrading to the latest versions!

    Geraldine Van der Auwera, PhD

Sign In or Register to comment.