countKmer: Find k-mers and its counts

View source: R/countKmer.R

countKmerR Documentation

Find k-mers and its counts

Description

Calculate counts of k-mers in the query nucleotide sequence

Usage

countKmer(study_table, k, separate = TRUE)

Arguments

study_table

A tibble consisting of antigen receptor sequencing imported by the LymphoSeq2 function readImmunoSeq(). "repertoire_id" and "junction" are required columns.

k

The length of k-mers to find.

separate

A boolean value.

  • TRUE (the default): separate the counts of each k-mer by repertoire_id.

  • FALSE : show cumulative counts instead.

Value

A tibble with the k-mer and its counts. The counts can be cumulative counts of the entire study_table or counts for each repertoire_id.

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)
kmer_table <- LymphoSeq2::countKmer(
  study_table = study_table, k = 5,
  separate = TRUE
)


shashidhar22/LymphoSeq2 documentation built on Jan. 16, 2024, 4:29 a.m.