Hello everyone
I have bigwig files of normalized Tn5 insertions . I also have atac seq peaks of the same samples. I was wondering if it is possible to get coverages for atac seq peaks in R using only bigwigs and peaks.
bigwig sample:
"seqnames" "start" "end" "width" "strand" "score"
"1" "chr1" 1 9999 9999 "*" 0
"2" "chr1" 10000 10099 100 "*" 17.7165222167969
"3" "chr1" 10100 10199 100 "*" 30.6012668609619
"4" "chr1" 10200 10299 100 "*" 9.66355800628662
"5" "chr1" 10300 10399 100 "*" 4.83177900314331
"6" "chr1" 10400 10499 100 "*" 8.05296516418457
"7" "chr1" 10500 10699 200 "*" 3.22118592262268
"8" "chr1" 10700 13199 2500 "*" 0
ATAC-seq peaks:
seqnames start end name score annotation percentGC percentAT
chr1 975451 975952 BRCA_39 1.87842575038562 3' UTR 0.6187624750499 0.3812375249501
chr1 1014228 1014729 BRCA_55 4.07469686212787 3' UTR 0.62874251497006 0.37125748502994
chr1 1290080 1290581 BRCA_123 2.44358820293876 3' UTR 0.678642714570858 0.321357285429142
chr1 1291099 1291600 BRCA_124 3.18019908767794 3' UTR 0.702594810379242 0.297405189620758
chr1 1291742 1292243 BRCA_125 8.26783029566134 3' UTR 0.640718562874252 0.359281437125749
chr1 1327977 1328478 BRCA_143 1.08246502080444 3' UTR 0.676646706586826 0.323353293413174
chr1 1334423 1334924 BRCA_151 3.70277788120318 3' UTR 0.634730538922156 0.365269461077844
chr1 1335198 1335699 BRCA_152 2.60759091543721 3' UTR 0.588822355289421 0.411177644710579
chr1 1352725 1353226 BRCA_166 12.7576509548536 3' UTR 0.612774451097804 0.387225548902196
Here is how bigwigs were constructed:
we constructed bigwigs based on the Tn5 offset-corrected insertion sites. To do this, the genome was binned into 100-bp intervals using “tile” in GenomicRanges of the chromosome sizes in R. The insertion sites (GenomicRanges) were then converted into a coverage run-length encoding using “coverage”. Then, to determine the number of Tn5 insertions within each bin we constructed a “Views” object and calculated the sum in each bin with “ViewSums”. We then normalized the total number of reads by a scale factor that converted all samples to a constant 30 million reads within peaks. This approach simultaneously normalizes samples by their quality and read depth, analogous to the reads in peaks normalization within a counts matrix. This was then converted into a bigwig using rtracklayer “export.bw” in R.
Can you explain in more detail what you want to do?
I added some explanation on how bigwigs were constructed. my objective is to get normalized reads in my atac seq peaks .
Count the reads with
featureCounts
.can you please explain more?
You can treat the peaks as regions and count the reads with whichever tool you like (I said featureCounts because is quite standard). With the reads obtained, you can do the normalization you like; RPKM, TMMs, etc.