Interpreting Flags in SAM file
2
1
Entering edit mode
8.1 years ago
jayg ▴ 10

Hi,

I have Illumina pair ended reads mapped to contigs. All the pair ended reads have innie (------> <----------) orientation. I want to find orientation of contigs inferred from reads. Please see following cases

  1. When the read is first in pair and is mapped to forward strand:

----------------------------------> contig

------------> read

  1. When the read is first in pair and mapped to reverse strand:

<---------------------------- contig (rev complemented)

-----------> read

  1. When the read is second in pair and mapped to forward strand:

<---------------------------- contig (rev complemented)

<------------

  1. When the read is second in pair and mapped to reverse strand:

------------------------------> contig

<------------ read

Is the correct way to interpret?

Thank you very much.

SAM Assembly Illumina • 1.9k views
ADD COMMENT
1
Entering edit mode

It is not entirely clear what you are asking:

samtools flags

will tell you all the flags that you can use. Then you can add that to the -F and/or -f as needed (you can combine into a single number but sometimes is more explicit to list each separately). For example reads that are: mapped, first in pair, forward strand

-F 4 -f 64 -F 16
ADD REPLY
1
Entering edit mode
8.1 years ago

you're wrong with first and second in pair: first and second means that if the read comes from a paired-end experiment (output was something like R1.fastq.gz and R2.fastq.gz), then "1st in pair" was a read from R1.fastq.gz and "2nd in pair" came from "R2.fastq.gz". And that's it, there is no indication about the position.

ADD COMMENT
0
Entering edit mode
8.1 years ago
John 13k

Basically, it all comes down to if the sequencing was stranded - i.e. during PCR the original strand of DNA being amplified is some how recorded.

Maybe this post will help you: How many ways a read pair can be mapped?

ADD COMMENT

Login before adding your answer.

Traffic: 2573 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6