linkPatterns: linkPatterns

Description Usage Arguments Value Examples

View source: R/linkPatterns.R

Description

A function that is able to find matches between a submitted unknown mutation and a known mutation pattern table.

Usage

1
2
3
4
5
6
7
linkPatterns(ref, alt, context, distance = NULL, mutationSymbol = ".",
  reverseComplement = FALSE, searchPatterns = mutationPatterns,
  searchRefHeader = "ref", searchAltHeader = "alt",
  searchContextHeader = "surrounding", searchIdHeader = "process",
  searchDistanceHeader = "maxDistance", searchMutationSymbol = ".",
  searchReverseComplement = TRUE, showWarning = TRUE,
  renameReverse = FALSE)

Arguments

ref

A string containing the reference nucleotide. (e.g. "C")

alt

A string containing the alternative nucleotide. (e.g. "T")

context

A string containing the surrounding nucleotides. (e.g. "G.C")

distance

A number that tells the distance to the nearest mutation in a cluster. This parameter should stay NULL unless the searchPatterns table has a distance column and it's needed to be take into account while comparing.

mutationSymbol

A string with the symbol that stands for the mutated nucleotide location in the context. (e.g. "." in "G.C")

reverseComplement

A Boolean to tell if the ref, alt and context needed to be searched with the reverse complement. Irrelevant if searchReverseComplement = TRUE.

searchPatterns

A tibble with the known mutation patterns. The mutationPatterns is the default search table.

searchRefHeader

A string with the column name of the one with the reference nucleotide in the searchPatterns table.

searchAltHeader

A string with the column name of the one with the alternative nucleotide in the searchPatterns table.

searchContextHeader

A string with the column name of the one with the context nucleotide in the searchPatterns table.

searchIdHeader

A string with the column name of the one with the pattern IDs.

searchDistanceHeader

A string with the column name of the one with the maximum distance between clustered mutations. Not needed if the distance parameter is NULL. NA's within this column are allowed.

searchMutationSymbol

A string with symbol that stands for the mutated nucleotide location in the column of the searchContextHeader. (e.g. "." in "G.C")

searchReverseComplement

A boolean to also search the patterns in the reverse complement of the searchPatterns tibble.

showWarning

A Boolean if warnings about the parameters are allowed.

renameReverse

A Boolean if the id of the process needs to be renamed. This has the effect on the cMut functions that it will no longer treat the reverse complement and non reverse complement as the same. This parameter will irrelevant if searchReverseComplement is FALSE.

Value

list with the matched patterns. If nothing's found, return an empty list.

Examples

1
2
3
4
5
6
7
results <- linkPatterns(ref     = "C",
                        alt     = "T",
                        context = "TA.T")

# To see the default searchPattern table and it's information:
?mutationPatterns
mutationPatterns

AlexJanse/cMut documentation built on May 25, 2019, 4 a.m.