Question: Bedtools coverage not return every line in file A
0
gravatar for yuewu_mike
17 months ago by
yuewu_mike0
yuewu_mike0 wrote:

It seems for some range in A, there is not corresponding return in result for bedtools coverage. Is there any way to force bedtools to return every range in A?

The command is:

bedtools coverage -sorted -hist -a A.tab.sort -b B.sort > A.res.tab

wc -l A.tab.sort

64800

wc -l A.res.tab

64441

bedtools • 516 views
ADD COMMENTlink modified 17 months ago • written 17 months ago by yuewu_mike0
1

Is this a statement or question or .. ? Whatever it is, more information regarding your thread would be helpful for everyone. May be you can take a look at

ADD REPLYlink modified 17 months ago • written 17 months ago by venu6.1k

Sorry/forget to add the questions/Thanks.

ADD REPLYlink written 17 months ago by yuewu_mike0

Provide an example of both A and B as well as the expected and the given result, so that people can understand what your point/question is.

ADD REPLYlink written 17 months ago by ATpoint15k

A and B are just bed format file. My previous running with similar file didn't give any such error(loss of some lines). So, I guess "example" file would not be useful.

ADD REPLYlink written 17 months ago by yuewu_mike0
0
gravatar for Medhat
17 months ago by
Medhat8.2k
Texas
Medhat8.2k wrote:

The default behavior will give you after the line of A feature

The number of features in B that overlapped (by at least one base pair) the A interval

So If it is 0 (Zero) it mean it is not covered.


You could use -d option

-d Reporting the per-base of coverage for each feature in the A file

One should use the “-d” option to create, for each interval in A, a detailed list of coverage at each of the positions across each A interval.

The output will consist of a line for each one-based position in each A feature, followed by the coverage detected at that position.

and also you may want to use -hist

-hist Creating a histogram of coverage for each feature in the A file

One should use the “-hist” option to create, for each interval in A, a histogram of coverage of the features in B across A.

In this case, each entire feature in A will be reported, followed by the depth of coverage, the number of bases at that depth, the size of the feature, and the fraction covered. After all of the features in A have been reported, a histogram summarizing the coverage among all features in A will be reported.

for more detailed answer you should provide the command you used.

ADD COMMENTlink modified 17 months ago • written 17 months ago by Medhat8.2k

Thanks for answering. Actually -d and -hist is not what I needed. I just need the information for each range in A, not every base. Bedtools return most ranges but fail to return some. I have try -hist the line number is the same as not use it.

ADD REPLYlink written 17 months ago by yuewu_mike0
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: 1055 users visited in the last hour