Skip to contents

Creates a data frame of VDJ gene counts and frequencies.

Usage

geneFreq(nucleotide_table, locus = "VDJ", family = FALSE)

Arguments

nucleotide_table

A tibble of productive sequences generated by the LymphoSeq2 function productiveSeq() where the parameter aggregate is set to "junction".

locus

A character vector indicating which VDJ genes to include in the output. Available options include "VDJ", "DJ", "VJ", "DJ", "V", "D", or "J".

family

A Boolean value indicating whether or not family names instead of gene names are used. If TRUE, then family names are used and if FALSE, gene names are used.

Value

Returns a data frame with the repertoire_id names, VDJ gene name, duplicate_count, and \

100\

Examples

file_path <- system.file("extdata", "TCRB_sequencing", package = "LymphoSeq2")
study_table <- LymphoSeq2::readImmunoSeq(path = file_path, threads = 1) 
study_table <- LymphoSeq2::topSeqs(study_table, top = 100)
nucleotide_table <- LymphoSeq2::productiveSeq(study_table = study_table, 
  aggregate = "junction")
LymphoSeq2::geneFreq(nucleotide_table, locus = "VDJ", family = FALSE)
#> # A tibble: 416 × 5
#>    repertoire_id gene_name duplicate_count gene_type gene_frequency
#>    <chr>         <chr>               <dbl> <chr>              <dbl>
#>  1 TRB_CD4_949   NA                   4419 d_call            0.255 
#>  2 TRB_CD4_949   TRBD1-1              5584 d_call            0.322 
#>  3 TRB_CD4_949   TRBD2-1              7323 d_call            0.423 
#>  4 TRB_CD4_949   TRBJ1-1               525 j_call            0.0365
#>  5 TRB_CD4_949   TRBJ1-2               944 j_call            0.0656
#>  6 TRB_CD4_949   TRBJ1-3              2083 j_call            0.145 
#>  7 TRB_CD4_949   TRBJ1-4               267 j_call            0.0186
#>  8 TRB_CD4_949   TRBJ1-5              1057 j_call            0.0735
#>  9 TRB_CD4_949   TRBJ1-6              1552 j_call            0.108 
#> 10 TRB_CD4_949   TRBJ2-1               614 j_call            0.0427
#> # ℹ 406 more rows