Question: Count right and left mate pairs from Sam files
0
gravatar for PAn
2.4 years ago by
PAn20
United States
PAn20 wrote:

Hello,

I have two separate left and right mate sam files from a sample's RNAseq data (these are unmapped sam files after running alignment both right and left mate fastq files) and I need to find out which of these reads come from pairs and which of these reads are left unmapped from either just left or right mate. ie. In the end I should be able to calculate this

1- % Reads common in left and right mate sam files
2- %Reads only in left mate sam file
3- %Reads only in right mate sam file

can someone please suggest on how to do it? Should I read the read names in hash and compare the ids?

Thanks!

sam samtools • 766 views
ADD COMMENTlink modified 2.4 years ago by Brian Bushnell16k • written 2.4 years ago by PAn20
1
gravatar for Brian Bushnell
2.4 years ago by
Walnut Creek, USA
Brian Bushnell16k wrote:

You should really map the reads paired, which will (typically) only generate a single sam file containing both mapped and unmapped reads. It's not clear to me how you ended up where you are, or what you're trying to do, but mapping is much more accurate when reads are paired.

ADD COMMENTlink written 2.4 years ago by Brian Bushnell16k
0
gravatar for abascalfederico
2.4 years ago by
abascalfederico1.1k
Spain
abascalfederico1.1k wrote:

I think samtools flagstat will give you that

ADD COMMENTlink written 2.4 years ago by abascalfederico1.1k

flagstat would run on each sam file separately and i think will not compare based on read names between two files. I am trying to write a script to do this now.

ADD REPLYlink written 2.4 years ago by PAn20
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1132 users visited in the last hour