Skip to content

Commit

Permalink
gene->genes for get_gene_differential_expression_values
Browse files Browse the repository at this point in the history
  • Loading branch information
oganm committed Jun 25, 2024
1 parent 8b670f3 commit 33e9639
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 16 deletions.
12 changes: 5 additions & 7 deletions R/allEndpoints.R
Original file line number Diff line number Diff line change
Expand Up @@ -1399,11 +1399,11 @@ memget_datasets_by_ids <- function(datasets = NA_character_, filter = NA_charact
)
}

#' Retrieve the differential expression results for a given gene
#' get_gene_differential_expression_values
#'
#'
#'
#' @param gene An ensembl gene identifier which typically starts with ensg or an ncbi gene identifier or an official gene symbol approved by hgnc
#' @param gene
#' @param query The search query. Queries can include plain text or ontology
#' terms They also support conjunctions ("alpha AND beta"), disjunctions ("alpha OR beta")
#' grouping ("(alpha OR beta) AND gamma"), prefixing ("alpha*"), wildcard characters
Expand All @@ -1412,7 +1412,7 @@ memget_datasets_by_ids <- function(datasets = NA_character_, filter = NA_charact
#' function to get a list of all available parameters. These properties can be
#' combined using "and" "or" clauses and may contain common operators such as "=", "<" or "in".
#' (e.g. "taxon.commonName = human", "taxon.commonName in (human,mouse), "id < 1000")
#' @param threshold number
#' @param threshold
#' @param raw \code{TRUE} to receive results as-is from Gemma, or \code{FALSE} to enable
#' parsing. Raw results usually contain additional fields and flags that are
#' omitted in the parsed results.
Expand Down Expand Up @@ -1445,9 +1445,7 @@ get_gene_differential_expression_values <- function(gene, query = NA_character_,
header <- ""
isFile <- FALSE
fname <- "get_gene_differential_expression_values"
preprocessor <- function(data) {
return(data)
}
preprocessor <- blank_processor
validators <- list(gene = function(name, ...) {
ID <- unlist(list(...))
if (length(ID) > 1) {
Expand Down Expand Up @@ -1494,7 +1492,7 @@ get_gene_differential_expression_values <- function(gene, query = NA_character_,
}
return(number)
})
endpoint <- "datasets/analyses/differential/results/gene/{encode(gene)}?&query={encode(query)}&filter={encode(filter)}&threshold={encode(threshold)}"
endpoint <- "datasets/analyses/differential/results/genes/{encode(gene)}?&query={encode(query)}&filter={encode(filter)}&threshold={encode(threshold)}"
if (memoised) {
if (!is.na(file)) {
warning("Saving to files is not supported with memoisation.")
Expand Down
11 changes: 8 additions & 3 deletions inst/script/registry.R
Original file line number Diff line number Diff line change
Expand Up @@ -562,13 +562,17 @@ registerEndpoint("datasets/{datasets}?&offset={offset}&limit={limit}&sort={sort}
# datasets/categories -----
# currently unimplemented

# datasets/analyses/differential/results/gene/{gene}
# datasets/analyses/differential/results/genes/{gene}

#' get_gene_differential_expression_values
#'
NULL

registerEndpoint("datasets/analyses/differential/results/gene/{gene}?&query={query}&filter={filter}&threshold={threshold}",
registerEndpoint("datasets/analyses/differential/results/genes/{gene}?&query={query}&filter={filter}&threshold={threshold}",
"get_gene_differential_expression_values",
open_api_name = "get_datasets_differential_analysis_results_expression_for_gene",
keyword = 'gene',
# header = "text/tab-separated-values",
defaults = list(
gene = bquote(),
query = NA_character_,
Expand All @@ -582,7 +586,8 @@ registerEndpoint("datasets/analyses/differential/results/gene/{gene}?&query={que
filter = validateFilter,
threshold = validateNumber
),
preprocessor = blank_processor)
preprocessor = quote(blank_processor)
)


# datasets/taxa -----
Expand Down
8 changes: 2 additions & 6 deletions man/get_gene_differential_expression_values.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 33e9639

Please sign in to comment.