psubAxt: Parallel subset of Axt alignment

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/subAxt-methods.R

Description

Given two GRanges objects, select the Axt alignments whose the target and query alignments are both within each pair of ranges.

Usage

1
  psubAxt(x, targetSearch, querySearch)

Arguments

x

Axt object.

targetSearch,querySearch

GRanges objects: the ranges to keep for target and query alignments. They must be of the same length. Strand information is ignored.

Details

The ‘targetSearch’ and ‘querySearch’ have the coordinates relative to the positive strand. For each pair of the ranges, the alignments that lie within both the target and query range are kept.

Value

A Axt object.

Author(s)

Ge Tan

See Also

psubAxt

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
  library(GenomicRanges)
  tAssemblyFn <- file.path(system.file("extdata",
                             package="BSgenome.Drerio.UCSC.danRer10"),
                           "single_sequences.2bit")
  qAssemblyFn <- file.path(system.file("extdata",
                             package="BSgenome.Hsapiens.UCSC.hg38"),
                           "single_sequences.2bit")
  axtFn <- file.path(system.file("extdata", package="CNEr"), 
                     "danRer10.hg38.net.axt")
  axt <- readAxt(axtFn, tAssemblyFn, qAssemblyFn)

  targetSearch <- GRanges(seqnames=c("chr6"),
                          ranges=IRanges(start=c(24000000, 26900000),
                                         end=c(24060000, 26905000)),
                          strand="+"
                          )
  querySearch <- GRanges(seqnames=c("chr7", "chr2"),
                         ranges=IRanges(start=c(12577000, 241262700),
                                        end=c(12579000, 241268600)),
                         strand="+"
                         )
  psubAxt(axt, targetSearch, querySearch)

CNEr documentation built on Nov. 8, 2020, 5:36 p.m.