dot-extend_reads: extend reads to specified length in a strand sensitve way

Description Usage Arguments Value Examples

Description

extend reads to specified length in a strand sensitve way

Usage

1
.extend_reads(reads_dt, frag_len)

Arguments

reads_dt

data.table. Contains at least 3 mandatory columns: strand, start, and end.

frag_len

integer. the fragment length to extend to

Value

data.table after extending to fragment length

Examples

1
2
3
4
5
6
7
8
9
bam_file = system.file("extdata",
  "MCF10A_CTCF.random5.bam", package = "peakrefine")
bam_input = system.file("extdata",
  "MCF10A_input.random5.bam", package = "peakrefine")
np = system.file("extdata",
  "MCF10A_CTCF.random5.narrowPeak", package = "peakrefine")
query_gr = rtracklayer::import(np, format = "narrowPeak")
reads_dt = peakrefine:::.fetch_bam_stranded(bam_file, query_gr)
peakrefine:::.extend_reads(reads_dt, 150)

jrboyd/peakrefine documentation built on July 30, 2020, 7:13 p.m.