<NME> lohView.Rd
<BEF> % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/lohView.R
\name{lohView}
\alias{lohView}
\title{plot LOH data}
\usage{
lohView(x = NULL, path = NULL, fileExt = NULL, y = NULL,
  genome = "hg19", step = 5e+05, window_size = 1e+06, normal = 50,
  gradient_midpoint = 20, gradient_low = "#ffffff",
  gradient_mid = "#b2b2ff", gradient_high = "#000000", theme_layer = NULL,
  method = "tile")
}
  ideogram_txtSize = 5,
\item{x}{object of class data frame with columns 'chromosome', 'position',
'n_vaf', 't_vaf', 'sample'}

\item{path}{character string specifying which directory contains 
the sample information stored as datasets with columns "chromosome", 
"position", "n_freq", "t_freq", and "sample" (required if x is not specified)}

\item{fileExt}{character string specifying the file extensions of files
within the path specified (required if path argument is specified)}

\item{y}{Object of class data frame with rows representing cytogenetic bands
for a chromosome. The data frame must contain columns with the following
names "chrom", "chromStart", "chromEnd", "name", "gieStain" for plotting the
ideogram (optional: see details).}
\item{genome}{character string specifying the genome assembly from which
input data is based}

\item{step}{integer with the length of divisions (bp) in chromosomes}

\item{window_size}{integer with the size of the sliding window (bp) to be 
applied}

