get_alignment_score: Calculate score of each site in alignment

View source: R/get_alignment_score.R

get_alignment_scoreR Documentation

Calculate score of each site in alignment

Description

Calculate score of each site in alignment

Usage

get_alignment_score(
  alignment = NULL,
  alignment_file = NULL,
  standard = F,
  symbol = "site",
  type = c("DNA", "RNA", "AA"),
  seq_length_limit = 0L,
  remove_duplicated = F
)

Arguments

alignment

input sequence alignment result, for DNA/RNA/protein sequences, DNAStringSet/RNAStringSet/AAStringSet or character class were required. All sequences must have the same length.

alignment_file

the path of input sequence alignment result.

standard

Logical. If TRUE, Only keep the score of AA_STANDARD/DNA_BASES/RNA_BASES for protein/DNA/RNA sequences. Default:FALSE.

symbol

Character. Prefix of colnames of result. Default:"site".

type

Input sequence type.One of "DNA", "RNA" or "AA".

seq_length_limit

Integer. Lower limit of input sequence length. Default:0.

remove_duplicated

Logical. If TRUE, only one sequence with repeated names in the score matrix is kept. Default:FALSE.

Value

score matrix of each site. rownames of the repeated sequence name will be suffixed.

Examples

require(ggseqlogo)
data(ggseqlogo_sample)
test_aa <- get_alignment_score(alignment = seqs_aa[[1]],type = "AA")
test_dna <- get_alignment_score(alignment = seqs_dna[[1]],type = "DNA")

Busydog1990/genepro documentation built on July 20, 2023, 6:03 a.m.