Description Usage Arguments Details Value Examples
View source: R/ancestor_processing.R
A simple function that resolves the ancestor argument passed to the
remove_hypermut
function.
1 | ancestor_processing(ancestor, dat)
|
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. |
dat |
The sequence data |
Three options exists for specifying the ancestral sequence to compare the query sequences in the dataset to.
If the value 'consensus' is specified via the ancestor parameter, a consensus sequence will be computed from the sequences in the input file. The letter that most frequently occurs is placed in the consensus sequence. In the case of ties, the first letter, when arranged alphabetically, is used.
Include the ancestral sequence as the first sequence in the input file and to set the value of the ancestor parameter to 'first'. In this case, the first sequence will be removed from the dataset before proceeding.
The ancestor parameter can be assigned the ancestral sequence itself. The only validation that is performed on the last of the three options is to check that the sequence assigned to ancestor has the same length as the sequences in the input file.
A list with two elements:
The ancestral sequence. Originally, only the consensus sequence option was supported, hence it is called 'cons' for historical reasons.
The sequence dataset. The dataset that was passed into this function via the dat parameter with the first sequence removed in the case of the 'first' option and unaltered in case of the other two options.
1 2 | ancestors <- ancestor_processing('consensus', ld_seqs)
print(ancestors$cons)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.