getVDnames: Identify VD reads based on alignment of the vector on the...

Description Usage Arguments Value Examples

View source: R/getVDnames.R

Description

VD reads contain DNA-vector or vector-DNA These reads contain a single region with an alignment to the vector The vector alignment must cover at least tolerance% of the first (or last) EndWindow bp at the read extremity

Usage

1
getVDnames(alignGR, tolerance = 0.8, EndWindow = 500)

Arguments

alignGR

a GRanges object containing the alignment of the vector on the reads

tolerance

numeric in [0.5,1] indicating the pecentage of the read extremity that must be covered by vector alignment to be considered a VD read

EndWindow

integer. Number of bp at the extremity of the read to look for vector alignment

Value

a character vector with the names of VD reads

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## Create a GRanges. Only Read1 and Read2 are VD reads
## vector is 10kb
## alignment of vector on Read2 covers 410bp in the first 500bp
## (i.e. >80\% but <90\% of the first 500bp)
  rgr <- GenomicRanges::GRanges(c("Read1:48e3-5e4",
                                  "Read2:90-500",
                                  "Read3:1-2000", "Read3:98001-1e5"),
                                seqlengths = c("Read1"=5e4, "Read2"=6e4,
                                               "Read3"=1e5, "Read4"=5e4))
## Names of VD reads (using default 80\% of the 500bp at the extremity of the read):
  getVDnames(rgr, 0.8, 500)
## With 90\% of vector length only Read1 will be selected as a VD read
  getVDnames(rgr, 0.9, 500)

pgpmartin/NanoBAC documentation built on Dec. 11, 2020, 9:51 a.m.