getPwmFromAlignment: Create PWM from alignment

Description Usage Arguments Value Author(s) Examples

View source: R/utilities.R

Description

Creates a matrix-representation of a PWM from a set of sequences

Usage

1
getPwmFromAlignment(alignment, alphabet = NULL, pseudoCount = 0)

Arguments

alignment

a vector or list of sequences each with equal length

alphabet

of type Alphabet

pseudoCount

the number of pseudo-observations for each character in the alphabet

Value

PWM as matrix

Author(s)

Hendrik Treutler

Examples

1
2
3
4
5
6
motif_folder= "extdata/alignments"
motif_name = "calamodulin_1"
fileName = paste(motif_folder,"/",motif_name,".txt",sep="")
file = system.file(fileName, package = "DiffLogo")
motif = getPwmFromAlignment(readLines(file), ASN, 1)
(pwm = motif, alphabet=ASN)

Example output

Loading required package: cba
Loading required package: grid
Loading required package: proxy

Attaching package: 'proxy'

The following objects are masked from 'package:stats':

    as.dist, dist

The following object is masked from 'package:base':

    as.matrix

DiffLogo documentation built on Nov. 8, 2020, 6:09 p.m.