Skip to contents

Removes an amino acid sequence and associated data from all instances within study table and then recomputes the duplicate_frequency.

Usage

removeSeq(study_table, sequence)

Arguments

study_table

A tibble imported using the LymphoSeq2 function readImmunoSeq(). "junction_aa", "duplicate_count", and "duplicate_frequency" are required columns.

sequence

A character vector of one or more amino acid sequences to remove from the study table

Value

Returns a tibble like the one imported except all rows with the specified amino acid sequence are removed. The "duplicate_frequency" is recalculated.

Examples

library(magrittr)
file_path <- system.file("extdata", "TCRB_sequencing", package = "LymphoSeq2")
study_table <- LymphoSeq2::readImmunoSeq(path = file_path, threads = 1)
Lstudy_table <- LymphoSeq2::topSeqs(study_table, top = 100)
LymphoSeq2::searchSeq(study_table, sequence = "CASSDLIGNGKLFF")
#> # A tibble: 0 × 147
#> # ℹ 147 variables: sequence_id <chr>, sequence <chr>, sequence_aa <chr>,
#> #   rev_comp <lgl>, productive <lgl>, vj_in_frame <lgl>, stop_codon <lgl>,
#> #   complete_vdj <lgl>, locus <chr>, v_call <chr>, d_call <chr>, d2_call <chr>,
#> #   j_call <chr>, c_call <chr>, sequence_alignment <chr>,
#> #   sequence_alignment_aa <chr>, germline_alignment <chr>,
#> #   germline_alignment_aa <chr>, junction <chr>, junction_aa <chr>, np1 <chr>,
#> #   np1_aa <chr>, np2 <chr>, np2_aa <chr>, np3 <chr>, np3_aa <chr>, …
cleaned_table <- LymphoSeq2::removeSeq(study_table, sequence = "CASSDLIGNGKLFF")
LymphoSeq2::searchSeq(cleaned_table, sequence = "CASSDLIGNGKLFF")
#> # A tibble: 0 × 147
#> # ℹ 147 variables: sequence_id <chr>, sequence <chr>, sequence_aa <chr>,
#> #   rev_comp <lgl>, productive <lgl>, vj_in_frame <lgl>, stop_codon <lgl>,
#> #   complete_vdj <lgl>, locus <chr>, v_call <chr>, d_call <chr>, d2_call <chr>,
#> #   j_call <chr>, c_call <chr>, sequence_alignment <chr>,
#> #   sequence_alignment_aa <chr>, germline_alignment <chr>,
#> #   germline_alignment_aa <chr>, junction <chr>, junction_aa <chr>, np1 <chr>,
#> #   np1_aa <chr>, np2 <chr>, np2_aa <chr>, np3 <chr>, np3_aa <chr>, …