consensusFromMSF: Obtain the consensus sequence from an MSF file

Description Usage Arguments Value Examples

View source: R/consensusFromMSF.R

Description

Obtain the consensus sequence from an MSF file

Usage

1
2
3
4
5
6
consensusFromMSF(
  msfALN = NULL,
  threshold = 0.5,
  removegaps = TRUE,
  consname = "cons"
)

Arguments

msfALN

Character string. Path to an MSF file obtained with a multiple aligment program Note that the function also works if msfALN points to a fasta file (with .fa extension)

threshold

Numeric in ]0,1[. (Default is 0.5)

removegaps

Logical. Should the gaps be removed in the output sequence? (Default is TRUE)

consname

Character string. Name of the consensus sequence. (Default is "cons")

Value

A DNAStringSet of length 1 with the consensus sequence

Examples

1
2
3
4
## example msf file (obtained with kalign2 using the varseq100.fa file)
exMSFfile <- system.file("extdata", "varseq100.msf", package = "NanoBAC")
## get the consensus sequence
consensusFromMSF(exMSFfile)

pgpmartin/NanoBAC documentation built on Dec. 11, 2020, 9:51 a.m.