knitr::opts_chunk$set( collapse = TRUE, comment = "#>" )
library(cmvdrg)
# load some test data, bundled in the package. also included: A10.fasta A10.tab A10_fragment.fasta my_sample = system.file("testdata", "A10.vcf", package = "cmvdrg") # call variants from the file also present in the cmvdrg database. data = call_resistance(infile = my_sample, all_mutations = F) # highlight resistance to Ganciclovir print(data[,c("change", "freq", "Ganciclovir")])
It may be the case that your sequences contain nonsynonymous mutations in resistance genes, that may confer changes in resultant protein. Although there are many mutations accounted for in this database, of course there is a possibility to observe something novel. The call_resistance function allows for these sorts of questions.
# returns all variants, with any resistance data, with annotation of protein coded for & if it coded for a change in protein sequence. mutations_all = call_resistance(infile = my_sample, all_mutations = T) # to view all mutations in resistance genes we can use base R to filter. mutations_res = mutations_all[mutations_all$GENEID %in% c("UL54", "UL97", "UL27", "UL51", "UL56", "UL89"),] # are there any non-synonymous (DNA variants that result in a change of amino acid) variants in resistance genes. mutations_res_nonsyn = mutations_res[mutations_res$CONSEQUENCE == "nonsynonymous",] # here the top 3 mutations are nonsynonymous, with no identified resistance effect. head(mutations_res_nonsyn) ## view the full database db = cmvdrg_data() head(db$aa_change)
as you can see, there are a number of variants in resistance genes that result in a change of protein sequence, and may deserve attention.
# Generate a condensed output for the sample make_clin_table(data)
# runShinyCMV()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.