Please clarify me about countOverlaps()?
2
0
Entering edit mode
6.9 years ago
seta ★ 1.9k

Hi all,

I'm studying some documents about countOverlaps() (I never work with this tool), and come across with the below sentence: "The first run of the countOverlaps()marks the individual reads with running numbers. The reads with the flag one map to a single gene only and these are mapped to the genes they map to during the second run of the function countOverlaps()." I got confused with the bold sentence. Could you please kindly to explain a bit what's its concept and meaning?

Many thanks in advance

RNA-Seq countOverlaps R • 3.7k views
ADD COMMENT
1
Entering edit mode

Can you link to that documentation, so we know which package you're referring to?

ADD REPLY
2
Entering edit mode
6.9 years ago
igor 13k

The first run of the countOverlaps()marks the individual reads with running numbers.

First run marks how many genes the reads overlap ...

The reads with the flag one map to a single gene only

... then takes the reads overlapping only one gene (excluding multi-mappers or overlapping genes) ...

these are mapped to the genes they map to during the second run of the function countOverlaps().

... then the second run associates these reads with the corresponding genes.

ADD COMMENT
0
Entering edit mode

I got it, thank you, igor.

ADD REPLY
0
Entering edit mode

If an answer was helpful you should upvote it, if the answer resolved your question you should mark it as accepted. Upvote|Bookmark|Accept

ADD REPLY
1
Entering edit mode
6.9 years ago
jomo018 ▴ 730

Actually, these sentences refer specifically to the following two commands:

hits <- countOverlaps(h1b, txdb)
ol <- countOverlaps(txdb, h1b[hits==1])

The first command counts overlaps with txdb elements (e.g. genes) per each read in h1b.

In the second command, only h1b items characterized by one hit: h1b[hits==1] are applied to countOverlaps. The output of the second command is a named integer vector reporting, per each gene, the number of reads which overlap that gene.

ADD COMMENT

Login before adding your answer.

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