customAlign: Generate a Customized Peptide, Codon or Nucleotide Sequence...

View source: R/SearchandBuildAlignments.R

customAlignR Documentation

Generate a Customized Peptide, Codon or Nucleotide Sequence Alignment.

Description

Generates a peptide, codon, coding or genomic nucleotide alignment table for user-specified HLA alleles at user-specified positions.

Usage

customAlign(alignType, alleles, positions)

Arguments

alignType

The type of alignment being searched. Allowed values are "prot", codon", "nuc" and "gen". Only one 'alignType' value is allowed.

alleles

A vector of un-prefixed HLA allele names.

positions

Either a vector of variant positions, against which all loci will be aligned, or a list of vectors of nucleotide positions, exactly one vector for each allele, against which each corresponding allele will be aligned.

Value

A data frame of allele names and the corresponding nucleotide sequences for each desired nucleotide position. FALSE is returned when 'positions' includes values that do not exist in the specified alignment, and when a specified locus is not available in the HLAalignments object.

Note

This function requires that the HLAalignments object has been populated with alignments via the alignmentFull() function.

Examples

## Not run: 
customAlign("codon",c("DRB1*01:01","DQB1*02:01","DPB1*01:01"),c(1,2,3,7,8,9,13,14,15))
customAlign("codon",c("DPB1*01:01:01:01","DQA1*01:01:01:01","DQB1*05:01:01:01"),list(19:35,1:4,6:9))
customAlign("prot",c("DRB1*08:07","DPB1*14:01"),list(c(12,27,30,39,57,84),c(15,16,39,60,67,81)))

## End(Not run)


HLAtools documentation built on June 8, 2025, 12:24 p.m.