createFullHaplotype: Anchor gene haplotype inference

Description Usage Arguments Details Value Examples

View source: R/functions.R

Description

The createFullHaplotype functions infers haplotype based on an anchor gene.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
createFullHaplotype(
  clip_db,
  toHap_col = c("v_call", "d_call"),
  hapBy_col = "j_call",
  hapBy = "IGHJ6",
  toHap_GERM,
  relative_freq_priors = TRUE,
  kThreshDel = 3,
  rmPseudo = TRUE,
  deleted_genes = c(),
  nonReliable_Vgenes = c(),
  min_minor_fraction = 0.3,
  chain = c("IGH", "IGK", "IGL")
)

Arguments

clip_db

a data.frame in AIRR format. See details.

toHap_col

a vector of column names for which a haplotype should be inferred. Default is v_call and d_call

hapBy_col

column name of the anchor gene. Default is j_call

hapBy

a string of the anchor gene name. Default is IGHJ6.

toHap_GERM

a vector of named nucleotide germline sequences matching the allele calls in toHap_col columns in clip_db.

relative_freq_priors

if TRUE, the priors for Bayesian inference are estimated from the relative frequencies in clip_db. Else, priors are set to c(0.5,0.5). Defualt is TRUE

kThreshDel

the minimum lK (log10 of the Bayes factor) to call a deletion. Defualt is 3.

rmPseudo

if TRUE non-functional and pseudo genes are removed. Defualt is TRUE.

deleted_genes

double chromosome deletion summary table. A data.frame created by deletionsByBinom.

nonReliable_Vgenes

a list of known non reliable gene assignments. A list created by nonReliableVGenes.

min_minor_fraction

the minimum minor allele fraction to be used as an anchor gene. Default is 0.3

chain

the IG chain: IGH,IGK,IGL. Default is IGH.

Details

Function accepts a data.frame in AIRR format (https://changeo.readthedocs.io/en/stable/standard.html) containing the following columns:

Value

A data.frame, in which each row is the haplotype inference summary of a gene from the column selected in toHap_col.

The output containes the following columns:

Examples

1
2
3
4
5
6
7
8
9
# Load example data and germlines
data(samples_db, HVGERM, HDGERM)

# Selecting a single individual
clip_db = samples_db[samples_db$subject=='I5', ]

# Infering haplotype
haplo_db = createFullHaplotype(clip_db,toHap_col=c('v_call','d_call'),
hapBy_col='j_call',hapBy='IGHJ6',toHap_GERM=c(HVGERM,HDGERM))

rabhit documentation built on July 12, 2020, 1:06 a.m.