Hi all- This is somewhat similar to this question, but my question goes a little deeper than this. My goal is to create coverage files (bigwig) that contain ONLY paired-end fragments below a certain basepair size threshold from BAM files. I thought that using deepTools bamCoverage would allow me to do this relatively quickly and painlessly by using the --maxFragmentLength argument. So, I generated bigwig files that should contain only paired-end fragments at or below certain size thresholds, then used UCSC bigWigToWig to generate wig files. I would then like to convert these to bed files. I have done this routinely for other bigWig files generated with bamCoverage. In the past, my wig files had the format:
fixedStep chrom=chr1 start=3000001 step=1 span=1
However, the most recent wig files I generated have the format:
bedGraph section chr1:0-3151026
chr1 0 3000006 0
chr1 3000006 3000016 0.065786
And the subsequent conversion to bed fails. My question is two-fold: 1) is this the best way of doing this? and 2) do I simply need to use the script from the quoted post, or does this have something to do with an indexing problem or something I'm unaware of? Note that in my previous conversions to bed using BedOps convert2bed, I always used the [--zero-indexed] argument to ensure that these files would be compatible with other files I am using. Thanks!