Retrieves per-sample or per-lane metrics from the SQUID database and populates a dataframe with the results.
git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@4693 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
parent
01b721ab61
commit
50dbbdb8ab
|
|
@ -0,0 +1,22 @@
|
|||
read.squidmetrics = function(project, bylane = FALSE) {
|
||||
suppressMessages(library(ROracle));
|
||||
|
||||
drv = dbDriver("Oracle");
|
||||
con = dbConnect(drv, "REPORTING/REPORTING@ora01:1521/SEQPROD");
|
||||
|
||||
if (bylane) {
|
||||
rs = dbSendQuery(con, statement = paste("SELECT * FROM ILLUMINA_PICARD_METRICS"));
|
||||
d = fetch(rs, n=-1);
|
||||
dbHasCompleted(rs);
|
||||
dbClearResult(rs);
|
||||
} else {
|
||||
rs = dbSendQuery(con, statement = paste("SELECT * FROM ILLUMINA_SAMPLE_STATUS_AGG"));
|
||||
d = fetch(rs, n=-1);
|
||||
dbHasCompleted(rs);
|
||||
dbClearResult(rs);
|
||||
}
|
||||
|
||||
oraCloseDriver(drv);
|
||||
|
||||
d;
|
||||
}
|
||||
|
|
@ -0,0 +1,48 @@
|
|||
\name{read.squidmetrics}
|
||||
\alias{read.squidmetrics}
|
||||
\title{
|
||||
read.squidmetrics
|
||||
}
|
||||
\description{
|
||||
Reads metrics for a specified SQUID project into a dataframe.
|
||||
}
|
||||
\usage{
|
||||
read.squidmetrics("C315")
|
||||
}
|
||||
\arguments{
|
||||
\item{project}{
|
||||
The project for which metrics should be obtained.
|
||||
}
|
||||
\item{bylane}{
|
||||
If TRUE, obtains per-lane metrics rather than the default per-sample metrics.
|
||||
}
|
||||
}
|
||||
\details{
|
||||
%% ~~ If necessary, more details than the description above ~~
|
||||
}
|
||||
\value{
|
||||
%% ~Describe the value returned
|
||||
%% If it is a LIST, use
|
||||
%% \item{comp1 }{Description of 'comp1'}
|
||||
%% \item{comp2 }{Description of 'comp2'}
|
||||
%% ...
|
||||
Returns a data frame with samples (or lanes) as the row and the metric as the column.
|
||||
}
|
||||
\references{
|
||||
%% ~put references to the literature/web site here ~
|
||||
}
|
||||
\author{
|
||||
Kiran Garimella
|
||||
}
|
||||
\note{
|
||||
This method will only work within the Broad Institute internal network.
|
||||
}
|
||||
|
||||
\seealso{
|
||||
%% ~~objects to See Also as \code{\link{help}}, ~~~
|
||||
}
|
||||
\examples{
|
||||
## Obtain metrics for project C315.
|
||||
d = read.squidmetrics("C315");
|
||||
}
|
||||
\keyword{ ~kwd1 }
|
||||
Loading…
Reference in New Issue