data.file <- system.file("data", "abf.data.abfreq.txt.gz", package = "sequenza")
abf.data <- read.abfreq(data.file)
# 1Mb windows, each window is overlapping with 1 other adjacent window: depth ratio
abf.ratio <- windowValues(x = abf.data$depth.ratio,
positions = abf.data$n.base,
chromosomes = abf.data$chromosome, window = 1e6,
weight = abf.data$depth.normal, start.coord = 1, overlap = 1)
abf.hom <- abf.data$ref.zygosity == 'hom'
abf.het <- abf.data[!abf.hom, ]
# 1Mb windows, each window is overlapping with 1 other adjacent window: B-allele frequency
abf.bafs <- windowValues(x = abf.het$Bf,
positions = abf.het$n.base,
chromosomes = abf.het$chromosome, window = 1e6,
weight = abf.het$depth.sample,
start.coord = 1, overlap = 1)
Run the code above in your browser using DataLab