So I've got paired-end read files: s1_R1.fq and s1_R2.fq
- I align to some indexed reference with:
bwa aln "index_prefix" "s1_R1.fq" "s1_R2.fq" > s1.sai
- convert to sam:
bwa samse "index_prefix" "s1.sai" "s1_R1.fq" "s1_R2.fq" > s1.sam
- pull aligned reads only into bam format:
samtools view -Sb -F0x4 "s1.sam" > s1.al.bam
- convery bam to fastq
samtools bam2fq "s1.al.bam" > s1.al.fastq
Now my questions stem from this; when I convert the "s1.al.bam" to a fastq, I get a single fastq.
Are the paired reads effectively merged into a single end read from the alignment step (or from using samse in step2)?
Should I be using 'sampe' in step 2?
If so, how are the reads in the resulting fastq file from this arranged? Still as merged single end? Interleaved? Separate files from a different tool?
The description of sampe throws me a bit "Generate alignments in the SAM format given paired-end reads. Repetitive read pairs will be placed randomly."