This is a test version of Biostars. For the public version, visit https://www.biostars.org.
SortSam is failing due to Error Parsing SAM file: ("Tag of type i should have signed decimal value")

I am attempting doing variant-calling on a genomic sample, however it failed at the SortSam step due to the following:

Exception in thread "main" htsjdk.samtools.SAMFormatException: Error parsing text SAM file. Tag of type i should have signed decimal value; File HBCC-DNA-CER-13309.sam; Line 124767604

Line: E00218:353:HC32YALXX:5:2212:7395:55227    83  chr20   27310902    0   151M    =   27310664    -389    GAGCGCTTTCAGGACGACGGTGAAAATGGAAATATCTTCCAAGAAAATCTGGATAGAAGCAATGTCAGAAACTTTTCTGTGATGGATCTACTCAGCTAACAGAGTTGAACCTTTCTTTTGAGAGAGCAGTTTTGCAACACTCTTTTTGTGG ?=<7>@@@??@>>>9>>9>>>>???>>>6??>?=>??>>>??>???>>>>===>>=>>==>=====>=>>=>>>>=>==========>>=>==>=>>>==>=>=>=<>===>>=>=>=<==<=<==<==>=>===>===>=>>>>??=><> NM:i:1  MD:Z:50A100 AS:i

I'm not familiar with this issue. How do I resolve it?

genome sort sam sam picard

1 answer

use the parameter : VALIDATION_STRINGENCY=LENIENT

or just use

samtools sort

This may fix it. But looking at the record posted by the OP, the AS tag doesn't have an associated value, which is odd and maybe should be investigated. Maybe the file is corrupted...?

what is the version of bwa mem ? how was the bam file post-processed ?

Log in to answer this question.