remove_hypermut: Detect and process hypermutated sequences

Description Usage Arguments Details Value See Also Examples

View source: R/hypermutR.R

Description

This function is a wrapper that will detect and either remove or 'fix' hypermutated sequences depending of the value of the 'fix_with' argument.

Usage

1
2
remove_hypermut(dat, verbose = TRUE, fix_with = FALSE,
  ancestor = "consensus", p_value = 0.05)

Arguments

dat

The sequence data. The structure must match the format produced by read.fasta from the seqinr package. This is a list in which each element represents a single sequence. Each element is of class SeqFastadna and consists of a vector of single letters of class character with optional attributes names and Annot.

verbose

If TRUE, print the name and p-value of removed/fixed sequences.

fix_with

Either FALSE or a single letter. If not FALSE, then replace the hypermutated base with the letter indicated.

ancestor

Either 'consensus' to indicate that the consensus sequences must be computed, or 'first' to indicate that the first sequence in the dataset should be considered to be the ancestral sequence, or the ancestral sequence itself.

p_value

The p-value used by the one-sided fischer test.

Details

It calls ancestor_processing to obtain the ancestral sequence to compare the query sequences to, then calls deduplicate_seqs to remove duplicate sequences for performance reasons, next loops over each unique sequence, comparing it to the ancestral sequence with scan_seq and finally collates the results.

Value

A list with three elements:

all_mut_pos

A data.frame that contains all the positions in all the sequences that are either a hypermutation or control position.

seq_results

A list that stores all the sequences that did not contain any hypermutation and, in the case that the fix_with parameter was set, those sequences with hypermutation that was corrected.

seq_hypermutants

A list of all the sequences that contains hypermutation.

See Also

ancestor_processing, deduplicate_seqs, and scan_seq

Examples

1
2
3
result <- remove_hypermut(hd_seqs)
names(result)
str(result)

philliplab/hypermutR documentation built on Sept. 2, 2020, 2:51 p.m.