getTypingPos: Get the position in the HLA table of the corresponding HLA...

Description Usage Arguments Value Author(s) Examples

View source: R/prepareHLAdb.R

Description

Get the position in the HLA table of the corresponding HLA typing. The HLA typing can use up to 6 fields for the identification.

Usage

1
getTypingPos(seqProcess, curTyping)

Arguments

curTyping

A vector of character string defining the HLA type. The vector should have 6 fields.

seq

A character string containing the sequence.

Value

A integer or a vector of integer representing the position(s), in the data.table, of the HLA typing. If the HLA typing is not present, an empty integer is returned.

Author(s)

Pascal Belleau, Astrid Deschenes

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## Information about HLA alignment file
fileInfo <- paste0(system.file("extdata", package = "HLAClustRView"),
    "/DRA_prot.txt")

## Parse HLA alignment file
## DRAInfo$HLAalignment contains the HLA table
DRAInfo <- HLAClustRView:::parseAlignment(fileName=fileInfo)

## Create a vector with the information about one HLA typing
typing <- matrix(data=c("DRA", "01", "01", "02", NA, NA), nrow=1)

## Get the position of the specific typing in the HLA table
HLAClustRView:::getTypingPos(seqProcess=DRAInfo$HLAalignment,
    curTyping=typing)

NCBI-Hackathons/HLAClustRView documentation built on Nov. 22, 2019, 6:11 a.m.