readHlaAlignments: Read HLA allele alignments

View source: R/parsingFunctions.R

readHlaAlignmentsR Documentation

Read HLA allele alignments

Description

readHlaAlignments read HLA allele alignments from file.

Usage

readHlaAlignments(file, gene = NULL, trim = FALSE, unkchar = "")

Arguments

file

Path to input file.

gene

Character vector of length one specifying the name of a gene for which alignment is required. See details for further explanations.

trim

Logical indicating if alignment should be trimmed to start codon of the mature protein.

unkchar

Character to be used to represent positions with unknown sequence.

Details

HLA allele alignment file should follow EBI database format, for details see ftp://ftp.ebi.ac.uk/pub/databases/ipd/imgt/hla/alignments/README.md.

All protein alignment files from the EBI database are shipped with the package. They can be easily accessed using gene parameter. If gene is set to NULL, file parameter is used instead and alignment is read from the provided file. In EBI database alignments for DRB1, DRB3, DRB4 and DRB5 genes are provided as a single file, here they are separated.

Additionally, for the alleles without sequence defined in the original alignment files we have infered thier sequence based on known higher resolution alleles.

Value

Matrix containing HLA allele alignments.

Rownames correspond to allele numbers and columns to positions in the alignment. Sequences following the termination codon are marked as empty character (""). Unknown sequences are marked with a character of choice, by default "". Stop codons are represented by a hash (X). Insertion and deletions are marked with period (.).

Examples

hla_alignments <- readHlaAlignments(gene = "A")


Genentech/MiDAS documentation built on Feb. 5, 2024, 11:52 a.m.