peptide_pairwise_alignment: Peptide pairwise alignment - vectorized version

Description Usage Arguments Value Author(s) References See Also Examples

View source: R/peptide_pairwise_alignment.R

Description

perform pairwise sequence alignment for a dataset of peptides taking advantange of data.table and vectorized pairwiseAlignment function in the package "Biostrings"

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
peptide_pairwise_alignment(
  peptides,
  id_col = "id",
  seq_col = "pep_aa",
  sub_matrix = "BLOSUM62",
  gap_opening = 10,
  gap_extension = 4,
  align_type = "local",
  self_comparison = TRUE,
  full_align = FALSE,
  other_info = TRUE,
  parallel_ncore = NULL,
  output_str = "data.table"
)

Arguments

peptides

a tibble of peptide metadata with at least two columns: peptide id and peptide amino acid sequences.

id_col

name of the column that contains peptide id. Default: "id"

seq_col

name of the column that contains peptide amino acid sequences. Default: "pep_aa"

sub_matrix

substitution matrix to use for the alignment. Default = "BLOSUM62"

gap_opening

penalty for starting a gap, pass to function pairwiseAlignment. Default = 10

gap_extension

penalty for extending a gap, pass to function pairwiseAlignment. Default = 4

align_type

alignment type, pass to function pairwiseAlignment. Options: "global", "local", "overlap", "global-local", and "local-global". Default: "local"

self_comparison

whether alignment with self is performed. Default = TRUE

full_align

whether to keep the full alignment results as a column in the final results. Default = FALSE

other_info

whether to keep peptide information in the output. Default = TRUE

parallel_ncore

number of cores used for internal parallel in data.table. Default = NULL

output_str

format of the output to return. Options: "data.table", "data.frame", and "tibble". Default = "data.table"

Value

a data frame or data table or tibble with sequence alignment results from all unique pairs of peptides

Author(s)

Jennifer L. Remmel, Siyang Xia sxia@hsph.harvard.edu

References

pairwiseAlignment: https://bioconductor.org/packages/devel/bioc/vignettes/Biostrings/inst/doc/PairwiseAlignments.pdf

See Also

pairwiseAlignment

Examples

1
2
3
data(peptide_df)
pairwise_align <- peptide_pairwise_alignment(peptides = peptide_df)
head(pairwise_align)

siyangxia419/virlink documentation built on Jan. 2, 2022, 12:16 a.m.