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 class 'GRanges,GRanges'
pairwiseAlignment(pattern, subject, ...)

# S4 method for class '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)
#> Warning: pairwiseAlignment() has moved to the pwalign package. Please call
#>   pwalign::pairwiseAlignment() to get rid of this warning.
#> Warning: restarting interrupted promise evaluation
#> Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'XStringSet': argument "subject" is missing, with no default