Hi,
I am running Picard to get alignment stats on my bam file. However, I am getting the following error
[Fri Mar 04 10:54:28 EST 2016] picard.analysis.CollectAlignmentSummaryMetrics ADAPTER_SEQUENCE=[] REFERENCE_SEQUENCE=/mnt/twin/Rust/puccinia_striiformis_pst_78_1_transcripts.fasta INPUT=/mnt/twin/Rust/SWS484SPF_PBJ_ScaffoldsF500_compare_to_PST_sorted.bam OUTPUT=output.txt MAX_INSERT_SIZE=100000 EXPECTED_PAIR_ORIENTATIONS=[FR] METRIC_ACCUMULATION_LEVEL=[ALL_READS] IS_BISULFITE_SEQUENCED=false ASSUME_SORTED=true STOP_AFTER=0 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
[Fri Mar 04 10:54:28 EST 2016] Executing as surendraa@surendraa-HP-Z640-Workstation on Linux 3.19.0-25-generic amd64; Java HotSpot(TM) 64-Bit Server VM 1.8.0_74-b02; Picard version: 2.1.0(25ebc07f7fbaa7c1a4a8e6c130c88c1d10681802_1454776546) IntelDeflater
[Fri Mar 04 10:54:28 EST 2016] picard.analysis.CollectAlignmentSummaryMetrics done. Elapsed time: 0.01 minutes.
Runtime.totalMemory()=251658240
To get help, see http://broadinstitute.github.io/picard/index.html#GettingHelp
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 0
at picard.analysis.AlignmentSummaryMetricsCollector$GroupAlignmentSummaryMetricsPerUnitMetricCollector$IndividualAlignmentSummaryMetricsCollector.collectQualityData(AlignmentSummaryMetricsCollector.java:330)
at picard.analysis.AlignmentSummaryMetricsCollector$GroupAlignmentSummaryMetricsPerUnitMetricCollector$IndividualAlignmentSummaryMetricsCollector.addRecord(AlignmentSummaryMetricsCollector.java:195)
at picard.analysis.AlignmentSummaryMetricsCollector$GroupAlignmentSummaryMetricsPerUnitMetricCollector.acceptRecord(AlignmentSummaryMetricsCollector.java:127)
at picard.analysis.AlignmentSummaryMetricsCollector$GroupAlignmentSummaryMetricsPerUnitMetricCollector.acceptRecord(AlignmentSummaryMetricsCollector.java:93)
at picard.metrics.MultiLevelCollector$AllReadsDistributor.acceptRecord(MultiLevelCollector.java:192)
at picard.metrics.MultiLevelCollector.acceptRecord(MultiLevelCollector.java:315)
at picard.analysis.AlignmentSummaryMetricsCollector.acceptRecord(AlignmentSummaryMetricsCollector.java:89)
at picard.analysis.CollectAlignmentSummaryMetrics.acceptRead(CollectAlignmentSummaryMetrics.java:143)
at picard.analysis.SinglePassSamProgram.makeItSo(SinglePassSamProgram.java:138)
at picard.analysis.SinglePassSamProgram.doWork(SinglePassSamProgram.java:77)
at picard.cmdline.CommandLineProgram.instanceMain(CommandLineProgram.java:209)
at picard.cmdline.PicardCommandLine.instanceMain(PicardCommandLine.java:95)
at picard.cmdline.PicardCommandLine.main(PicardCommandLine.java:105)
The command I am running is
java -jar picard.jar CollectAlignmentSummaryMetrics R="/mnt/twin/Rust/puccinia_striiformis_pst_78_1_transcripts.fasta" I=/mnt/twin/Rust/SWS484SPF_PBJ_ScaffoldsF500_compare_to_PST_sorted.bam O=output.txt
Any help you can provide would be greatly appreciated, Ann
It looks like the quality scores in your BAM are out of the range of what the tool can handle. Can you please paste the output of the following command?
I want to take a look at the quality score strings in your BAM.
I had the same error, using
samtools view mysorted.bam | head | cut -f 5
the quality result
60 60 60 60 0 60 60 60 60 39
any clue?
Those are the MAPQ scores for the read. I'm suggesting that the ASCII-encoded Phred quality scores are out of range. I'm basing that on the source, specifically the
collectQualityData
method referenced in the trace.Would you mind posting the output of your command, minus the
cut
?Hmmm, there are no ASCII-encoded per-base quality scores in the result. I wonder if that's the problem. Here's what a read with those present would look like:
Two questions:
-Does your job fail immediately?
-What aligner are you using?
the job fail immediately, aligner bwa-mem, the aligned reads were fasta reads no quality associated with it (actually it is contigs)