bedtools mapbed assings 0 values eventhough mean is not zero
1
0
Entering edit mode
6.7 years ago
ildem ▴ 60

Dear all,

I am using Bedtools mapBed to assign mean Phastcon scores to regions. Phastcon scores are in bedgraph format and my command is:

mabBed -a regions.bed -b scores.bedgraph -c 4 -n mean > out.txt

The problem is, mapBed is assigning "0" for values that i know to be non-zero.

I used sed to extract the relevant coordinates from the .bedgraph file and i can see that the average over some of these regions is definitely not zero (should have been 0.05). Is it rounding up the numbers?

Has anyone else seen this?

Many thanks!

bedtools mapbed assigns 0 • 1.3k views
ADD COMMENT
0
Entering edit mode

Please provide a short section of the input files that allow reproduction of the problem. What BEDtools version are you using? In the current one (2.26.0), option -n is not even mentioned anymore. Rather than than -o mean is what you should use. Using -n mean and -o mean gives different results in my short testing. But as said, please provide example input to reproduce the problem.

ADD REPLY
0
Entering edit mode
6.6 years ago
ildem ▴ 60

Many thanks, Indeed the problems seems to be coming from the input files. In particular the Refseq bed files that I have downloaded from UCSC. It looks like if i cut out all the columns (RefseqID, strand etc.) and leave only the first three (chr, start, end), then it works fine.

I have used bed files in this format (4 columns or 6 columns with strand information) for other bedtools applications, but for some reason its failing for mapBed.

Thanks for your time..

ADD COMMENT

Login before adding your answer.

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