Description Usage Arguments Value Note Examples
View source: R/query_metadata.R
query omicidx API for studies based on lucene query
1 | query_metadata(luceneq, component = "StudiesSraStudiesGet", size = 10, ...)
|
luceneq |
character(1) query in lucene syntax |
component |
character(1) API component to use, defaults to 'StudiesSraStudiesGet' |
size |
numeric(1) number of records to return, defaults to 10. |
... |
passed to omicidxClientR::ExperimentsSraExperimentsGet |
list with S3 class 'omicidx_qhits', elements are hits, obj, query, time.
Queries for "nested" fields like organism within sample are handled in the third example. Cursor information will be present in 'obj' element of the return value.
1 2 3 4 5 6 7 8 9 10 11 12 | # example 1
x = query_metadata("cancer")
x
sapply(x$hits, "[[", "title")
# example 2 fix on RNA-seq
y = query_metadata('cancer AND library_strategy:"RNA-Seq"',
component="ExperimentsSraExperimentsGet")
table(sapply(y$hits, "[[", "library_strategy"))
# example 3 fix on RNA-seq in humans
yy =query_metadata('cancer AND library_strategy:"RNA-Seq" AND sample.organism:"Homo sapiens"',
component="ExperimentsSraExperimentsGet", size=100)
table(sapply(yy$hits, function(x) x$sample[,"organism"]))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.