...
Expand |
---|
title | click here to see the code for bedtools coverage |
---|
|
Code Block |
---|
language | bash |
---|
title | solution code |
---|
| module load bedtools #again, if not already loaded
bedtools coverage -a yeast_pairedend_sort.mapped.q1sacCer3.chrom.sizes.bed -b sacCer3.chrom.sizesyeast_pairedend_sort.mapped.q1.bed > sacCer3coverage.bed
more sacCer3coverage.bed #this file should have 17 lines, one for each chromosome |
And here is what my output looks like: Code Block |
---|
| more sacCer3coverage.bed
chrIchrIV 1 2302181531933 70633 7972 1026387 128701 230217 1531932 0.55904216699951
chrXV chrII 1 8131841091291 47871 35818 539222710376 8131831091290 0.66310046509507
chrVII chrIII 1 3166201090940 49762 13701 199553722821 316619 1090939 0.63026236625677
chrIVchrXII 1 1078177 1531933 48155 70633 658373 1026387 15319321078176 0.66999516106359
chrIXchrXVI 1 439888948066 1595343531 276571612122 439887948065 0.62873196456540
chrMchrXIII 1 85779924431 40054 3264 618798 58599 85778 924430 0.68314726693833
chrVchrII 1 576874813184 2691835818 381078539222 576873813183 0.66059266631004
chrVIchrXIV 1 270161784333 1066232565 167222513382 270160784332 0.61897406545468
chrX chrVII 1 745751 1090940 30743 49762 472357 722821 745750 1090939 0.66256776333986
chrXI chrVIII 1 562643666816 2342427950 356421446567 562642666815 0.63347746697015
chrV chrX 1 745751576874 3074326918 472357381078 745750576873 0.63339866605926
chrXIchrVIII 1 666816562643 2795023424 446567356421 666815562642 0.66970156334774
chrIX chrXII 1 439888 1078177 15953 48155 276571 658373 439887 1078176 0.61063596287319
chrIII chrXIII 1 924431316620 4005413701 618798199553 924430316619 0.66938336302623
chrVI chrXIV 1 784333270161 3256510662 513382167222 784332270160 0.65454686189740
chrI chrXV 1 230218 1091291 7972 47871 710376128701 230217 1091290 0.65095075590421
chrM chrXVI 1 85779 948066 3264 43531 58599 612122 85778 948065 0.64565406831472 |
|
It's worth noting that just computing coverage over the genome isn't the most useful thing, but you might compute coverage over a set of genes or regions of interest. Coverage is really useful coupled with intersect or subtract as well.
...