Hi all,
I am using BWA to align pair-end read to hg19 genome.
Command line are as follows:
bwa aln $ref_dir/hg19 -t 4 $work_dir/${sample}_human_1.fastq.gz > $sai_dir/${sample}_1.sai
bwa aln $ref_dir/hg19 -t 4 $work_dir/${sample}_human_2.fastq.gz > $sai_dir/${sample}_2.sai
bwa sampe -r "@RG\tID:$sample\tLB:$sample\tSM:$sample\tPL:ILLUMINA" $ref_dir/hg19 $sai_dir/${sample}_1.sai $sai_dir/${sample}_2.sai $work_dir/${sample}_human_1.fastq.gz $work_dir/${sample}_human_2.fastq.gz | gzip > $sam_dir/$sample.sam.gz
However, some lines in the generated sam file are missing the "QNAME" field, starting from the FLAG field directly. As a result, the downstream command such as converting sam to bam cannot be done, giving information such as "Error parsing text SAM file. Not enough fields".
I wonder if it is the problem of bwa, or the problem of my fastq files?
Thanks in advance for your suggestions!
I am using BWA to align pair-end read to hg19 genome.
Command line are as follows:
bwa aln $ref_dir/hg19 -t 4 $work_dir/${sample}_human_1.fastq.gz > $sai_dir/${sample}_1.sai
bwa aln $ref_dir/hg19 -t 4 $work_dir/${sample}_human_2.fastq.gz > $sai_dir/${sample}_2.sai
bwa sampe -r "@RG\tID:$sample\tLB:$sample\tSM:$sample\tPL:ILLUMINA" $ref_dir/hg19 $sai_dir/${sample}_1.sai $sai_dir/${sample}_2.sai $work_dir/${sample}_human_1.fastq.gz $work_dir/${sample}_human_2.fastq.gz | gzip > $sam_dir/$sample.sam.gz
However, some lines in the generated sam file are missing the "QNAME" field, starting from the FLAG field directly. As a result, the downstream command such as converting sam to bam cannot be done, giving information such as "Error parsing text SAM file. Not enough fields".
I wonder if it is the problem of bwa, or the problem of my fastq files?
Thanks in advance for your suggestions!
Comment