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!
1 answer
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..
Log in to answer this question.
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.