consensusSequence-methods: Calculate the consensus sequence.

Description Usage Arguments Value Author(s) Examples

Description

This function computes the consensus sequence from a matrix of nucleotide counts, or the control slot of a deepSNV object.

Usage

1
2
3
4
5
6
7
consensusSequence(x, ...)

## S4 method for signature 'matrix'
consensusSequence(x, vector=FALSE, haploid=TRUE, het.cut = .333)

## S4 method for signature 'deepSNV'
consensusSequence(x, vector=FALSE, haploid=TRUE, het.cut = .333)

Arguments

x

An object. Either an deepSNV-class object, or a named matrix with nucleotide counts.

vector

Boolean where TRUE indicates that a character vector should be returned.

haploid

Should the consensus be called for a haploid control? Otherwise, also all bases larger than het.cut are rerported. Default haploid = TRUE.

het.cut

Heterozygous cutoff. If haploid = FALSE, report all nucleotides with relative frequency larger than het.cut. Default = 0.333.

...

Additional arguments passed to methods.

Value

A DNAString with the consensus sequence, or if vector = TRUE, a character vector.

Author(s)

Moritz Gerstung

Examples

1
2
3

mg14/deepSNV-old documentation built on May 22, 2019, 8:52 p.m.