Replication timing BED segments from bigwig - ncbi/BAMscale GitHub Wiki
In this section we will create a segmentation of replication timing data for visualization in IGV. Please note that this script is was written in R using the rtracklayer package, so please cite the package when using it.
The script is takes as input a replication timing (log2 ratio) bigWig file:
Rscript R/Replication_timing_segmenter.R <reptime.bw>
Replication timing (log2) coverage track created with BAMscale. In this example we will segment the replication timing data obtained form here
We added an R script to the main page. This script takes as input one argument, which is the replication timing (log2) bigWig file created by BAMscale.
You will need R, and the rtracklayer package. See page for installation.
If you have Bioconductor already installed, then simply open an R session and run:
BiocManager::install("rtracklayer")
Rscript R/Replication_timing_segmenter.R GSE131417_GSM3227969_Repli_seq_aB_48h_NT_rep1_vs_Repli_seq_rB_0h_NT_rep1.reptime.bw
This command will create a BED file names GSE131417_GSM3227969_Repli_seq_aB_48h_NT_rep1_vs_Repli_seq_rB_0h_NT_rep1.reptime.bed
Here is a visualization of the output bigwig file and replication timing segments:
The timing segments are coded for simple visualization of early (green), mid-early (yellow), mid-late (orange) and late (red).