This is a test version of Biostars. For the public version, visit https://www.biostars.org.
GATK ValidateSamFile error

Hi everyone, I am running a DNA seq analysis using FASTQ file. After running cutadapt for adapter removal and bwa for alignment i have got a bam file. Running the bam file through gatk ValidateSamFile gives me these two errors. MISMATCH_SEQ_QUAL_LENGTH and MISMATCH_READ_LENGTH_AND_QUALS_LENGTH. I would be thankful if someone can tell me how to fix these errors. Thanks.

ngs validatesamfile gatk mismatch_seq_qual_length

Please show us all your commands and the outputs from all of them.

Hello Ram,

Thanks for reply.

This is all the commands I am using with the error msg at the end

fastqc $fastq_file_folder_path/$file_name.fastq
cutadapt -a ATTCGGAT -q 20 --length 36 --minimum-length 20 -o $fastq_file_folder_path/$file_name.ca1.fastq $fastq_file_folder_path/$file_name.fastq     
sed -E "s/^((@|\+)SRR[^.]+\.[^.]+)\.(1|2)/\1/" $fastq_file_folder_path/$file_name.ca1.fastq  > $fastq_file_folder_path/$file_name.ca2.fastq 
/Users/sabeen/development/bwa/bwa aln -t 4 $fastq_file_folder_path/hg19bwaidx $fastq_file_folder_path/$file_name.ca2.fastq > $fastq_file_folder_path/$file_name.ca3.txt.bwa
/Users/sabeen/development/bwa/bwa samse $fastq_file_folder_path/hg19bwaidx $fastq_file_folder_path/$file_name.ca3.txt.bwa $fastq_file_folder_path/$file_name.ca2.fastq > $fastq_file_folder_path/$file_name.ca4.txt.sam
samtools view -h -S $fastq_file_folder_path/$file_name.ca4.txt.sam > $fastq_file_folder_path/$file_name.ca5.bam
gatk ValidateSamFile  -I $fastq_file_folder_path/$file_name.ca5.bam -MODE SUMMARY


HISTOGRAM   java.lang.String
Error Type  Count
ERROR:MISMATCH_READ_LENGTH_AND_QUALS_LENGTH 1
ERROR:MISMATCH_SEQ_QUAL_LENGTH  1
ERROR:MISSING_READ_GROUP    1
WARNING:MISSING_TAG_NM  1
WARNING:RECORD_MISSING_READ_GROUP   31797614

1 answer

Ok I got the problem solved. I was using SED in the beginning after cutadapt.

If I don't use that and go directly from cutadapt to BWA aln then I am not getting this error of Missing_Read_length

Log in to answer this question.