Hello all,
I have two questions about making a bedGraph from an alignment file (bam or sam). I've used "bedtools genomecov" and then "bedtools map" (using a 200bp genome-wide "windows" file) to make a constant-step bedGraph file. This seems somewhat clumsy and also produces strange errors at times (that seem to be related to the chromosome order - despite both variable-step bedGraph and windows file being sorted with the same chr order, chromosomes 10 to 19 seem to get no mapping at all).
So, first of all, what is the "right" way to get a constant-step bedGraph from a BAM/SAM file?
And secondly, is there a way to do windowed mapping in which overlaps with bins would be considered? E.g. if certain read is 72% in bin 1 and 28% in bin2, bin 1 would get 0.72 added to its read count, and bin 2 would add 0.28?
The best option I've found so far is -f option in "bedtools map", when a certain read only "counts" when more than a certain fraction of it belongs to a window.
Thank you in advance for any input.
I have two questions about making a bedGraph from an alignment file (bam or sam). I've used "bedtools genomecov" and then "bedtools map" (using a 200bp genome-wide "windows" file) to make a constant-step bedGraph file. This seems somewhat clumsy and also produces strange errors at times (that seem to be related to the chromosome order - despite both variable-step bedGraph and windows file being sorted with the same chr order, chromosomes 10 to 19 seem to get no mapping at all).
So, first of all, what is the "right" way to get a constant-step bedGraph from a BAM/SAM file?
And secondly, is there a way to do windowed mapping in which overlaps with bins would be considered? E.g. if certain read is 72% in bin 1 and 28% in bin2, bin 1 would get 0.72 added to its read count, and bin 2 would add 0.28?
The best option I've found so far is -f option in "bedtools map", when a certain read only "counts" when more than a certain fraction of it belongs to a window.
Thank you in advance for any input.
Comment