score_sequences {transite} | R Documentation

## Score Sequences with PWM

### Description

C++ implementation of PWM scoring algorithm

### Usage

    score_sequences(sequences, pwm)

### Arguments

`sequences` | list of sequences
`pwm` | position weight matrix

### Value

list of PWM scores for each sequence

### Examples

    motif <- get_motif_by_id("M178_0.6")[[1]]
    sequences <- c("CAACAGCCUUAAUU", "CAGUCAAGACUCC", "CUUUGGGGAAU",
                   "UCAUUUUAUUAAA", "AAUUGGUGUCUGGAUACUUCCCUGUACAU",
                   "AUCAAAUUA", "UGUGGGG", "GACACUUAAAGAUCCU",
                   "UAGCAUUAACUUAAUG", "AUGGA", "GAAGAGUGCUCA", "AUAGAC",
                   "AGUUC", "CCAGUAA")
    seq_char_vectors <- lapply(sequences, function(seq) {
      unlist(strsplit(seq, ""))
    })
    score_sequences(seq_char_vectors, as.matrix(get_motif_matrix(motif)))

[Package transite version 1.10.0 Index]