ah okay, thanks. How will I know which is forward, and which is reverse?
Hi,
My command is:
bowtie2 -x bowtie.db -1 $sample.host.removed.R1.fastq -2 $sample.host.removed.R2.fastq -S $sample.consensus.align.sam
It outputs a SAM file with read IDs like:
M03972:384:000000000-KDHHW:1:1101:22168:9677
However, in the input reads files there is a /1 or /2 on the end of the read. Is there a way of printing this to the SAM file?
1 answer
The SAM flag will contain the information on whether the read is from file 1 or file 2.
The SAM spec explicitly notes that read names must be identical for them to be considered paired.
Reads/segments having identical QNAME are regarded to come from the same template
The /1 and /2 naming scheme comes from an older generation of instruments and is an artifact of the past.
it is not forward or reverse, it is read 1 and read 2, or first in pair and second in pair,
alas, calling them as forward and reverse is very common, even in training materials ... so I understand why call them that way
forward and reverse represents the orientation of the alignment; either pair may align forward or reverse - read1 and read 2 indicate which file the reads come from. Using:
samtools flags
will list the flag meaning:
0x1 1 PAIRED paired-end / multiple-segment sequencing technology
0x2 2 PROPER_PAIR each segment properly aligned according to aligner
0x4 4 UNMAP segment unmapped
0x8 8 MUNMAP next segment in the template unmapped
0x10 16 REVERSE SEQ is reverse complemented
0x20 32 MREVERSE SEQ of next segment in template is rev.complemented
0x40 64 READ1 the first segment in the template
0x80 128 READ2 the last segment in the template
0x100 256 SECONDARY secondary alignment
0x200 512 QCFAIL not passing quality controls or other filters
0x400 1024 DUP PCR or optical duplicate
0x800 2048 SUPPLEMENTARY supplementary alignment
you can see that 64 and 128 are READ1 and READ2
Log in to answer this question.