# NOT RUN {
query <- data.frame(start = c(5,10, 15,20), width = 5, gc = runif(4)) %>%
as_iranges()
subject <- data.frame(start = 2:6, width = 3:7, label = letters[1:5]) %>%
as_iranges()
join_follow(query, subject)
subject <- data.frame(seqnames = "chr1",
start = c(11,101),
end = c(21, 200),
name = c("a1", "a2"),
strand = c("+", "-"),
score = c(1,2)) %>%
as_granges()
query <- data.frame(seqnames = "chr1",
strand = c("+", "-", "+", "-"),
start = c(21,91,101,201),
end = c(30,101,110,210),
name = paste0("b", 1:4),
score = 1:4) %>%
as_granges()
join_follow(query, subject)
join_follow_left(query, subject)
join_follow_upstream(query, subject)
# }
Run the code above in your browser using DataLab