Skip to contents

Retrieves DNA sequence from GBreaks or GRanges objects that are properly related to a BSgenome package, and aligns them with the Biostrings::pairwiseAlignment function.

Usage

pairwiseAlignment(pattern, subject, ...)

# S4 method for GRanges,GRanges
pairwiseAlignment(pattern, subject, ...)

# S4 method for GBreaks,ANY
pairwiseAlignment(pattern, subject, ...)

Arguments

pattern

A GBreaks or a GRanges object

subject

A GBreaks or a GRanges object

...

Additional arguments passed to pairwiseAlignment.

Value

Returns a Biostrings::PairwiseAlignments object.

See also

See also the Biostrings::pairwiseAlignment function.

Other Bioconductor API functions: GBreaks-class, as(), getSeq(), range_GBreaks(), reverse(), subsetByOverlaps_GBreaks()

Author

Charles Plessy

Examples

Scerevisiae <- BSgenome.Scerevisiae.UCSC.sacCer3::Scerevisiae
# Very arbitrary example
gb <- GBreaks( target = GRanges("chrI: 1-20", seqinfo = seqinfo(Scerevisiae))
             , query  = GRanges("chrI:21-40", seqinfo = seqinfo(Scerevisiae)))
pairwiseAlignment(gb)
#> Global PairwiseAlignmentsSingleSubject (1 of 1)
#> pattern: C-CACACCACACCCACACACC
#> subject: CACACACCACAC-CACACACC
#> score: 9.653366