git-svn-id: file:///home/git/hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/basecallQC@130196 bc3139a8-67e5-0310-9ffc-ced21a209358
... | ... |
@@ -1,68 +1,72 @@ |
1 |
-#' Read lengths |
|
2 |
-#' |
|
3 |
-#' Read lengths as defined by runParameters.xml |
|
4 |
-#' |
|
5 |
-#' @usage |
|
6 |
-#' \S4method{readlengths}{BCL2FastQparams}(object) |
|
7 |
-#' |
|
8 |
-#' @docType methods |
|
9 |
-#' @name readlengths |
|
10 |
-#' @rdname readlengths |
|
11 |
-#' @aliases readlengths readlengths,BCL2FastQparams-method, readlengths.bcl2fastqparams |
|
12 |
-#' |
|
13 |
-#' @author Thomas Carroll |
|
14 |
-#' @examples |
|
15 |
-#' fileLocations <- system.file("extdata",package="basecallQC") |
|
16 |
-#' runXML <- dir(fileLocations,pattern="runParameters.xml",full.names=TRUE) |
|
17 |
-#' config <- dir(fileLocations,pattern="config.ini",full.names=TRUE) |
|
18 |
-#' bcl2fastqparams <- BCL2FastQparams(runXML,config,runDir=getwd(),verbose=FALSE) |
|
19 |
-#' readlength <- readlengths(bcl2fastqparams) |
|
20 |
-#' @param object A BCL2FastQparams object |
|
21 |
-#' @return Read lengths as defined runParamaeters.xml |
|
22 |
-#' @export |
|
23 |
-readlengths.bcl2fastqparams <- function (object) |
|
24 |
-{ |
|
25 |
- dplyr::select(object@RunParameters$runParams,Read1,Read2) %>% mutate_all(as.numeric) |
|
26 |
-} |
|
27 |
- |
|
28 |
-setGeneric("readlengths", function(object="BCL2FastQparams") standardGeneric("readlengths")) |
|
29 |
- |
|
30 |
-#' @rdname readlengths |
|
31 |
-#' @export |
|
32 |
-setMethod("readlengths", signature(object="BCL2FastQparams"), readlengths.bcl2fastqparams) |
|
33 |
- |
|
34 |
-#' Index lengths |
|
35 |
-#' |
|
36 |
-#' Index lengths as defined by runParameters.xml |
|
37 |
-#' |
|
38 |
-#' @usage |
|
39 |
-#' \S4method{indexlengths}{BCL2FastQparams}(object) |
|
40 |
-#' |
|
41 |
-#' @docType methods |
|
42 |
-#' @name indexlengths |
|
43 |
-#' @rdname indexlengths |
|
44 |
-#' @aliases indexlengths indexlengths,BCL2FastQparams-method, indexlengths.bcl2fastqparams |
|
45 |
-#' |
|
46 |
-#' @author Thomas Carroll |
|
47 |
-#' @examples |
|
48 |
-#' fileLocations <- system.file("extdata",package="basecallQC") |
|
49 |
-#' runXML <- dir(fileLocations,pattern="runParameters.xml",full.names=TRUE) |
|
50 |
-#' config <- dir(fileLocations,pattern="config.ini",full.names=TRUE) |
|
51 |
-#' bcl2fastqparams <- BCL2FastQparams(runXML,config,runDir=getwd(),verbose=FALSE) |
|
52 |
-#' indexlength <- indexlengths(bcl2fastqparams) |
|
53 |
-#' @param object A BCL2FastQparams object |
|
54 |
-#' @return Index lengths as defined runParameters.xml. |
|
55 |
-#' @export |
|
56 |
-indexlengths.bcl2fastqparams <- function (object) |
|
57 |
-{ |
|
58 |
- dplyr::select(object@RunParameters$runParams,IndexRead1,IndexRead2) %>% mutate_all(as.numeric) |
|
59 |
-} |
|
60 |
- |
|
61 |
-setGeneric("indexlengths", function(object="BCL2FastQparams") standardGeneric("indexlengths")) |
|
62 |
- |
|
63 |
-#' @rdname indexlengths |
|
64 |
-#' @export |
|
65 |
-setMethod("indexlengths", signature(object="BCL2FastQparams"), indexlengths.bcl2fastqparams) |
|
66 |
- |
|
67 |
- |
|
68 |
- |
|
1 |
+#' Read lengths |
|
2 |
+#' |
|
3 |
+#' Read lengths as defined by runParameters.xml |
|
4 |
+#' |
|
5 |
+#' @usage |
|
6 |
+#' \S4method{readlengths}{BCL2FastQparams}(object) |
|
7 |
+#' |
|
8 |
+#' @docType methods |
|
9 |
+#' @name readlengths |
|
10 |
+#' @rdname readlengths |
|
11 |
+#' @aliases readlengths readlengths,BCL2FastQparams-method, readlengths.bcl2fastqparams |
|
12 |
+#' |
|
13 |
+#' @author Thomas Carroll |
|
14 |
+#' @examples |
|
15 |
+#' fileLocations <- system.file("extdata",package="basecallQC") |
|
16 |
+#' runXML <- dir(fileLocations,pattern="runParameters.xml",full.names=TRUE) |
|
17 |
+#' config <- dir(fileLocations,pattern="config.ini",full.names=TRUE) |
|
18 |
+#' bcl2fastqparams <- BCL2FastQparams(runXML,config,runDir=getwd(),verbose=FALSE) |
|
19 |
+#' readlength <- readlengths(bcl2fastqparams) |
|
20 |
+#' @param object A BCL2FastQparams object |
|
21 |
+#' @return Read lengths as defined runParamaeters.xml |
|
22 |
+#' @export |
|
23 |
+readlengths.bcl2fastqparams <- function (object) |
|
24 |
+{ |
|
25 |
+ dplyr::select(object@RunParameters$runParams,Read1,Read2) %>% mutate_all(as.numeric) |
|
26 |
+} |
|
27 |
+ |
|
28 |
+setGeneric("readlengths", function(object="BCL2FastQparams") standardGeneric("readlengths")) |
|
29 |
+ |
|
30 |
+#' @rdname readlengths |
|
31 |
+#' @export |
|
32 |
+setMethod("readlengths", signature(object="BCL2FastQparams"), readlengths.bcl2fastqparams) |
|
33 |
+ |
|
34 |
+#' Index lengths |
|
35 |
+#' |
|
36 |
+#' Index lengths as defined by runParameters.xml |
|
37 |
+#' |
|
38 |
+#' @usage |
|
39 |
+#' \S4method{indexlengths}{BCL2FastQparams}(object) |
|
40 |
+#' |
|
41 |
+#' @docType methods |
|
42 |
+#' @name indexlengths |
|
43 |
+#' @rdname indexlengths |
|
44 |
+#' @aliases indexlengths indexlengths,BCL2FastQparams-method, indexlengths.bcl2fastqparams |
|
45 |
+#' |
|
46 |
+#' @author Thomas Carroll |
|
47 |
+#' @examples |
|
48 |
+#' fileLocations <- system.file("extdata",package="basecallQC") |
|
49 |
+#' runXML <- dir(fileLocations,pattern="runParameters.xml",full.names=TRUE) |
|
50 |
+#' config <- dir(fileLocations,pattern="config.ini",full.names=TRUE) |
|
51 |
+#' bcl2fastqparams <- BCL2FastQparams(runXML,config,runDir=getwd(),verbose=FALSE) |
|
52 |
+#' indexlength <- indexlengths(bcl2fastqparams) |
|
53 |
+#' @param object A BCL2FastQparams object |
|
54 |
+#' @return Index lengths as defined runParameters.xml. |
|
55 |
+#' @export |
|
56 |
+indexlengths.bcl2fastqparams <- function (object) |
|
57 |
+{ |
|
58 |
+ dplyr::select(object@RunParameters$runParams,IndexRead1,IndexRead2) %>% mutate_all(as.numeric) |
|
59 |
+} |
|
60 |
+ |
|
61 |
+setGeneric("indexlengths", function(object="BCL2FastQparams") standardGeneric("indexlengths")) |
|
62 |
+ |
|
63 |
+#' @rdname indexlengths |
|
64 |
+#' @export |
|
65 |
+setMethod("indexlengths", signature(object="BCL2FastQparams"), indexlengths.bcl2fastqparams) |
|
66 |
+ |
|
67 |
+ |
|
68 |
+readPattern <- function(bcl2fastqparams){ |
|
69 |
+ c(readlengths(bcl2fastqparams)[1],indexlengths(bcl2fastqparams)[1], |
|
70 |
+ indexlengths(bcl2fastqparams)[2],readlengths(bcl2fastqparams)[2]) |
|
71 |
+} |
|
72 |
+ |
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,68 @@ |
1 |
+#' Read lengths |
|
2 |
+#' |
|
3 |
+#' Read lengths as defined by runParameters.xml |
|
4 |
+#' |
|
5 |
+#' @usage |
|
6 |
+#' \S4method{readlengths}{BCL2FastQparams}(object) |
|
7 |
+#' |
|
8 |
+#' @docType methods |
|
9 |
+#' @name readlengths |
|
10 |
+#' @rdname readlengths |
|
11 |
+#' @aliases readlengths readlengths,BCL2FastQparams-method, readlengths.bcl2fastqparams |
|
12 |
+#' |
|
13 |
+#' @author Thomas Carroll |
|
14 |
+#' @examples |
|
15 |
+#' fileLocations <- system.file("extdata",package="basecallQC") |
|
16 |
+#' runXML <- dir(fileLocations,pattern="runParameters.xml",full.names=TRUE) |
|
17 |
+#' config <- dir(fileLocations,pattern="config.ini",full.names=TRUE) |
|
18 |
+#' bcl2fastqparams <- BCL2FastQparams(runXML,config,runDir=getwd(),verbose=FALSE) |
|
19 |
+#' readlength <- readlengths(bcl2fastqparams) |
|
20 |
+#' @param object A BCL2FastQparams object |
|
21 |
+#' @return Read lengths as defined runParamaeters.xml |
|
22 |
+#' @export |
|
23 |
+readlengths.bcl2fastqparams <- function (object) |
|
24 |
+{ |
|
25 |
+ dplyr::select(object@RunParameters$runParams,Read1,Read2) %>% mutate_all(as.numeric) |
|
26 |
+} |
|
27 |
+ |
|
28 |
+setGeneric("readlengths", function(object="BCL2FastQparams") standardGeneric("readlengths")) |
|
29 |
+ |
|
30 |
+#' @rdname readlengths |
|
31 |
+#' @export |
|
32 |
+setMethod("readlengths", signature(object="BCL2FastQparams"), readlengths.bcl2fastqparams) |
|
33 |
+ |
|
34 |
+#' Index lengths |
|
35 |
+#' |
|
36 |
+#' Index lengths as defined by runParameters.xml |
|
37 |
+#' |
|
38 |
+#' @usage |
|
39 |
+#' \S4method{indexlengths}{BCL2FastQparams}(object) |
|
40 |
+#' |
|
41 |
+#' @docType methods |
|
42 |
+#' @name indexlengths |
|
43 |
+#' @rdname indexlengths |
|
44 |
+#' @aliases indexlengths indexlengths,BCL2FastQparams-method, indexlengths.bcl2fastqparams |
|
45 |
+#' |
|
46 |
+#' @author Thomas Carroll |
|
47 |
+#' @examples |
|
48 |
+#' fileLocations <- system.file("extdata",package="basecallQC") |
|
49 |
+#' runXML <- dir(fileLocations,pattern="runParameters.xml",full.names=TRUE) |
|
50 |
+#' config <- dir(fileLocations,pattern="config.ini",full.names=TRUE) |
|
51 |
+#' bcl2fastqparams <- BCL2FastQparams(runXML,config,runDir=getwd(),verbose=FALSE) |
|
52 |
+#' indexlength <- indexlengths(bcl2fastqparams) |
|
53 |
+#' @param object A BCL2FastQparams object |
|
54 |
+#' @return Index lengths as defined runParameters.xml. |
|
55 |
+#' @export |
|
56 |
+indexlengths.bcl2fastqparams <- function (object) |
|
57 |
+{ |
|
58 |
+ dplyr::select(object@RunParameters$runParams,IndexRead1,IndexRead2) %>% mutate_all(as.numeric) |
|
59 |
+} |
|
60 |
+ |
|
61 |
+setGeneric("indexlengths", function(object="BCL2FastQparams") standardGeneric("indexlengths")) |
|
62 |
+ |
|
63 |
+#' @rdname indexlengths |
|
64 |
+#' @export |
|
65 |
+setMethod("indexlengths", signature(object="BCL2FastQparams"), indexlengths.bcl2fastqparams) |
|
66 |
+ |
|
67 |
+ |
|
68 |
+ |