consensus: Determine consensus sequence

Description Usage Arguments Details Value Note Examples

Description

Function calculates consensus sequence for given alignment with a threshold of user's choice.

Usage

1
consensus(alignment, threshold)

Arguments

alignment

output of of read.alignment function or grouped alignment created with: align_seq_mtx2grs and alignment2matrix

threshold

minimal fraction of amino acids on the certain position in all sequences of the alignment to be taken for consensus letter on this position; number in range 0-100.

Details

If maximum fraction of any amino acid on the certain position is lower than a threshold then "*" is printed instead.

Value

A character vector of length of the aligned sequence containing consesus sequence based on the input alignment

Note

Please note that this function masks the seqinr package function consensus

Examples

1
2
3
4
data("alignment")
alignment = delete_isoforms(alignment)
threshold=80 # Set the consensus threshold
consensus_sequence=consensus(alignment, threshold)

michalstolarczyk/BALCONY documentation built on May 7, 2019, 6:08 a.m.