Learn R Programming

GenVisR

Intuitively visualizing and interpreting data from high-throughput genomic technologies continues to be challenging. GenVisr (Genomic Visualizations in R) attempts to alleviate this burden by providing highly customizable publication-quality graphics focused primarily on a cohort level (i.e., multiple samples/patients). GenVisr attempts to maintain a high degree of flexibility while leveraging the abilities of ggplot2 and bioconductor to achieve this goal.

Installation Instructions

Note requires R >= 3.2.1, see Description file for a full list of dependencies

  • Install devtools
install.packages("devtools")
  • Install Bioconductor dependencies
source("http://bioconductor.org/biocLite.R")
biocLite(c("AnnotationDbi", "biomaRt", "Biostrings", "GenomicFeatures", "GenomicRanges", "Rsamtools"))
  • It is suggested but not required to install knitr and rmarkdown for vignette creation and testthat for unit tests
install.packages(c("rmarkdown", "knitr", "testthat"))
  • Install GenVisR
devtools::install_github("griffithlab/GenVisR")

Tips for developers

  • It is recommended to use Rstudio for development, Clone the repo at (https://github.com/griffithlab/GenVisR.git) and open the "GenVisR.Rproj" folder in Rstudio.
  • It is necessary to manual install all packages (since you are cloning and building, not installing), all packages within the imports, Depends, and Suggests flags in the "DESCRIPTION" file (GenVisR/DESCRIPTION) should be installed! The r-package devtools should be installed as well!
  • Build and Reload the package at this step (Rstudio shorcut: Shift+Cmd+B)
  • GenVisR uses roxygen2 for documentation, to update the Reference Manuscript edit the roxygen2 flags (i.e. @param, @details, etc.) in the code. These are within the R function files in GenVisR/R/*.R, Then run devtools::document() or build and reload the package.
  • To update the vignette edit the R markdown file in the vignettes subdirectory (GenVisR/vignettes/GenVisR_intro.Rmd) and press the knit button in Rstudio
  • Code for GenVisR is within the R subdirectory (~/GenVisR/R/), make changes there. Be sure to build and reload the package from Rstudio to test changes (Rstudio -> Build -> Build & Reload || Shift+CMD+B)
  • test cases are in the test subdirectory (~/GenVisR/tests/testthat/) and use the testthat package, tests must be named with the character string "test" in the beginning of the name (i.e. for the waterfall function the test file would look like test-waterfall.R). To run tests run devtools::test()

Copy Link

Version

Version

1.0.4

License

GPL-3 + file LICENSE

Last Published

February 15th, 2017

Functions in GenVisR (1.0.4)

cnView_qual

check input to cnView
lohSpec_fileGlob

Grab data for lohSpec
geneViz

Construct a gene-features plot
genCov

Construct a region of interest coverage plot
compIdent_format

Format readcount tables from compIdent
compIdent_buildMain

Compare sample identities
GenVisR

GenVisR
cnView

Construct copy-number single sample plot
geneViz_buildGene

build gene plot
lohSpec_buildMain

Plot LOH data
lohSpec_tileWindow

Obtain LOH data
lohSpec_windowPosition

Obtain window information
lolliplot_mutationObs

format mutation observations
lolliplot_qual

Check input to lolliplot
multi_chrBound

retrieve and format CN_cohort plot supplemental data
multi_cytobandRet

Retrieve cytogenetic bands
TvTi_qual

Check input to TvTi
TvTi_rmIndel

Remove indels
waterfall_MGI2anno

Convert MGI File
waterfall_NA2gene

Assign NA samples a gene
cnFreq_qual

check input to cnFreq
compIdent_bamRcnt_qual

Count nucleotide reads at SNP locations
cnFreq

Construct copy-number frequency plot
geneViz_formatCDS

format cds
compIdent_bamRcnt

Count nucleotide reads at SNP locations
geneViz_formatUTR

format UTR
cnSpec_buildMain

Construct CN cohort plot
cnSpec_qual

Construct CN cohort plot
ideoView_formatCytobands

reformat cytogenetic band data frame
ideoView_buildMain

build chromosome
compIdent

Construct identity snp comparison plot
lohSpec_lohCalc

Calculate loh difference
lolliplot_AA2sidechain

Convert AA to side chain classification
lohSpec_qual

Check input to lohSpec
lolliplot_buildMain

Construct Lolliplot
covBars_buildMain

Construct coverage cohort plot
genCov_extr_ggplotGrob_height

extract ggplotGrob height
genCov_extr_ggplotGrob_width

extract ggplotGrob width
HCC1395_Germline

Germline Calls
geneViz_mapCovCoordSpace

Map coverage track regions to transformed space
HCC1395_N

Normal BAM
ideoView_qual

Check input to ideoView
geneViz_mergeRegions

Create Region Table
ideoView

Construct an ideogram
lohSpec

Plot LOH data
lohView_buildMain

construct loh plot
lolliplot_DNAconv

Convert DNA character string
lolliplot_dodgeCoordX

dodge coordinates
TvTi_calcTransTranvFreq

Calculate Transition/Transversion Frequency
waterfall_calcMutFreq

Calculate Synonymous/Nonsynonymous mutation frequency
waterfall_buildMutBurden_B

plot mutation burden
TvTi_convMAF

Convert .maf format to internal format
waterfall_sampAlt

mutation sample subset sample based
lolliplot

Construct a lolliplot
LucCNseg

Truncated CN segments
SNPloci

Identity snps
TvTi_alignPlot

align TvTi plots on y axis
waterfall

Construct a waterfall plot
waterfall_geneRecurCutoff

Mutation Recurrence Cutoff
waterfall_geneSort

sort waterfall file by gene
waterfall_sampSort

sort samples in an internal waterfall file.
cnSpec

Construct copy-number cohort plot
cytoGeno

Cytogenetic banding dataset
genCov_alignPlot

align plots on an axis
genCov_qual

Perform quality control on genCov data
genCov_trackViz

Overlay tracks with plots
geneViz_calcGC

Calculate GC content
geneViz_cdsFromTXID

cdsFromTXID
HCC1395_T

Tumor BAM
hg19chr

hg19 chromosome boundaries
lolliplot_Codon2AA

Convert Codon to AA
lohSpec_slidingWindow

Obtain LOH data
lohSpec_stepCalc

Obtain average loh within each step
lolliplot_constructGene

Construct gene information
lolliplot_transcriptID2codingSeq

fetch protein length
lolliplot_reduceLolli

Reduce Lolli
multi_align

align CN/LOH plots on x axis
waterfall_align

align plots
multi_buildClin

plot clinical information
waterfall_buildGenePrevelance

plot mutation recurrence in genes
waterfall_Custom2anno

Convert Custom File
waterfall_geneAlt

mutation sample cutoff gene based
waterfall_qual

Check input to mutSpec
waterfall_rmvSilent

Silent Mutation Removal
cnView_buildMain

construct CN plot
covBars_qual

Construct coverage cohort plot
covBars

Construct an overall coverage cohort plot
genCov_buildTrack

build label for plot
genCov_buildCov

build coverage plot
geneViz_Granges2dataframe

Convert Granges object to dataframe
geneViz_mapCoordSpace

Map regions to transformed space
multi_selectOut

Choose output
multi_subsetChr

subset based on chr
waterfall_buildMain

Plot a mutation heatmap
waterfall_buildMutBurden_A

plot mutation burden
brcaMAF

Truncated BRCA MAF file
cnFreq_buildMain

Construct CN frequency plot
genCov_assign_ggplotGrob_height

assign ggplotGrob height
genCov_assign_ggplotGrob_width

assign ggplotGrob width
geneViz_extrUTR

Extract UTR
geneViz_extrCDS

Extract CDS
geneViz_mergeTypeRegions

Create Typed Region Table
geneViz_mergeTypes

Merge Typed Region Tables
lohSpec_tileCalc

Calculate loh difference
lohSpec_tilePosition

Obtain window information
lohView

Construct LOH chromosome plot
lohView_qual

check input to lohView
lolliplot_fetchDomain

fetch protein domains
lolliplot_dodgeCoordY

dodge coordinates
TvTi_annoTransTranv

Annotate Transitions and Transversions
TvTi

Construct transition-transversion plot
waterfall_MAF2anno

Convert MAF File
waterfall_hierarchyTRV

Hiearchical removal of MAF entries
TvTi_rmMnuc

Remove multinucleotide codes
TvTi_buildMain

build transitions/transversions