gatk-3.8/R/src/gsalib/man/read.gatkreport.Rd

56 lines
1.6 KiB
Plaintext
Raw Normal View History

* Added an R package, "gsalib", providing a place to store common, useful, documented R methods. To use this module, you must follow three steps: 1) Build the module with the following command: $ ant gsalib 2) Add the module path to your ~/.Rprofile file: .libPaths("/path/to/Sting/trunk/R/") 3) At the top of each R script that will use the library, include the line: library(gsalib) You can now use the package like any other R package. To get high-level documentation, supply the following command to R: help(gsalib) The methods contained herein are: getargs : A method to easily provide arguments to interactive and non-interactive scripts. Prints out a help message specifying how the script should be run if no arguments or "-h" is provided. Very helpful when you're writing an R-script piecemeal in interactive mode, then want to make it a command-line program. plot.venn : Plots a two-way or three-way proportional Venn diagram. read.eval : Reads VariantEval output that's formatted in R style. read.gatkreport : Reads GATKReport output. gsa.message : Emits a message with the prefix "[gsalib]" to stdout. gsa.warn : Emits a warning message with the prefix "[gsalib] Warning:" to stdout. gsa.error : Emits an error message with the prefix "[gsalib] Error: to stdout, calls traceback() and halts execution. Documentation on each of these methods can be obtained by typing "help(method_name)" at the R prompt. * Retired GATKReport.R, as that functionality has now been moved to gsalib. * Retired gsacommons, as that functionality has been split between gsalib and VariantReport.R. * Modified VariantReport.R to make use of gsalib. The script now uses the getargs() method to provide the user with some information as to the proper way to run the script. Documentation on how to prepare output is given at http://www.broadinstitute.org/gsa/wiki/index.php/VariantEval . * Added 'gsalib' target to build.xml file. Running "ant gsalib" will compile this module and place the R-ready package in R/gsalib . git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@4416 348d0f76-0448-11de-a6fe-93d51630548a
2010-10-04 08:27:59 +08:00
\name{read.gatkreport}
\alias{read.gatkreport}
\title{
read.gatkreport
}
\description{
Reads a GATKReport file - a multi-table document - and loads each table as a separate data.frame object in a list.
}
\usage{
read.gatkreport(filename)
}
\arguments{
\item{filename}{
The path to the GATKReport file.
}
}
\details{
The GATKReport format replaces the multi-file output format used by many GATK tools and provides a single, consolidated file format. This format accomodates multiple tables and is still R-loadable - through this function.
The file format looks like this:
\preformatted{##:GATKReport.v0.1 TableName : The description of the table
col1 col2 col3
0 0.007451835696110506 25.474613284804366
1 0.002362777171937477 29.844949954504095
2 9.087604507451836E-4 32.87590975254731
3 5.452562704471102E-4 34.498999090081895
4 9.087604507451836E-4 35.14831665150137
}
}
\value{
Returns a list object, where each key is the TableName and the value is the data.frame object with the contents of the table. If multiple tables with the same name exist, each one after the first will be given names of "TableName.v1", "TableName.v2", ..., "TableName.vN".
%% ~Describe the value returned
%% If it is a LIST, use
%% \item{comp1 }{Description of 'comp1'}
%% \item{comp2 }{Description of 'comp2'}
%% ...
}
\references{
%% ~put references to the literature/web site here ~
}
\author{
Kiran Garimella
}
\note{
%% ~~further notes~~
}
\seealso{
%% ~~objects to See Also as \code{\link{help}}, ~~~
}
\examples{
report = read.gatkreport("/path/to/my/output.gatkreport");
}
\keyword{ ~kwd1 }