consensus: Consensus sequence determination

Description Usage Arguments Details Value Note Author(s) See Also 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

consensus_sequence

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

Author(s)

Alicja Pluciennik & Michal Stolarczyk

See Also

s2c

Examples

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

Example output

Loading required package: seqinr
Loading required package: Rpdb
Loading required package: rgl

Attaching package: 'Rpdb'

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

    norm, replicate, unsplit

Loading required package: scales

Attaching package: 'BALCONY'

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

    consensus

Warning messages:
1: In rgl.init(initValue, onlyNULL) : RGL: unable to open X11 display
2: 'rgl_init' failed, running with rgl.useNULL = TRUE 
3: .onUnload failed in unloadNamespace() for 'rgl', details:
  call: fun(...)
  error: object 'rgl_quit' not found 

BALCONY documentation built on May 1, 2019, 10:31 p.m.