generateEvidence {tigger}R Documentation

Generate evidence

Description

generateEvidence builds a table of evidence metrics for the final novel V allele detection and genotyping inferrences.

Usage

generateEvidence(
  data,
  novel,
  genotype,
  genotype_db,
  germline_db,
  j_call = "j_call",
  junction = "junction",
  fields = NULL
)

Arguments

data

a data.frame containing sequence data that has been passed through reassignAlleles to correct the allele assignments.

novel

the data.frame returned by findNovelAlleles.

genotype

the data.frame of alleles generated with inferGenotype denoting the genotype of the subject.

genotype_db

a vector of named nucleotide germline sequences in the genotype. Returned by genotypeFasta.

germline_db

the original uncorrected germline database used to by findNovelAlleles to identify novel alleles.

j_call

name of the column in data with J allele calls. Default is j_call.

junction

Junction region nucleotide sequence, which includes the CDR3 and the two flanking conserved codons. Default is junction.

fields

character vector of column names used to split the data to identify novel alleles, if any. If NULL then the data is not divided by grouping variables.

Value

Returns the genotype input data.frame with the following additional columns providing supporting evidence for each inferred allele:

See Also

See findNovelAlleles, inferGenotype and genotypeFasta for generating the required input.

Examples


# Generate input data
novel <- findNovelAlleles(AIRRDb, SampleGermlineIGHV,
    v_call="v_call", j_call="j_call", junction="junction", 
    junction_length="junction_length", seq="sequence_alignment")
genotype <- inferGenotype(AIRRDb, find_unmutated=TRUE, 
                          germline_db=SampleGermlineIGHV,
                          novel=novel,
                          v_call="v_call", seq="sequence_alignment")
genotype_db <- genotypeFasta(genotype, SampleGermlineIGHV, novel)
data_db <- reassignAlleles(AIRRDb, genotype_db, 
v_call="v_call", seq="sequence_alignment")

# Assemble evidence table
evidence <- generateEvidence(data_db, novel, genotype, 
                             genotype_db, SampleGermlineIGHV,
                             j_call = "j_call", 
                             junction = "junction")



[Package tigger version 1.1.0 Index]