Hi,
I was wondering if there is good way to draw coverage plot from bed file? My bed files are only contain chrome, start, end and its states, look like this:
chr1 958551 958621 state2
chr1 958681 958751 state2
chr1 961931 962011 state2
...
Now I would like to see the state distribution from 20k upstream from TSS to 10k downstream from TTS (include gene body). I was trying to use plotProfile function in deeptools but the result is always a straight line, I guess it is because the input I give is:
chr1 958551 958621 2
chr1 958681 958751 2
chr1 961931 962011 2
..
But I really don't have score for the bed file.
Thanks for any suggestions!
I am not sure I do it completely right but the states-over-bins.txt file looks weird. There are many blank lines and some line with the category name, it looks like this:
2;2;2;2;2
2;2
And I notice that the number of lines of this bin.txt equals to tssPad.bed. I was wondering if you have any handy R script for process this? What I want is a plot histone_mark_distribution like this, instead of histone mark, it has state categories. Thanks!
To clarify the output, use:
If you look at the output from that, it should be immediately clear.
It's up to you to write a script to visualize this. I'm just showing you how to get overlaps of states with bins.
It is much more clear, but I am afraid this is not exactly what I want. The length of each gene is difference. So I don't think this fixed bin size can be used when draw the distribution of gene body..
You might be able to use a multinomial to model the expected distribution of states over genes, and a hypergeometric to measure how much the state distribution deviates from expected. This is perhaps beyond the scope of this question, however.
True, but I think you answer might help others who want to draw coverage from bed file (focus on upstream of TSS or downstream of TTS, as those have exact same defined range). Anyway, Thanks for your answer!