\item{normal}{integer specifying the normal VAF frequency used in LOH 
calculations#' @return ggplot object}

\item{gradient_midpoint}{object of class numeric specifying the midpoint 
for legend's gradient scale}

\item{gradient_low}{object of class character for hex color code for 
gradient's lower values}

\item{gradient_mid}{object of class character for hex color code for 
gradient's middle values}

\item{gradient_high}{object of class character for hex color code for 
gradient's upper values}

\item{theme_layer}{ggplot theme object specifying parameters for non data
\details{
lohView is able to plot in two modes specified via the `chr`
parameter, these modes are single chromosome view in which an ideogram is
displayed and genome view where chromosomes are faceted. For the single
chromosome view cytogenetic band information is required giving the
coordinate, stain, and name of each band. As a convenience GenVisR stores
this information for the following genomes "hg19", "hg38", "mm9", "mm10", and
"rn5". If the genome assembly supplied to the `genome` parameter is not one
of the 5 afore mentioned genome assemblies GenVisR will attempt to query the
UCSC MySQL database to retrieve this information. Alternatively the user can
manually supply this information as a data frame to the `y` parameter, input
\examples{
## Insert an example once the first part of this is understood
}

in input to `x`, failure to do so may result in a misleading visual!
}
\examples{
# Plot loh for chromosome 5
lohView(HCC1395_Germline, chr='chr5', genome='hg19', ideogram_txtSize=4)
}

<MSG> further changes to mirror bioconductor

From: Zach Skidmore <zskidmor@genome.wustl.edu>

git-svn-id: 274f1dac86931020afba6208eb04fedad756fa4a@113188 bc3139a8-67e5-0310-9ffc-ced21a209358

<DFF> @@ -2,11 +2,11 @@
 % Please edit documentation in R/lohView.R
 \name{lohView}
 \alias{lohView}
-\title{plot LOH data}
+\title{Plot LOH data}
 \usage{
 lohView(x = NULL, path = NULL, fileExt = NULL, y = NULL,
-  genome = "hg19", step = 5e+05, window_size = 1e+06, normal = 50,
-  gradient_midpoint = 20, gradient_low = "#ffffff",
+  genome = "hg19", gender = NULL, step = 5e+05, window_size = 1e+06,
+  normal = 50, gradient_midpoint = 20, gradient_low = "#ffffff",
   gradient_mid = "#b2b2ff", gradient_high = "#000000", theme_layer = NULL,
   method = "tile")
 }
@@ -14,9 +14,9 @@ lohView(x = NULL, path = NULL, fileExt = NULL, y = NULL,
 \item{x}{object of class data frame with columns 'chromosome', 'position',
 'n_vaf', 't_vaf', 'sample'}
 
-\item{path}{character string specifying which directory contains 
-the sample information stored as datasets with columns "chromosome", 
-"position", "n_freq", "t_freq", and "sample" (required if x is not specified)}
+\item{path}{character string specifying which directory contains
+the sample information stored as datasets with columns "chromosome",
+"position", "n_vaf", "t_vaf", and "sample" (required if x is not specified)}
 
 \item{fileExt}{character string specifying the file extensions of files
 within the path specified (required if path argument is specified)}
@@ -28,24 +28,28 @@ within the path specified (required if path argument is specified)}
 \item{genome}{character string specifying the genome assembly from which
 input data is based}
 
-\item{step}{integer with the length of divisions (bp) in chromosomes}
+\item{gender}{vector of length equal to the number of samples, consisting of
+elements from the set {"M", "F"}}
 
-\item{window_size}{integer with the size of the sliding window (bp) to be 
+\item{step}{integer with the length of divisions (bp) in chromosomes (only
+required when tile=FALSE}
+
+\item{window_size}{integer with the size of the sliding window (bp) to be
 applied}
 
-\item{normal}{integer specifying the normal VAF frequency used in LOH 
-calculations#' @return ggplot object}
+\item{normal}{integer specifying the normal VAF frequency used in LOH
+calculations}
 
-\item{gradient_midpoint}{object of class numeric specifying the midpoint 
+\item{gradient_midpoint}{object of class numeric specifying the midpoint
 for legend's gradient scale}
 
-\item{gradient_low}{object of class character for hex color code for 
+\item{gradient_low}{object of class character for hex color code for
 gradient's lower values}
 
-\item{gradient_mid}{object of class character for hex color code for 
+\item{gradient_mid}{object of class character for hex color code for
 gradient's middle values}
 
-\item{gradient_high}{object of class character for hex color code for 
+\item{gradient_high}{object of class character for hex color code for
 gradient's upper values}
 
 \item{theme_layer}{ggplot theme object specifying parameters for non data
@@ -63,4 +67,3 @@ Produce a graphic visualizing Loss of Heterozygosity in a cohort
 \examples{
 ## Insert an example once the first part of this is understood
 }
-

{'commit': 'diff --git a/.Rbuildignore b/.Rbuildignore\nnew file mode 100644\nindex 0000000..54f08d6\n--- /dev/null\n+++ b/.Rbuildignore\n@@ -0,0 +1,5 @@\n+^.*\\.Rproj$\n+^\\.Rproj\\.user$\n+.git\n+.gitignore\n+.DS_Store\ndiff --git a/.gitignore b/.gitignore\nnew file mode 100644\nindex 0000000..e55921e\n--- /dev/null\n+++ b/.gitignore\n@@ -0,0 +1,26 @@\n+# History files\n+.Rhistory\n+.Rapp.history\n+\n+# Example code in package build process\n+*-Ex.R\n+# R data files from past sessions\n+.Rdata\n+# RStudio files\n+.Rproj.user/\n+.Rproj.user\n+*.Rproj\n+# Don\'t include large files\n+*.bed\n+*.bam\n+#Mac specific files\n+.DS_Store\n+inst/doc\n+#Helper scripts\n+*.ipynb\n+\n+#Man files\n+man/*.Rd\n+\n+# R project files\n+*.Rproj\ndiff --git a/GGgenome.Rproj b/GGgenome.Rproj\nnew file mode 100644\nindex 0000000..3ab5dc7\n--- /dev/null\n+++ b/GGgenome.Rproj\n@@ -0,0 +1,18 @@\n+Version: 1.0\n+\n+RestoreWorkspace: No\n+SaveWorkspace: No\n+AlwaysSaveHistory: No\n+\n+EnableCodeIndexing: Yes\n+UseSpacesForTab: Yes\n+NumSpacesForTab: 4\n+Encoding: UTF-8\n+\n+RnwWeave: knitr\n+LaTeX: pdfLaTeX\n+\n+BuildType: Package\n+PackageUseDevtools: Yes\n+PackageInstallArgs: --no-multiarch --with-keep.source\n+PackageRoxygenize: rd,collate,namespace\ndiff --git a/R/TvTi_qual.R b/R/TvTi_qual.R\nindex 7620352..24526a6 100644\n--- a/R/TvTi_qual.R\n+++ b/R/TvTi_qual.R\n@@ -50,6 +50,8 @@ TvTi_qual <- function(x, y=NULL, z=NULL, file_type=\'MAF\')\n                                "\\"trans_tranv\\"")\n                 stop(memo)\n             }\n+\n+            y$Prop <- as.numeric(as.character(y$Prop))\n         }\n \n         # Check y input if vector\ndiff --git a/R/lohView_buildMain.R b/R/lohView_buildMain.R\nindex db62a33..a2fa515 100644\n--- a/R/lohView_buildMain.R\n+++ b/R/lohView_buildMain.R\n@@ -37,7 +37,7 @@ lohView_buildMain <- function(x, dummyData,\n     data <- geom_rect(data=x, aes_string(xmin=\'window_start\',\n                                          xmax=\'window_stop\',\n                                          ymin=-1,\n-\t\t\t\t\t\t\t\t\t\t ymax=1, fill=\'loh_diff_avg\'))\n+                                         ymax=1, fill=\'loh_diff_avg\'))\n \n \n     # Define additional plot parameters\n@@ -64,7 +64,6 @@ lohView_buildMain <- function(x, dummyData,\n                             panel.grid.minor=element_blank())\n     }\n \n-\n     LOHgradient <-scale_fill_gradient2(midpoint = gradient_midpoint,\n                                        guide = "colourbar",\n                                        high = gradient_high,\n@@ -75,7 +74,6 @@ lohView_buildMain <- function(x, dummyData,\n     # Build the plot\n     p1 <- ggplot() + dummy_data + data + facet + x_scale + y_scale + lab_x +\n         lab_y + BWscheme + LOHgradient + plot_theme\n-\n-\n+     \n     return(p1)\n }\ndiff --git a/R/lohView_fileGlob.R b/R/lohView_fileGlob.R\nindex 2bab927..e4a9337 100644\n--- a/R/lohView_fileGlob.R\n+++ b/R/lohView_fileGlob.R\n@@ -56,7 +56,7 @@ lohView_fileGlob <- function(path, fileExt, step, gender)\n \n         rm(data)\n     }\n-\n+    \n     tail(dataset)\n     return(dataset)\n }\ndiff --git a/R/lohView_lohCalc.R b/R/lohView_lohCalc.R\nindex 858804f..8733fca 100644\n--- a/R/lohView_lohCalc.R\n+++ b/R/lohView_lohCalc.R\n@@ -36,4 +36,4 @@ lohView_lohCalc <- function(window_data, out, normal)\n     }\n     return(total)\n \n-}\n+} \ndiff --git a/R/lohView_qual.R b/R/lohView_qual.R\nindex 028fca4..7455e31 100644\n--- a/R/lohView_qual.R\n+++ b/R/lohView_qual.R\n@@ -20,7 +20,7 @@ lohView_qual <- function(x, y, genome)\n     }\n \n     # check that correct columns are supplied in x\n-\tx_col <- c(\'chromosome\', \'position\', \'n_vaf\', \'t_vaf\', \'sample\')\n+    x_col <- c(\'chromosome\', \'position\', \'n_vaf\', \'t_vaf\', \'sample\')\n     if(!all(x_col %in% colnames(x)))\n     {\n         stop(\'Did not detect required column names in x, required columns are: \'\ndiff --git a/R/lohView_tileCalc.R b/R/lohView_tileCalc.R\nnew file mode 100644\nindex 0000000..16c0418\n--- /dev/null\n+++ b/R/lohView_tileCalc.R\n@@ -0,0 +1,47 @@\n+#\' Calculate loh difference\n+#\' \n+#\' Obtain LOH on an entire chromsomes from samples in a cohort\n+#\' @name lohView_tileCalc\n+#\' @param window_data object of class data frame with columns "chromosome", \n+#\' "position", "n_vaf", "t_vaf", "sample", "bin", "window_start", "window_stop"\n+#\' @param normal integer specifying the subtraction value from tumor VAF\n+#\' @return object of class dataframe containing mean LOH difference calculations\n+#\' and column names "window_start", "window_stop", "chromosome", "position", \n+#\' "n_vaf", "t_vaf", "sample", "loh_diff"\n+\n+lohView_tileCalc <- function(window_data, normal)\n+{\n+    \n+    ## Tile function to calculate LOH    \n+    ## Calculate absolute loh difference from normal for each call\n+    total <- lapply(window_data, function(x) {\n+        ## Get the tumor vaf difference from 50\n+        t_vaf <- x$t_vaf\n+        diff <- abs(t_vaf-50)\n+        x$loh_diff <- diff\n+        \n+        ## Obtain the bin values \n+        breaks <- as.character(unique(x$bin))\n+        \n+        ## Calculate the average loh difference within each bin\n+        for (i in 1:length(breaks)) {\n+            data <- subset(x, as.character(x$bin)==breaks[i])\n+            data$loh_diff_avg <- mean(data$loh_diff)\n+            \n+            ## Merge the datasets for each sample\n+            if(!exists("new_loh_data")) {\n+                new_loh_data <- data\n+            }\n+            if(exists("new_loh_data")) {\n+                temp <- data\n+                new_loh_data <- rbind(new_loh_data, temp)\n+                rm(temp)\n+            }\n+            rm(data)\n+        }\n+        return(new_loh_data)\n+    })\n+    return(total)\n+}\n+\n+\ndiff --git a/R/lohView_tilePosition.R b/R/lohView_tilePosition.R\nnew file mode 100644\nindex 0000000..9d16406\n--- /dev/null\n+++ b/R/lohView_tilePosition.R\n@@ -0,0 +1,46 @@\n+#\' Obtain window information\n+#\' \n+#\' Calculate window positions to perform LOH calculation\n+#\' @name lohView_windowPosition\n+#\' @param out object of class dataframe with columns \'chromosome\', \n+#\' \'position\', \'n_vaf\', \'t_vaf\', and \'sample\'\n+#\' @param window_size integer with the size of the sliding window (bp) to be \n+#\' applied\n+#\' @return list containing window start/stop positions for each chromosome \n+#\' from each sample to perform LOH calculations\n+\n+\n+lohView_tilePosition <- function(out, window_size)\n+{\n+    ## Tiling function\n+    window <- lapply(out, function(x) {\n+        min <- as.integer(min(as.numeric(as.character(x$position))))\n+        max <- as.integer(max(as.numeric(as.character(x$position))))\n+        bin <- seq(min, max, by=window_size)\n+        num <- length(bin)\n+        if (bin[num] < max) {\n+            bin[num] <- max\n+        }    \n+        breaks <- cut(as.numeric(as.character(x$position)), breaks=bin, \n+                      include.lowest=TRUE, dig.lab=11)\n+        x$bin <- breaks\n+            \n+        bins <- vector()\n+        bin_min <- vector()\n+        bin_max <- vector()\n+        for(i in 1:length(breaks)) {\n+            bins[i] <- strsplit(as.character(breaks[i]), \n+                                split="[[:punct:]]")\n+            bin_min[i] <- as.numeric(as.character(bins[[i]][2]))\n+            bin_max[i] <- as.numeric(as.character(bins[[i]][3]))\n+        }\n+        x$min <- bin_min\n+        x$max <- bin_max\n+        colnames(x) <- c("chromosome", "position", "n_vaf", "t_vaf", "sample",\n+                         "bin", "window_start", "window_stop")\n+        return(x)\n+    })\n+    \n+    return(window)\n+}\n+\ndiff --git a/R/lohView_tileWindow.R b/R/lohView_tileWindow.R\nnew file mode 100644\nindex 0000000..7bfeb98\n--- /dev/null\n+++ b/R/lohView_tileWindow.R\n@@ -0,0 +1,36 @@\n+#\' Obtain LOH data\n+#\' \n+#\' Obtain LOH heatmap on entire chromsomes from samples in a cohort\n+#\' @name lohView_tileWindow\n+#\' @param loh_data data frame with columns "chromosome", "position", "n_vaf",\n+#\' "t_vaf", "sample" giving raw vaf calls for germline variants\n+#\' @param tile object specifying whether the loh calculations should be tiled\n+#\' @param window_size integer with the size of the sliding window (bp) to be \n+#\' applied\n+#\' @param normal integer specifying the normal VAF frequency used in LOH \n+#\' calculations\n+#\' @return object of class dataframe containing LOH data\n+#\' @importFrom plyr adply\n+#\' @importFrom plyr ldply\n+\n+lohView_tileWindow <- function(loh_data, window_size, normal)\n+{     \n+    ## Obtain lists for each sample and chromosome\n+    out <- split(loh_data, list(as.character(loh_data$chromosome),\n+                                as.character(loh_data$sample)))\n+    \n+    ## Obtain the window position values \n+    window_data <- lohView_tilePosition(out, window_size)\n+    \n+    ## Perform loh difference calculation\n+    total <- data.frame()\n+    final_dataset <- list()\n+    final_dataset <- lohView_tileCalc(window_data, normal=normal)\n+    \n+    ## Combine the lists into a single dataframe\n+    loh_dataset <- plyr::ldply(final_dataset, data.frame)\n+    loh_dataset <- loh_dataset[!duplicated(loh_dataset),]\n+    \n+    return(loh_dataset)\n+}\n+\ndiff --git a/R/lohView_windowPosition.R b/R/lohView_windowPosition.R\nindex 63d58b7..4745c8a 100644\n--- a/R/lohView_windowPosition.R\n+++ b/R/lohView_windowPosition.R\n@@ -13,8 +13,7 @@\n \n lohView_windowPosition <- function(out, step, window_size)\n {\n-    window <- lapply(out, function(x)\n-    {\n+        window <- lapply(out, function(x) {\n         min <- integer()\n         max <- integer()\n         window_stop_1 <- integer()\n@@ -27,8 +26,7 @@ lohView_windowPosition <- function(out, step, window_size)\n \n         num <- trunc(window_num)\n \n-        for (w in 1:num)\n-        {\n+        for (w in 1:num) {\n             window_data[w,1] <- as.integer(min + (step*(w-1)))\n             window_data[w,2] <- as.integer(window_stop_1 + (step*(w-1)))\n         }\ndiff --git a/man/lohView.Rd b/man/lohView.Rd\nindex 8239821..7aa9844 100644\n--- a/man/lohView.Rd\n+++ b/man/lohView.Rd\n@@ -2,11 +2,11 @@\n % Please edit documentation in R/lohView.R\n \\name{lohView}\n \\alias{lohView}\n-\\title{plot LOH data}\n+\\title{Plot LOH data}\n \\usage{\n lohView(x = NULL, path = NULL, fileExt = NULL, y = NULL,\n-  genome = "hg19", step = 5e+05, window_size = 1e+06, normal = 50,\n-  gradient_midpoint = 20, gradient_low = "#ffffff",\n+  genome = "hg19", gender = NULL, step = 5e+05, window_size = 1e+06,\n+  normal = 50, gradient_midpoint = 20, gradient_low = "#ffffff",\n   gradient_mid = "#b2b2ff", gradient_high = "#000000", theme_layer = NULL,\n   method = "tile")\n }\n@@ -14,9 +14,9 @@ lohView(x = NULL, path = NULL, fileExt = NULL, y = NULL,\n \\item{x}{object of class data frame with columns \'chromosome\', \'position\',\n \'n_vaf\', \'t_vaf\', \'sample\'}\n \n-\\item{path}{character string specifying which directory contains \n-the sample information stored as datasets with columns "chromosome", \n-"position", "n_freq", "t_freq", and "sample" (required if x is not specified)}\n+\\item{path}{character string specifying which directory contains\n+the sample information stored as datasets with columns "chromosome",\n+"position", "n_vaf", "t_vaf", and "sample" (required if x is not specified)}\n \n \\item{fileExt}{character string specifying the file extensions of files\n within the path specified (required if path argument is specified)}\n@@ -28,24 +28,28 @@ within the path specified (required if path argument is specified)}\n \\item{genome}{character string specifying the genome assembly from which\n input data is based}\n \n-\\item{step}{integer with the length of divisions (bp) in chromosomes}\n+\\item{gender}{vector of length equal to the number of samples, consisting of\n+elements from the set {"M", "F"}}\n \n-\\item{window_size}{integer with the size of the sliding window (bp) to be \n+\\item{step}{integer with the length of divisions (bp) in chromosomes (only\n+required when tile=FALSE}\n+\n+\\item{window_size}{integer with the size of the sliding window (bp) to be\n applied}\n \n-\\item{normal}{integer specifying the normal VAF frequency used in LOH \n-calculations#\' @return ggplot object}\n+\\item{normal}{integer specifying the normal VAF frequency used in LOH\n+calculations}\n \n-\\item{gradient_midpoint}{object of class numeric specifying the midpoint \n+\\item{gradient_midpoint}{object of class numeric specifying the midpoint\n for legend\'s gradient scale}\n \n-\\item{gradient_low}{object of class character for hex color code for \n+\\item{gradient_low}{object of class character for hex color code for\n gradient\'s lower values}\n \n-\\item{gradient_mid}{object of class character for hex color code for \n+\\item{gradient_mid}{object of class character for hex color code for\n gradient\'s middle values}\n \n-\\item{gradient_high}{object of class character for hex color code for \n+\\item{gradient_high}{object of class character for hex color code for\n gradient\'s upper values}\n \n \\item{theme_layer}{ggplot theme object specifying parameters for non data\n@@ -63,4 +67,3 @@ Produce a graphic visualizing Loss of Heterozygosity in a cohort\n \\examples{\n ## Insert an example once the first part of this is understood\n }\n-\ndiff --git a/man/lohView_fileGlob.Rd b/man/lohView_fileGlob.Rd\nindex c2b7c9c..2558790 100644\n--- a/man/lohView_fileGlob.Rd\n+++ b/man/lohView_fileGlob.Rd\n@@ -4,12 +4,12 @@\n \\alias{lohView_fileGlob}\n \\title{Grab data for lohView}\n \\usage{\n-lohView_fileGlob(path, fileExt, step)\n+lohView_fileGlob(path, fileExt, step, gender)\n }\n \\arguments{\n-\\item{path}{character string specifying which directory contains \n-the sample information stored as datasets with columns "chromosome", \n-"position", "n_freq", "t_freq", and "sample" (required if x is not specified)}\n+\\item{path}{character string specifying which directory contains\n+the sample information stored as datasets with columns "chromosome",\n+"position", "n_vaf", "t_vaf", and "sample" (required if x is not specified)}\n \n \\item{fileExt}{character string specifying the file extensions of files}\n \n@@ -22,4 +22,3 @@ object of class data frame from data specified in path for lohView\n Look in the specified file path and grab data with the proper extension for\n lohView\n }\n-\ndiff --git a/man/lohView_lohCalc.Rd b/man/lohView_lohCalc.Rd\nindex 6f93dbc..efda188 100644\n--- a/man/lohView_lohCalc.Rd\n+++ b/man/lohView_lohCalc.Rd\n@@ -7,20 +7,19 @@\n lohView_lohCalc(window_data, out, normal)\n }\n \\arguments{\n-\\item{window_data}{object of class data frame with columns \n+\\item{window_data}{object of class data frame with columns\n \'window_start\' and \'window_stop}\n \n-\\item{out}{object of class dataframe with columns \'chromosome\', \n-\'position\', \'n_freq\', \'t_freq\', and \'sample\'}\n+\\item{out}{object of class dataframe with columns \'chromosome\',\n+\'position\', \'n_vaf\', \'t_vaf\', and \'sample\'}\n \n \\item{normal}{integer specifying the subtraction value from tumor VAF}\n }\n \\value{\n object of class dataframe containing mean LOH difference calculations\n-and column names "window_start", "window_stop", "chromosome", "position", \n-"n_freq", "t_freq", "sample", "loh_diff"\n+and column names "window_start", "window_stop", "chromosome", "position",\n+"n_vaf", "t_vaf", "sample", "loh_diff"\n }\n \\description{\n Obtain LOH on an entire chromsomes from samples in a cohort\n }\n-\ndiff --git a/man/lohView_slidingWindow.Rd b/man/lohView_slidingWindow.Rd\nindex fa2a3f7..1de50e2 100644\n--- a/man/lohView_slidingWindow.Rd\n+++ b/man/lohView_slidingWindow.Rd\n@@ -2,20 +2,20 @@\n % Please edit documentation in R/lohView_slidingWindow.R\n \\name{lohView_slidingWindow}\n \\alias{lohView_slidingWindow}\n-\\title{obtain LOH data}\n+\\title{Obtain LOH data}\n \\usage{\n lohView_slidingWindow(loh_data, step, window_size, normal)\n }\n \\arguments{\n-\\item{loh_data}{data frame with columns "chromosome", "position", "n_freq",\n-"tfreq", "sample" giving raw vaf calls for germline variants}\n+\\item{loh_data}{data frame with columns "chromosome", "position", "n_vaf",\n+"t_vaf", "sample" giving raw vaf calls for germline variants}\n \n \\item{step}{integer with the length of divisions (bp) in chromosomes}\n \n-\\item{window_size}{integer with the size of the sliding window (bp) to be \n+\\item{window_size}{integer with the size of the sliding window (bp) to be\n applied}\n \n-\\item{normal}{integer specifying the normal VAF frequency used in LOH \n+\\item{normal}{integer specifying the normal VAF frequency used in LOH\n calculations}\n }\n \\value{\n@@ -24,4 +24,3 @@ object of class dataframe containing LOH data\n \\description{\n Obtain LOH heatmap on entire chromsomes from samples in a cohort\n }\n-\ndiff --git a/man/lohView_windowPosition.Rd b/man/lohView_windowPosition.Rd\nindex 5f933fb..2817712 100644\n--- a/man/lohView_windowPosition.Rd\n+++ b/man/lohView_windowPosition.Rd\n@@ -1,25 +1,38 @@\n % Generated by roxygen2: do not edit by hand\n-% Please edit documentation in R/lohView_windowPosition.R\n+% Please edit documentation in R/lohView_tilePosition.R, R/lohView_windowPosition.R\n \\name{lohView_windowPosition}\n+\\alias{lohView_tilePosition}\n \\alias{lohView_windowPosition}\n \\title{Obtain window information}\n \\usage{\n+lohView_tilePosition(out, window_size)\n+\n lohView_windowPosition(out, step, window_size)\n }\n \\arguments{\n-\\item{out}{object of class dataframe with columns \'chromosome\', \n-\'position\', \'n_freq\', \'t_freq\', and \'sample\'}\n+\\item{out}{object of class dataframe with columns \'chromosome\',\n+\'position\', \'n_vaf\', \'t_vaf\', and \'sample\'}\n+\n+\\item{window_size}{integer with the size of the sliding window (bp) to be\n+applied}\n \n \\item{step}{integer with the length of divisions (bp) in chromosomes}\n \n-\\item{window_size}{integer with the size of the sliding window (bp) to be \n+\\item{out}{object of class dataframe with columns \'chromosome\',\n+\'position\', \'n_vaf\', \'t_vaf\', and \'sample\'}\n+\n+\\item{window_size}{integer with the size of the sliding window (bp) to be\n applied}\n }\n \\value{\n-list containing window start/stop positions for each chromosome \n+list containing window start/stop positions for each chromosome\n+from each sample to perform LOH calculations\n+\n+list containing window start/stop positions for each chromosome\n from each sample to perform LOH calculations\n }\n \\description{\n Calculate window positions to perform LOH calculation\n-}\n \n+Calculate window positions to perform LOH calculation\n+}\n', 'commit_subject': 'further changes to mirror bioconductor', 'repo_name': 'griffithlab/GenVisR', 'committer': {'name': 'Zachary Skidmore', 'email': '807d42ceb3467b51a324e5fecf3d0c7ef3e3ebbc@genome.wustl.edu', 'time_sec': '1454442835', 'tz_offset': '0', 'date': {'seconds': '1454442835'}}, 'commit_tree': '1f0b494516f9064270188d95869501bbf27643ba', 'commit_message': 'further changes to mirror bioconductor\n\nFrom: Zach Skidmore <zskidmor@genome.wustl.edu>\n\ngit-svn-id: 274f1dac86931020afba6208eb04fedad756fa4a@113188 bc3139a8-67e5-0310-9ffc-ced21a209358\n', 'language_name': 'R', 'license': 'cc0-1.0', 'hunks': '@@ -2,11 +2,11 @@\n % Please edit documentation in R/lohView.R\n \\name{lohView}\n \\alias{lohView}\n-\\title{plot LOH data}\n+\\title{Plot LOH data}\n \\usage{\n lohView(x = NULL, path = NULL, fileExt = NULL, y = NULL,\n-  genome = "hg19", step = 5e+05, window_size = 1e+06, normal = 50,\n-  gradient_midpoint = 20, gradient_low = "#ffffff",\n+  genome = "hg19", gender = NULL, step = 5e+05, window_size = 1e+06,\n+  normal = 50, gradient_midpoint = 20, gradient_low = "#ffffff",\n   gradient_mid = "#b2b2ff", gradient_high = "#000000", theme_layer = NULL,\n   method = "tile")\n }\n@@ -14,9 +14,9 @@ lohView(x = NULL, path = NULL, fileExt = NULL, y = NULL,\n \\item{x}{object of class data frame with columns \'chromosome\', \'position\',\n \'n_vaf\', \'t_vaf\', \'sample\'}\n \n-\\item{path}{character string specifying which directory contains \n-the sample information stored as datasets with columns "chromosome", \n-"position", "n_freq", "t_freq", and "sample" (required if x is not specified)}\n+\\item{path}{character string specifying which directory contains\n+the sample information stored as datasets with columns "chromosome",\n+"position", "n_vaf", "t_vaf", and "sample" (required if x is not specified)}\n \n \\item{fileExt}{character string specifying the file extensions of files\n within the path specified (required if path argument is specified)}\n@@ -28,24 +28,28 @@ within the path specified (required if path argument is specified)}\n \\item{genome}{character string specifying the genome assembly from which\n input data is based}\n \n-\\item{step}{integer with the length of divisions (bp) in chromosomes}\n+\\item{gender}{vector of length equal to the number of samples, consisting of\n+elements from the set {"M", "F"}}\n \n-\\item{window_size}{integer with the size of the sliding window (bp) to be \n+\\item{step}{integer with the length of divisions (bp) in chromosomes (only\n+required when tile=FALSE}\n+\n+\\item{window_size}{integer with the size of the sliding window (bp) to be\n applied}\n \n-\\item{normal}{integer specifying the normal VAF frequency used in LOH \n-calculations#\' @return ggplot object}\n+\\item{normal}{integer specifying the normal VAF frequency used in LOH\n+calculations}\n \n-\\item{gradient_midpoint}{object of class numeric specifying the midpoint \n+\\item{gradient_midpoint}{object of class numeric specifying the midpoint\n for legend\'s gradient scale}\n \n-\\item{gradient_low}{object of class character for hex color code for \n+\\item{gradient_low}{object of class character for hex color code for\n gradient\'s lower values}\n \n-\\item{gradient_mid}{object of class character for hex color code for \n+\\item{gradient_mid}{object of class character for hex color code for\n gradient\'s middle values}\n \n-\\item{gradient_high}{object of class character for hex color code for \n+\\item{gradient_high}{object of class character for hex color code for\n gradient\'s upper values}\n \n \\item{theme_layer}{ggplot theme object specifying parameters for non data\n@@ -63,4 +67,3 @@ Produce a graphic visualizing Loss of Heterozygosity in a cohort\n \\examples{\n ## Insert an example once the first part of this is understood\n }\n-\n', 'addition_count': 18, 'deletion_count': 15, 'src_file': 'a/man/lohView.Rd', 'tgt_file': 'b/man/lohView.Rd', 'file_extension': '.Rd', 'before_file': '% Generated by roxygen2: do not edit by hand\n% Please edit documentation in R/lohView.R\n\\name{lohView}\n\\alias{lohView}\n\\title{plot LOH data}\n\\usage{\nlohView(x = NULL, path = NULL, fileExt = NULL, y = NULL,\n  genome = "hg19", step = 5e+05, window_size = 1e+06, normal = 50,\n  gradient_midpoint = 20, gradient_low = "#ffffff",\n  gradient_mid = "#b2b2ff", gradient_high = "#000000", theme_layer = NULL,\n  method = "tile")\n}\n  ideogram_txtSize = 5,\n\\item{x}{object of class data frame with columns \'chromosome\', \'position\',\n\'n_vaf\', \'t_vaf\', \'sample\'}\n\n\\item{path}{character string specifying which directory contains \nthe sample information stored as datasets with columns "chromosome", \n"position", "n_freq", "t_freq", and "sample" (required if x is not specified)}\n\n\\item{fileExt}{character string specifying the file extensions of files\nwithin the path specified (required if path argument is specified)}\n\n\\item{y}{Object of class data frame with rows representing cytogenetic bands\nfor a chromosome. The data frame must contain columns with the following\nnames "chrom", "chromStart", "chromEnd", "name", "gieStain" for plotting the\nideogram (optional: see details).}\n\\item{genome}{character string specifying the genome assembly from which\ninput data is based}\n\n\\item{step}{integer with the length of divisions (bp) in chromosomes}\n\n\\item{window_size}{integer with the size of the sliding window (bp) to be \napplied}\n\n\\item{normal}{integer specifying the normal VAF frequency used in LOH \ncalculations#\' @return ggplot object}\n\n\\item{gradient_midpoint}{object of class numeric specifying the midpoint \nfor legend\'s gradient scale}\n\n\\item{gradient_low}{object of class character for hex color code for \ngradient\'s lower values}\n\n\\item{gradient_mid}{object of class character for hex color code for \ngradient\'s middle values}\n\n\\item{gradient_high}{object of class character for hex color code for \ngradient\'s upper values}\n\n\\item{theme_layer}{ggplot theme object specifying parameters for non data\n\\details{\nlohView is able to plot in two modes specified via the `chr`\nparameter, these modes are single chromosome view in which an ideogram is\ndisplayed and genome view where chromosomes are faceted. For the single\nchromosome view cytogenetic band information is required giving the\ncoordinate, stain, and name of each band. As a convenience GenVisR stores\nthis information for the following genomes "hg19", "hg38", "mm9", "mm10", and\n"rn5". If the genome assembly supplied to the `genome` parameter is not one\nof the 5 afore mentioned genome assemblies GenVisR will attempt to query the\nUCSC MySQL database to retrieve this information. Alternatively the user can\nmanually supply this information as a data frame to the `y` parameter, input\n\\examples{\n## Insert an example once the first part of this is understood\n}\n\nin input to `x`, failure to do so may result in a misleading visual!\n}\n\\examples{\n# Plot loh for chromosome 5\nlohView(HCC1395_Germline, chr=\'chr5\', genome=\'hg19\', ideogram_txtSize=4)\n}\n', 'message': 'further changes to mirror bioconductor\n\nFrom: Zach Skidmore <zskidmor@genome.wustl.edu>\n\ngit-svn-id: 274f1dac86931020afba6208eb04fedad756fa4a@113188 bc3139a8-67e5-0310-9ffc-ced21a209358\n', 'author_name': 'Zachary Skidmore', 'lang': 'Rd'}