-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
108 additions
and
95 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,18 @@ | ||
Package: phantasusLite | ||
Type: Package | ||
Title: Loading and annotation RNA-Seq counts matrices | ||
Version: 1.1.0 | ||
Title: Loading and annotation RNA-seq counts matrices | ||
Version: 1.1.1 | ||
Authors@R: c(person("Rita", "Sablina", role = "aut"), | ||
person("Maxim", "Kleverov", role = "aut"), | ||
person("Alexey", "Sergushichev", email = "[email protected]", role = c("aut", "cre"))) | ||
Description: PhantasusLite – a lightweight package with helper functions of general interest | ||
extracted from phantasus package. In parituclar it simplifies working with public | ||
RNA-seq datasets from GEO by providing access to the remote | ||
HSDS repository with the precomputed gene counts from ARCHS4 and DEE2 projects. | ||
Depends: R (>= 4.3) | ||
Depends: R (>= 4.2) | ||
Imports: | ||
data.table, | ||
rhdf5client(>= 1.21.5), | ||
rhdf5client(>= 1.25.1), | ||
httr, stringr, | ||
stats, | ||
utils, | ||
|
@@ -22,7 +22,7 @@ biocViews: GeneExpression, Transcriptomics, RNASeq | |
License: MIT + file LICENSE | ||
Encoding: UTF-8 | ||
LazyData: true | ||
RoxygenNote: 7.2.3 | ||
RoxygenNote: 7.3.1 | ||
Suggests: | ||
testthat (>= 3.0.0), | ||
knitr, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Changes in version 1.2.0 | ||
* Switch to https://alserglab.wustl.edu/hsds remote for default HSDS server | ||
* Depending on rhdf5client >= 1.25.1 to support ARCHS4 v2.3 files |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,48 @@ | ||
#' Returns list of all HDF5-files on HSDS-server | ||
#' @param url, containing url of the server and root domain. | ||
#' @param directory, containing name of the directory | ||
#' | ||
#' @return List of all HDF5-files on the server or all files of the collection | ||
#' | ||
#' @export | ||
#' @import rhdf5client | ||
#' @examples | ||
#' url <- 'https://ctlab.itmo.ru/hsds/?domain=/counts' | ||
#' getHSDSFileList(url) | ||
#' | ||
|
||
getHSDSFileList <- function(url='https://ctlab.itmo.ru/hsds/?domain=/counts', directory = NULL) { | ||
src <- httr::parse_url(url) | ||
dir <- src$query$domain | ||
src <- paste0(src$scheme,'://',src$hostname,'/',src$path) | ||
src <- HSDSSource(src) | ||
hdf5FileList <- list() | ||
if (is.null(directory)) { | ||
directories <- listDomains(src, dir) | ||
directories <- directories[-grep("*\\.h5$", directories)] | ||
directories <- gsub(paste0(dir, '/'), '', directories) | ||
for (directory in directories) { | ||
request <- paste0(src@endpoint, "/domains?domain=", | ||
dir, '/', directory) | ||
response <- rhdf5client:::submitRequest(request) | ||
domains <- response[["domains"]] | ||
for (domain in domains) { | ||
if (domain$name != paste0(dir, "/", directory, '/', directory, ".h5")) { | ||
hdf5FileList <- append(hdf5FileList, domain$name) | ||
} | ||
} | ||
} | ||
} else { | ||
request <- paste0(src@endpoint, "/domains?domain=", | ||
dir, '/', directory) | ||
response <- rhdf5client:::submitRequest(request) | ||
domains <- response[["domains"]] | ||
for (domain in domains) { | ||
if (domain$name != paste0(dir, "/", directory, '/', directory, ".h5")) { | ||
hdf5FileList <- append(hdf5FileList, domain$name) | ||
} | ||
} | ||
} | ||
hdf5FileList <- unlist(hdf5FileList) | ||
return(hdf5FileList) | ||
} | ||
#' Returns list of all HDF5-files on HSDS-server | ||
#' @param url, containing url of the server and root domain. | ||
#' @param directory, containing name of the directory | ||
#' | ||
#' @return List of all HDF5-files on the server or all files of the collection | ||
#' | ||
#' @export | ||
#' @import rhdf5client | ||
#' @examples | ||
#' url <- 'https://alserglab.wustl.edu/hsds/?domain=/counts' | ||
#' getHSDSFileList(url) | ||
#' | ||
|
||
getHSDSFileList <- function(url='https://alserglab.wustl.edu/hsds/?domain=/counts', directory = NULL) { | ||
src <- httr::parse_url(url) | ||
dir <- src$query$domain | ||
src <- paste0(src$scheme,'://',src$hostname,'/',src$path) | ||
src <- HSDSSource(src) | ||
hdf5FileList <- list() | ||
if (is.null(directory)) { | ||
directories <- listDomains(src, dir) | ||
directories <- directories[-grep("*\\.h5$", directories)] | ||
directories <- gsub(paste0(dir, '/'), '', directories) | ||
for (directory in directories) { | ||
request <- paste0(src@endpoint, "/domains?domain=", | ||
dir, '/', directory) | ||
response <- rhdf5client:::submitRequest(request) | ||
domains <- response[["domains"]] | ||
for (domain in domains) { | ||
if (domain$name != paste0(dir, "/", directory, '/', directory, ".h5")) { | ||
hdf5FileList <- append(hdf5FileList, domain$name) | ||
} | ||
} | ||
} | ||
} else { | ||
request <- paste0(src@endpoint, "/domains?domain=", | ||
dir, '/', directory) | ||
response <- rhdf5client:::submitRequest(request) | ||
domains <- response[["domains"]] | ||
for (domain in domains) { | ||
if (domain$name != paste0(dir, "/", directory, '/', directory, ".h5")) { | ||
hdf5FileList <- append(hdf5FileList, domain$name) | ||
} | ||
} | ||
} | ||
hdf5FileList <- unlist(hdf5FileList) | ||
return(hdf5FileList) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters