alignSeq: Align multiple sequences

View source: R/alignSeq.R

alignSeqR Documentation

Align multiple sequences

Description

Perform multiple sequence alignment using one of three methods and output results to the console or as a pdf file. One may perform the alignment of all amino acid or junction sequences in a single repertoire_id. Alternatively, one may search for a given sequence within a list of samples using an edit distance threshold.

Usage

alignSeq(
  study_table,
  repertoire_ids = NULL,
  sequence_list = NULL,
  edit_distance = 15,
  type = "junction",
  method = "ClustalOmega",
  top = 150
)

Arguments

study_table

A tibble consisting of antigen receptor sequences imported by the LymphoSeq function readImmunoSeq.

sequence_list

A character vector of one ore more amino acid or junction CDR3 sequences to search.

edit_distance

An integer giving the minimum edit distance that the sequence must be less than or equal to. See details below.

type

A character vector indicating whether "junction_aa" or "junction" sequences should be aligned. If "junction_aa" is specified, then run productiveSeqs first.

method

A character vector indicating the multiple sequence alignment method to be used. Refer to the Bioconductor msa package for more details. Options include "ClustalW", "ClustalOmega", and "Muscle".

top

The number of top sequences to perform alignment.

repertoire_id

A character vector indicating the name of the repertoire_id in the productive sequence list.

Details

Edit distance is a way of quantifying how dissimilar two sequences are to one another by counting the minimum number of operations required to transform one sequence into the other. For example, an edit distance of 0 means the sequences are identical and an edit distance of 1 indicates that the sequences different by a single amino acid or junction.

Value

Performs a multiple sequence alignment object.

See Also

If having trouble saving pdf files, refer to Bioconductor package msa for installation instructions http://bioconductor.org/packages/release/bioc/vignettes/msa/inst/doc/msa.pdf

Examples

file_path <- system.file("extdata", "IGH_sequencing", package = "LymphoSeq2")

stable <- readImmunoSeq(path = file_path)

ntable <- productiveSeq(stable, aggregate = "junction")

alignSeq(ntable, repertoire_id = "IGH_MVQ92552A_BL", type = "junction", 
         method = "ClustalW")

elulu3/LymphoSeqTest documentation built on Aug. 27, 2022, 5:47 a.m.