inferGenotypeAllele_asc
infer an individual's genotype based on the allele-base method.
The method utilize the allele specific threshold to determine the presence of an allele in the genotype.
More specifically, the absolute frequency of each allele is calculated and checked against the threshold.
inferGenotypeAllele_asc(
data,
alleleClusterTable,
v_call = "v_call",
single_assignment = FALSE,
germline_db = NA,
find_unmutated = FALSE,
seq = "sequence_alignment",
confidence_level = NULL,
default_allele_threshold = 1e-04
)
A a data.frame with the inferred V genotype. The table contains the following columns:
gene | alleles | imgt_alleles | counts | absolute_fraction | absolute_threshold | genotyped_alleles | genotype_imgt_alleles |
allele cluster | the present alleles | the imgt nomenclature | the number of reads | the absolute fraction | the population driven allele | the alleles which | the imgt nomenclature |
in the repertoire | of the alleles | for each alleles | of the alleles | thresholds for genotype presence | entered the genotype | of the alleles |
data.frame in AIRR format, containing V allele calls from a single subject and the sample IMGT-gapped V(D)J sequences under seq.
A data.frame of the allele similarity clusters thresholds.
name of the V allele call column. Default is v_call
if TRUE, the method only considers sequence with single assignment for the genotype inference.
named vector of sequences containing the germline sequences named in V allele calls and the alleleClusterTable. Only required if find_unmutated is TRUE.
if TRUE, use germline_db to find which samples are unmutated. Not needed if V allele calls only represent unmutated samples.
name of the column in data with the aligned, IMGT-numbered, V(D)J nucleotide sequence. Default is sequence_alignment.
The confidence level on which to filter the inferred genotype alleles. Default is NULL, meaning filtering only based on allele threshold.
The default allele threshold for the genotype inference, in case the allele threshold is not in the alleleClusterTable
. Default is 1e-04.
In naive repertoires, allele calls where more than one assignment is assigned is rare. Hence, in case the data represents the naive repertoire of a subject
it is recommended to use the find_unmutated=TRUE
option, to remove mutated sequences. For non-naive population, the allele calls in cases of multiple assignment
are treated as belonging to all groups.
inferAlleleClusters will infer the allele clusters based on a supplied V reference set and set the default allele threshold of 1e-04. See recentAlleleClusters to obtain the latest version of the IGHV allele clusters and the naive population based allele threshold.
# loading TIgGER AIRR-seq b cell data
data <- tigger::AIRRDb
# preferably obtain the latest ASC cluster table
# asc_archive <- recentAlleleClusters(doi="10.5281/zenodo.7429773", get_file = TRUE)
# allele_cluster_table <- extractASCTable(archive_file = asc_archive)
# example allele similarity cluster table
data(allele_cluster_table)
data(HVGERM)
# reforming the germline set
asc_germline <- germlineASC(allele_cluster_table, germline = HVGERM)
# assigning the ASC alleles
asc_data <- assignAlleleClusters(data, allele_cluster_table)
# inferring the genotype
asc_genotype <- inferGenotypeAllele_asc(
data = asc_data,
alleleClusterTable = allele_cluster_table,
germline_db = asc_germline, find_unmutated=TRUE)
Run the code above in your browser using DataLab