knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
hivdrg is a R package to enable synonymous / non-synonymous characterisation of HIV genetic data for the PANGEA project. Also provides HIV antiviral drug resistance genotyping. Accepted inputs are FASTA (whole genomes & fragments) which will be mapped to selected reference NGS variant data assembled to a supported reference is accepted in VCF >= ver4.0 & Varscan2 tab formats.
A text database extracted in July 2020 from the Stanford resistance database. Shafer RW(2006). Rationale and Uses of a Public HIV Drug-Resistance Database. Journal of Infectious Diseases 194 Suppl 1:S51-8
You can install the current version from with: GitHub
install.packages("devtools") devtools::install_github("ojcharles/hivdrg")
Dependencies for FASTA file handling are MAFFT and SNP-Sites available preferably via conda. snp-sites >= 2.3 has been tested.
``` {bash eval = FALSE} conda config --add channels bioconda conda install snp-sites conda install mafft
## Usage - resistance genotyping note: there are 5 supported variants in hivdrg, vcf and tab files must be assembled against one of these. fasta files will be aligned to the chosen reference and variants called. ```r library("hivdrg") # select a fasta, vcf, or varscan tab file my_sample = system.file("testdata", "example.vcf", package = "hivdrg") # hivdrg provides the following function to return a table of annotated variants data = call_resistance(infile = my_sample, all_mutations = F, ref = 5) head(data[,c("GENEID","aachange", "freq", "phenotype")])
## call all variants mutations_all = call_resistance(infile = my_sample, all_mutations = T,ref = 5) # are there any non-synonymous (DNA variants that result in a change of amino acid) variants in resistance genes mutations_nonsyn = mutations_all[mutations_all$CONSEQUENCE == "nonsynonymous",] # here the top 3 mutations are nonsynonymous, with no identified resistance effect. head(mutations_nonsyn[,c("GENEID","aachange", "freq", "CONSEQUENCE","phenotype")])
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 - Developer
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.