git-svn-id: file:///home/git/hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/basecallQC@130196 bc3139a8-67e5-0310-9ffc-ced21a209358
... | ... |
@@ -1,50 +1,50 @@ |
1 |
-#' Generate basecallQC report |
|
2 |
-#' |
|
3 |
-#' Creates a summary report from basecalling and demultiplexing metrics. |
|
4 |
-#' |
|
5 |
-#' @usage |
|
6 |
-#' \S4method{reportBCL}{basecallQC}(object,reportOut,reportOutDir,output,reportRMDfile,FQQC) |
|
7 |
-#' @docType methods |
|
8 |
-#' @name reportBCL |
|
9 |
-#' @rdname reportBCL |
|
10 |
-#' @aliases reportBCL reportBCL,baseCallQC-method |
|
11 |
-#' @author Thomas Carroll |
|
12 |
-#' |
|
13 |
-#' @param object A basecall QC object as returned from basecallQC() function |
|
14 |
-#' @param reportOut Name of report file |
|
15 |
-#' @param reportOutDir Directory for the report file |
|
16 |
-#' @param output Whether the report contains frozen or sortable tables. Options are "static" and "html" |
|
17 |
-#' @param reportRMDfile RMD to be used for reporting. (Default uses standard report template) |
|
18 |
-#' @param FQQC TRUE or FALSE, whether to run ShortRead fastq QC on any fastQ in output directory. |
|
19 |
-#' @return An HTML report is written to file. |
|
20 |
-#' @import stringr XML RColorBrewer methods raster ShortRead prettydoc |
|
21 |
-#' @examples |
|
22 |
-#' |
|
23 |
-#' fileLocations <- system.file("extdata",package="basecallQC") |
|
24 |
-#' runXML <- dir(fileLocations,pattern="runParameters.xml",full.names=TRUE) |
|
25 |
-#' config <- dir(fileLocations,pattern="config.ini",full.names=TRUE) |
|
26 |
-#' sampleSheet <- dir(fileLocations,pattern="*\\.csv",full.names=TRUE) |
|
27 |
-#' outDir <- file.path(fileLocations,"Runs/161105_D00467_0205_AC9L0AANXX/C9L0AANXX/") |
|
28 |
-#' bcl2fastqparams <- BCL2FastQparams(runXML,config,runDir=getwd(),outDir,verbose=FALSE) |
|
29 |
-#' bclQC <- basecallQC(bcl2fastqparams,RunMetaData=NULL,sampleSheet) |
|
30 |
-#' reportBCL(bclQC,"TestReport.html",output="html") |
|
31 |
-#' @export |
|
32 |
-reportBCL.basecallQC <- function(object,reportOut="report.html",reportOutDir=getwd(), |
|
33 |
- output="static",reportRMDfile=NULL,FQQC=FALSE){ |
|
34 |
- BCLQCreport <- object |
|
35 |
- doFQQC <- FQQC |
|
36 |
- fileLocations <- system.file("extdata",package="basecallQC") |
|
37 |
- if(is.null(reportRMDfile)){ |
|
38 |
- reportRMD <- file.path(fileLocations,"reportRMDs","basecallqcreport.Rmd") |
|
39 |
- } |
|
40 |
- if(!file.exists(reportRMD)) stop() |
|
41 |
- render(reportRMD, |
|
42 |
- output_file = reportOut,output_dir=reportOutDir,params=list(title=paste0("basecallQC"))) |
|
43 |
-} |
|
44 |
- |
|
45 |
-setGeneric("reportBCL", function(object="basecallQC",reportOut="character",reportOutDir="character", |
|
46 |
- output="character",reportRMDfile=NULL,FQQC=FALSE) standardGeneric("reportBCL")) |
|
47 |
- |
|
48 |
-#' @rdname reportBCL |
|
49 |
-#' @export |
|
50 |
-setMethod("reportBCL", signature(object="basecallQC"), reportBCL.basecallQC) |
|
1 |
+#' Generate basecallQC report |
|
2 |
+#' |
|
3 |
+#' Creates a summary report from basecalling and demultiplexing metrics. |
|
4 |
+#' |
|
5 |
+#' @usage |
|
6 |
+#' \S4method{reportBCL}{basecallQC}(object,reportOut,reportOutDir,output,reportRMDfile,FQQC) |
|
7 |
+#' @docType methods |
|
8 |
+#' @name reportBCL |
|
9 |
+#' @rdname reportBCL |
|
10 |
+#' @aliases reportBCL reportBCL,baseCallQC-method |
|
11 |
+#' @author Thomas Carroll |
|
12 |
+#' |
|
13 |
+#' @param object A basecall QC object as returned from basecallQC() function |
|
14 |
+#' @param reportOut Name of report file |
|
15 |
+#' @param reportOutDir Directory for the report file |
|
16 |
+#' @param output Whether the report contains frozen or sortable tables. Options are "static" and "html" |
|
17 |
+#' @param reportRMDfile RMD to be used for reporting. (Default uses standard report template) |
|
18 |
+#' @param FQQC TRUE or FALSE, whether to run ShortRead fastq QC on any fastQ in output directory. |
|
19 |
+#' @return An HTML report is written to file. |
|
20 |
+#' @import stringr XML RColorBrewer methods raster ShortRead prettydoc |
|
21 |
+#' @examples |
|
22 |
+#' |
|
23 |
+#' fileLocations <- system.file("extdata",package="basecallQC") |
|
24 |
+#' runXML <- dir(fileLocations,pattern="runParameters.xml",full.names=TRUE) |
|
25 |
+#' config <- dir(fileLocations,pattern="config.ini",full.names=TRUE) |
|
26 |
+#' sampleSheet <- dir(fileLocations,pattern="*\\.csv",full.names=TRUE) |
|
27 |
+#' outDir <- file.path(fileLocations,"Runs/161105_D00467_0205_AC9L0AANXX/C9L0AANXX/") |
|
28 |
+#' bcl2fastqparams <- BCL2FastQparams(runXML,config,runDir=getwd(),outDir,verbose=FALSE) |
|
29 |
+#' bclQC <- basecallQC(bcl2fastqparams,RunMetaData=NULL,sampleSheet) |
|
30 |
+#' reportBCL(bclQC,"TestReport.html",output="html") |
|
31 |
+#' @export |
|
32 |
+reportBCL.basecallQC <- function(object,reportOut="report.html",reportOutDir=getwd(), |
|
33 |
+ output="static",reportRMDfile=NULL,FQQC=FALSE){ |
|
34 |
+ BCLQCreport <- object |
|
35 |
+ doFQQC <- FQQC |
|
36 |
+ fileLocations <- system.file("extdata",package="basecallQC") |
|
37 |
+ if(is.null(reportRMDfile)){ |
|
38 |
+ reportRMD <- file.path(fileLocations,"reportRMDs","basecallqcreport.Rmd") |
|
39 |
+ } |
|
40 |
+ if(!file.exists(reportRMD)) stop() |
|
41 |
+ render(reportRMD, |
|
42 |
+ output_file = reportOut,output_dir=reportOutDir,params=list(title=paste0("basecallQC"))) |
|
43 |
+} |
|
44 |
+ |
|
45 |
+setGeneric("reportBCL", function(object="basecallQC",reportOut="character",reportOutDir="character", |
|
46 |
+ output="character",reportRMDfile=NULL,FQQC=FALSE) standardGeneric("reportBCL")) |
|
47 |
+ |
|
48 |
+#' @rdname reportBCL |
|
49 |
+#' @export |
|
50 |
+setMethod("reportBCL", signature(object="basecallQC"), reportBCL.basecallQC) |
git-svn-id: file:///home/git/hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/basecallQC@128350 bc3139a8-67e5-0310-9ffc-ced21a209358
1 | 1 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,50 @@ |
1 |
+#' Generate basecallQC report |
|
2 |
+#' |
|
3 |
+#' Creates a summary report from basecalling and demultiplexing metrics. |
|
4 |
+#' |
|
5 |
+#' @usage |
|
6 |
+#' \S4method{reportBCL}{basecallQC}(object,reportOut,reportOutDir,output,reportRMDfile,FQQC) |
|
7 |
+#' @docType methods |
|
8 |
+#' @name reportBCL |
|
9 |
+#' @rdname reportBCL |
|
10 |
+#' @aliases reportBCL reportBCL,baseCallQC-method |
|
11 |
+#' @author Thomas Carroll |
|
12 |
+#' |
|
13 |
+#' @param object A basecall QC object as returned from basecallQC() function |
|
14 |
+#' @param reportOut Name of report file |
|
15 |
+#' @param reportOutDir Directory for the report file |
|
16 |
+#' @param output Whether the report contains frozen or sortable tables. Options are "static" and "html" |
|
17 |
+#' @param reportRMDfile RMD to be used for reporting. (Default uses standard report template) |
|
18 |
+#' @param FQQC TRUE or FALSE, whether to run ShortRead fastq QC on any fastQ in output directory. |
|
19 |
+#' @return An HTML report is written to file. |
|
20 |
+#' @import stringr XML RColorBrewer methods raster ShortRead prettydoc |
|
21 |
+#' @examples |
|
22 |
+#' |
|
23 |
+#' fileLocations <- system.file("extdata",package="basecallQC") |
|
24 |
+#' runXML <- dir(fileLocations,pattern="runParameters.xml",full.names=TRUE) |
|
25 |
+#' config <- dir(fileLocations,pattern="config.ini",full.names=TRUE) |
|
26 |
+#' sampleSheet <- dir(fileLocations,pattern="*\\.csv",full.names=TRUE) |
|
27 |
+#' outDir <- file.path(fileLocations,"Runs/161105_D00467_0205_AC9L0AANXX/C9L0AANXX/") |
|
28 |
+#' bcl2fastqparams <- BCL2FastQparams(runXML,config,runDir=getwd(),outDir,verbose=FALSE) |
|
29 |
+#' bclQC <- basecallQC(bcl2fastqparams,RunMetaData=NULL,sampleSheet) |
|
30 |
+#' reportBCL(bclQC,"TestReport.html",output="html") |
|
31 |
+#' @export |
|
32 |
+reportBCL.basecallQC <- function(object,reportOut="report.html",reportOutDir=getwd(), |
|
33 |
+ output="static",reportRMDfile=NULL,FQQC=FALSE){ |
|
34 |
+ BCLQCreport <- object |
|
35 |
+ doFQQC <- FQQC |
|
36 |
+ fileLocations <- system.file("extdata",package="basecallQC") |
|
37 |
+ if(is.null(reportRMDfile)){ |
|
38 |
+ reportRMD <- file.path(fileLocations,"reportRMDs","basecallqcreport.Rmd") |
|
39 |
+ } |
|
40 |
+ if(!file.exists(reportRMD)) stop() |
|
41 |
+ render(reportRMD, |
|
42 |
+ output_file = reportOut,output_dir=reportOutDir,params=list(title=paste0("basecallQC"))) |
|
43 |
+} |
|
44 |
+ |
|
45 |
+setGeneric("reportBCL", function(object="basecallQC",reportOut="character",reportOutDir="character", |
|
46 |
+ output="character",reportRMDfile=NULL,FQQC=FALSE) standardGeneric("reportBCL")) |
|
47 |
+ |
|
48 |
+#' @rdname reportBCL |
|
49 |
+#' @export |
|
50 |
+setMethod("reportBCL", signature(object="basecallQC"), reportBCL.basecallQC) |