weightedConsensusMatrix: compute weighted consensus matrix

Description Usage Arguments Value Author(s) See Also Examples

View source: R/util.R

Description

computes weighted consensus matrix

Usage

1
2
weightedConsensusMatrix(seqs, weights, shift = NULL,
                        baseLetters = c("A", "C", "G", "T", "N"))

Arguments

seqs

character vector of read sequences

weights

integer; weights (read counts)

shift

integer; shift of each read sequence relative to the first column of the consensus matrix, by default: 0

baseLetters

alphabet

Value

A consensus matrix

Author(s)

J Toedling

See Also

consensusMatrix

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
 ## Align following sequences with weights:
 ##   ACATT       1
 ##    CGTTA     10
 ##     TTG       3
 ##  GACATT       4

 dweights <- c(1L, 10L, 3L, 4L)
 d <- c("ACATT","CGTTA", "TTG", "GACATT")
 dshifts <- c(0L, 1L, 2L, -1L)
 W <- girafe:::weightedConsensusMatrix(d, dweights, shift=dshifts)
 consensusString(W, ambiguityMap="N")

girafe documentation built on Nov. 8, 2020, 4:56 p.m.