... | ... |
@@ -1,6 +1,6 @@ |
1 | 1 |
Package: cBioPortalData |
2 | 2 |
Title: Exposes and makes available data from the cBioPortal web resources |
3 |
-Version: 0.99.47 |
|
3 |
+Version: 0.99.48 |
|
4 | 4 |
Authors@R: c(person("Levi", "Waldron", email = "[email protected]", |
5 | 5 |
role = "aut"), |
6 | 6 |
person("Marcel", "Ramos", email = "[email protected]", |
... | ... |
@@ -8,14 +8,23 @@ Authors@R: c(person("Levi", "Waldron", email = "[email protected]", |
8 | 8 |
Description: The cBioPortalData package takes compressed resources |
9 | 9 |
from repositories such as cBioPortal and assembles a MultiAssayExperiment |
10 | 10 |
object with Bioconductor classes. |
11 |
-Depends: R (>= 3.5.0) |
|
11 |
+Depends: R (>= 3.5.0), |
|
12 |
+ MultiAssayExperiment |
|
12 | 13 |
Imports: |
13 | 14 |
BiocFileCache (>= 1.5.3), |
14 |
- MultiAssayExperiment, |
|
15 |
- S4Vectors, |
|
15 |
+ GenomeInfoDb, |
|
16 |
+ GenomicRanges, |
|
17 |
+ httr, |
|
18 |
+ methods, |
|
19 |
+ rappdirs, |
|
16 | 20 |
readr, |
21 |
+ RaggedExperiment, |
|
17 | 22 |
RTCGAToolbox, |
18 |
- TCGAutils |
|
23 |
+ S4Vectors, |
|
24 |
+ SummarizedExperiment, |
|
25 |
+ stats, |
|
26 |
+ TCGAutils, |
|
27 |
+ utils |
|
19 | 28 |
Suggests: |
20 | 29 |
BiocStyle, |
21 | 30 |
curl, |
... | ... |
@@ -29,6 +38,7 @@ RoxygenNote: 6.1.0 |
29 | 38 |
Collate: |
30 | 39 |
'cBioPortalData-pkg.R' |
31 | 40 |
'cache.R' |
41 |
+ 'data.R' |
|
32 | 42 |
'utils.R' |
33 | 43 |
'loadStudy.R' |
34 | 44 |
'studyDownload.R' |
... | ... |
@@ -14,6 +14,10 @@ importFrom(BiocFileCache,bfcneedsupdate) |
14 | 14 |
importFrom(BiocFileCache,bfcquery) |
15 | 15 |
importFrom(BiocFileCache,bfcremove) |
16 | 16 |
importFrom(BiocFileCache,bfcrpath) |
17 |
+importFrom(BiocFileCache,bfcupdate) |
|
18 |
+importFrom(GenomeInfoDb,"genome<-") |
|
19 |
+importFrom(GenomeInfoDb,genome) |
|
20 |
+importFrom(GenomicRanges,makeGRangesListFromDataFrame) |
|
17 | 21 |
importFrom(MultiAssayExperiment,ExperimentList) |
18 | 22 |
importFrom(MultiAssayExperiment,MultiAssayExperiment) |
19 | 23 |
importFrom(S4Vectors,"metadata<-") |
... | ... |
@@ -22,8 +26,15 @@ importFrom(S4Vectors,SimpleList) |
22 | 26 |
importFrom(S4Vectors,isSingleString) |
23 | 27 |
importFrom(S4Vectors,metadata) |
24 | 28 |
importFrom(SummarizedExperiment,SummarizedExperiment) |
29 |
+importFrom(SummarizedExperiment,rowData) |
|
25 | 30 |
importFrom(TCGAutils,TCGAbarcode) |
26 | 31 |
importFrom(TCGAutils,findGRangesCols) |
27 | 32 |
importFrom(TCGAutils,generateMap) |
33 |
+importFrom(methods,as) |
|
34 |
+importFrom(methods,is) |
|
28 | 35 |
importFrom(readr,read_tsv) |
29 | 36 |
importFrom(readr,type_convert) |
37 |
+importFrom(stats,na.omit) |
|
38 |
+importFrom(utils,data) |
|
39 |
+importFrom(utils,download.file) |
|
40 |
+importFrom(utils,untar) |
... | ... |
@@ -1,9 +1,14 @@ |
1 | 1 |
#' @importFrom S4Vectors isSingleString metadata metadata<- SimpleList DataFrame |
2 |
-#' @importFrom SummarizedExperiment SummarizedExperiment |
|
2 |
+#' @importFrom SummarizedExperiment SummarizedExperiment rowData |
|
3 |
+#' @importFrom GenomicRanges makeGRangesListFromDataFrame |
|
4 |
+#' @importFrom GenomeInfoDb genome genome<- |
|
3 | 5 |
#' @importFrom readr read_tsv type_convert |
4 | 6 |
#' @importFrom MultiAssayExperiment MultiAssayExperiment ExperimentList |
5 | 7 |
#' @importFrom TCGAutils generateMap TCGAbarcode findGRangesCols |
6 | 8 |
#' @import RTCGAToolbox |
7 | 9 |
#' @importFrom BiocFileCache BiocFileCache bfcquery bfcadd bfcneedsupdate |
8 |
-#' bfcdownload bfcrpath bfcremove bfccache |
|
10 |
+#' bfcdownload bfcrpath bfcremove bfccache bfcupdate |
|
11 |
+#' @importFrom methods as is |
|
12 |
+#' @importFrom stats na.omit |
|
13 |
+#' @importFrom utils data download.file untar |
|
9 | 14 |
NULL |
... | ... |
@@ -39,8 +39,10 @@ loadStudy <- function(cancer_study_id, use_cache = TRUE, |
39 | 39 |
|
40 | 40 |
cancer_file <- downloadStudy(cancer_study_id, use_cache) |
41 | 41 |
|
42 |
- filelist <- untar(cancer_file, list = TRUE, |
|
43 |
- extras = "--warning=no-unknown-keyword") |
|
42 |
+ exarg <- if (rappdirs:::get_os() == "unix") |
|
43 |
+ "--warning=no-unknown-keyword" else NULL |
|
44 |
+ |
|
45 |
+ filelist <- untar(cancer_file, list = TRUE, extras = exarg) |
|
44 | 46 |
filelist <- gsub("^\\.\\/", "", filelist) |
45 | 47 |
filekeepind <- grep("^\\._", basename(filelist), invert = TRUE) |
46 | 48 |
filelist <- filelist[filekeepind] |
... | ... |
@@ -169,8 +171,8 @@ cbioportal2se <- function(file, ...) { |
169 | 171 |
rowdat <- DataFrame(df[,!numeric.cols]) |
170 | 172 |
## rownames(rowdat) <- make.names(rowdat[, 1], unique=TRUE) |
171 | 173 |
se <- |
172 |
- SummarizedExperiment(assays = as(df[, numeric.cols], "matrix"), |
|
173 |
- rowData = rowdat) |
|
174 |
+ SummarizedExperiment::SummarizedExperiment( |
|
175 |
+ assays = as(df[, numeric.cols], "matrix"), rowData = rowdat) |
|
174 | 176 |
if(!all(grep("TCGA", rowData(se)[, 1]))) |
175 | 177 |
return(NULL) |
176 | 178 |
rownames(se) <- rowData(se)[, 1] |
... | ... |
@@ -41,7 +41,7 @@ a cache if not already created. A specific directory can be used via |
41 | 41 |
|
42 | 42 |
Specify the directory location of the data cache. By default, it will |
43 | 43 |
got to the user's home/.cache and "appname" directory as specified by |
44 |
-\link{user_cache_dir}. (default appname: MultiAssayExperimentData) |
|
44 |
+\link{user_cache_dir}. (default appname: cBioPortalData) |
|
45 | 45 |
} |
46 | 46 |
|
47 | 47 |
\section{removeCache}{ |