I have a wiggle file and I also have a bed file with some features. I want to average the profile defined in the wiggle file over all of the features in the bed file in order to get an average profile.
Is there software out there that can do this? I would be especially interested in Bioconductor packages. Although, I am not commited to Bioconductor and I would be willing to use just about anything.
wig comes in a variety of formats and it isn't a simple process to convert to bed when one considers all possibilities (for example, a wig file may embed several sub-wig files within itself, and these could be in any mixture of fixedStep, variableStep, or regular wig formats). I won't claim that this is common, but a good tool will deal with all of these possibilities. wig2bed will deal with any/all of those situations. And, you'll find it's really fast and memory efficient in practice.
As far as finer control than what I've shown above, check out --echo-map-score with bedmap. In addition to all of the built-in solutions, it can retrieve the group of overlapping scores for each row of your bed file, so you can process things further on your own. BEDOPS has pre-built binaries. You should consider downloading and giving it a shot.