This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How To Know From Which File ( R1 Or R2 ) A Read Is Coming From Based On Sam Output

Hi,

I've a sam file containing several aligned reads informations. I've strand-specific paired-end and I want to know from which file (R1.fastq or R2.fastq) a read is coming.

So per example :

HWI-ST1447:80:D2FTRACXX:4:1109:21267:59761    99    ref    621    255    89M12S    =    742    222    ATTATATCATGGGAAATTCCCCCTCCTATAACCCCCCCGCTGGGATGTCCCCCTCAGACTGGCTGAACCTTTTGCAAAGCGGGGAAAGGGGGAGTCGGGGA    B<B<F<<BBFBFFFFB<<<<B0<BB7B<<<B''0'7B<B70BB'''0''000000<B'7'<B70''0'0'0'00''000'7'7'''00<0'''''''''0'    AS:i:157    XN:i:0    XM:i:5    XO:i:0    XG:i:0    NM:i:5    MD:Z:43T2C17C16C1C5    YS:i:179    YT:Z:CP

How can I know from which file is this read coming ?

Thanks,

N.

sam

1 answer

filter with samtools & the SAM Flag: http://picard.sourceforge.net/explain-flags.html

  • first in pair
  • second in pair

99= first in pair

Log in to answer this question.