I generated summit.bed files from my experiment cut&run, and I followed the below steps to get and visualize the bigwig files. 1) I used awk to get a bedgraph:
awk '{printf "%s\t%d\t%d\t%2.3f\n" , $1,$2,$3,$5}' myBed.bed > myFile.bedgraph
2) Sorting the bed files:
sort -k1,1 -k2,2n myFile.bedgraph > myFile_sorted.bedgraph
3) Chrom.size:
samtools faidx genome.fasta
cut -f1,2 genome.fasta.fai > genome.size
4) I used the UCSC bedGraphToBigWig tool:
bedGraphToBigWig myFile_sorted.bedgraph myChrom.sizes myBigWig.bw
The problem:
I encountered a problem with the visualization in IgV; the bigwigs look a bit weird. The bigwig didn't show nicely peak-like bumps of signals, but shows narrow, rectangular towers as if it's just marking summits or the presence/absence of a peak instead of the different heights along the peak interval.
I followed exactly the above mentioned steps (sorted, created the chrom file and converted to bigwig) Cut&run data, hg38). Could it be that there is some other parameter that I should add that I am ignoring?
How to visualize the bigwig files instead of IgV??
Thank you
Thank you very much for your suggestion. My question is I have used MACS2 to get the peaks, the output files of macs2 are: -sample.lambda.bdg -sample_treat_pileup.bdg -sample_peaks.xls -sample_peaks.narrowPeak -sample_summit.bed
I used the previous codes on summit.bed to get bigwig files, is it correct? or I have to change to _pileup.bdg??
Note: the analysis for Cut&Run experiment.