knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)

Usage

vcf data

library("hsvdrg")

## call resistant variants
my_sample = system.file("testdata", "F716L.vcf", package = "hsvdrg")

data = call_resistance(infile = my_sample, all_mutations = F)

data[ , c("change", "freq", "Aciclovir", "Pencyclovir", "Foscarnet")]


## call all variants
mutations_all = call_resistance(infile = my_sample, all_mutations = T)

#to view all mutations in resistance genes we can filter
mutations_res = mutations_all[mutations_all$GENEID %in% c("UL30"),]

head(mutations_res[,c(1,8,21,32:40)])


## call nonsynonymous variants
# 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[,c(1,8,21,32:40)])

fasta sequences

# hsvdrg accepts sequence fragments or whole-genomes, one fasta sequence at a time.

# load example data
my_sequence = system.file("testdata", "F716L.fasta", package = "hsvdrg")

dat = call_resistance(infile = my_sequence, all_mutations = T)

head(dat)

other features

## view the full database
db = hsvdrg_data()
head(db$aa_change)


## run the shiny application
# runShinyHSV()

Getting help

If you encounter a clear bug, please file an issue with a minimal reproducible example on the GitHub Issues page. For questions and other discussions feel free to contact. Oscar Charles - maintainer



ojcharles/hsvdrg documentation built on Jan. 19, 2021, 2:02 p.m.