How to extra read pair orientation from paired end reads
1
0
Entering edit mode
6 weeks ago
Wang Cong • 0

Hi, I have bam files for paired-end sequencing from the Hi-C experiment. I want to know the fraction of read pair orientation as a function of mapping distance. May I ask if there is software for this?

If not, I first need to extract different read pair orientations (forward-reverse, forward-forward, reverse-forward, reverse-reverse). May I ask if is a way to do this? Thanks.

hi-c alignment samtools • 391 views
ADD COMMENT
1
Entering edit mode
6 weeks ago

I want to know the fraction of read pair orientation as a function of mapping distance.

that's not clear to me.

If not, I first need to extract different read pair orientations (forward-reverse, forward-toward, reverse-toward, reverse-reverse).

use samtools view with a FILTER EXPRESSION.

 samtools view --expr 'flag.paired && !flag.unmap && !flag.munmap && flag.reverse && !flag.mreverse' in.bam
ADD COMMENT
0
Entering edit mode

Thanks! So this command extracts reverse-forward pairs?

ADD REPLY
0
Entering edit mode

Thanks! So this command extracts reverse-forward pairs?

reverse R1, forward R2

ADD REPLY
0
Entering edit mode

Thank you! I used the command. However, I found the output reads are not paired. The inputs are all paired. All reads are supposed to be paired, I think?

Output:

58201619 + 0 in total (QC-passed reads + QC-failed reads)
58201619 + 0 primary
0 + 0 secondary
0 + 0 supplementary
0 + 0 duplicates
0 + 0 primary duplicates
58201619 + 0 mapped (100.00% : N/A)
58201619 + 0 primary mapped (100.00% : N/A)
58201619 + 0 paired in sequencing
29103737 + 0 read1
29097882 + 0 read2
0 + 0 properly paired (0.00% : N/A)
58201619 + 0 with itself and mate mapped
0 + 0 singletons (0.00% : N/A)
10742519 + 0 with mate mapped to a different chr
10742519 + 0 with mate mapped to a different chr (mapQ>=5)

Input:

116394722 + 0 in total (QC-passed reads + QC-failed reads)
116394722 + 0 primary
0 + 0 secondary
0 + 0 supplementary
0 + 0 duplicates
0 + 0 primary duplicates
116394722 + 0 mapped (100.00% : N/A)
116394722 + 0 primary mapped (100.00% : N/A)
116394722 + 0 paired in sequencing
58197361 + 0 read1
58197361 + 0 read2
0 + 0 properly paired (0.00% : N/A)
116394722 + 0 with itself and mate mapped
0 + 0 singletons (0.00% : N/A)
21484650 + 0 with mate mapped to a different chr
21484650 + 0 with mate mapped to a different chr (mapQ>=5)
ADD REPLY
0
Entering edit mode

I found the output reads are not paired.

uh ??

58201619 + 0 in total (QC-passed reads + QC-failed reads)
58201619 + 0 paired in sequencing
ADD REPLY
0
Entering edit mode

Sorry, I think the read number should be even since all the reads are in pairs but now it's an odd number. I think read 1 and read 2 should be discarded together according to the command?

ADD REPLY

Login before adding your answer.

Traffic: 1034 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