Description Usage Arguments Value Examples
View source: R/basic_functions.R
SNVs are grouped into 6 different categories (12/2 as reverse complements are summed over). This function defines the attribution.
1 2 | attribute_nucleotide_exchanges(in_dat, in_REF.field = "REF",
in_ALT.field = "ALT", in_verbose = FALSE)
|
in_dat |
VRanges object or data frame which carries one column for the reference base and one column for the variant base |
in_REF.field |
String indicating which column of |
in_ALT.field |
String indicating which column of |
in_verbose |
Whether verbose or not. |
A character vector with as many rows as there are in in_dat
which can be annotated (i.e. appended) to the input data frame.
1 2 3 4 5 6 7 8 | test_df <- data.frame(
CHROM=c(1,1,1,2,2,2,3,3,3,4,4,4,5,5),
POS=c(1,2,3,4,5,6,1,2,3,4,5,6,7,8),
REF=c("C","C","C","T","T","T","A","A","A","G","G","G","N","A"),
ALT=c("A","G","T","A","C","G","C","G","T","A","C","T","A","N"))
test_df$change <- attribute_nucleotide_exchanges(
test_df,in_REF.field = "REF",in_ALT.field = "ALT")
test_df
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.