matchKmers: matchKmers

Description Usage Arguments Details Value Methods (by class) See Also Examples

Description

Find kmer matches in the DNA string-based subject

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
matchKmers(k, subject, ...)

## S4 method for signature 'character,DNAStringSet'
matchKmers(k, subject, out = c("matches",
  "positions"), ranges = NULL)

## S4 method for signature 'character,character'
matchKmers(k, subject, out = c("matches",
  "positions"), ranges = NULL)

## S4 method for signature 'character,DNAString'
matchKmers(k, subject, out = c("matches",
  "positions"), ranges = NULL)

## S4 method for signature 'character,GenomicRanges'
matchKmers(k, subject,
  genome = GenomeInfoDb::genome(subject), out = c("matches", "positions"))

## S4 method for signature 'character,RangedSummarizedExperiment'
matchKmers(k, subject, ...)

## S4 method for signature 'numeric,ANY'
matchKmers(k, subject, ...)

## S4 method for signature 'DNAStringSet,ANY'
matchKmers(k, subject, ...)

## S4 method for signature 'DNAString,ANY'
matchKmers(k, subject, ...)

Arguments

k

k

subject

either GenomicRanges, DNAStringSet, DNAString, or character vector

...

additional arguments

out

what to return? see details

ranges

if subject is not GenomicRanges, ranges to use when out is positions

genome

BSgenome object, only used if subect is GenomicRanges

Details

Can either return a SummarizedExperiment with just sparse matrix with values set to 1 for a match (if return == 'matches'), or a GenomicRanges object with all the positions of matches

Value

SummarizedExperiment with matches assay storing which peaks contain which kmers

Methods (by class)

See Also

getAnnotations, computeDeviations

Examples

1
2
3
4
5
6
7
# Load very small example counts (already filtered)
data(mini_counts, package = "chromVAR")

# Get peak-kmer annotation matrix for 6mers
library(BSgenome.Hsapiens.UCSC.hg19)
kmer_ix <- matchKmers(6, mini_counts, 
                       genome = BSgenome.Hsapiens.UCSC.hg19)

chromVAR documentation built on Nov. 8, 2020, 6:46 p.m.