Creates a data frame of VDJ gene counts and frequencies.
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 \ frequency should add to 100\
Examples
file_path <- system.file("extdata", "TCRB_sequencing",
package = "LymphoSeq2")
study_table <- LymphoSeq2::readImmunoSeq(path = file_path, threads = 1)
#> Dataset Analysis:
#> Files: 10, Total: 0.00 GB, Largest: 0.0 MB
#> Available memory: 12.0 GB
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: 420 × 5
#> repertoire_id gene_name duplicate_count gene_type gene_frequency
#> <chr> <chr> <int> <chr> <dbl>
#> 1 TRB_CD4_949 TRBD01-01 5584 d_call 0.311
#> 2 TRB_CD4_949 TRBD02-01 7323 d_call 0.408
#> 3 TRB_CD4_949 TRBJ01-01 525 j_call 0.035
#> 4 TRB_CD4_949 TRBJ01-02 944 j_call 0.0629
#> 5 TRB_CD4_949 TRBJ01-03 2083 j_call 0.139
#> 6 TRB_CD4_949 TRBJ01-04 267 j_call 0.0178
#> 7 TRB_CD4_949 TRBJ01-05 1057 j_call 0.0705
#> 8 TRB_CD4_949 TRBJ01-06 1552 j_call 0.103
#> 9 TRB_CD4_949 TRBJ02-01 1233 j_call 0.0822
#> 10 TRB_CD4_949 TRBJ02-02 5308 j_call 0.354
#> # ℹ 410 more rows
