- service::tbi_correlation
- service::tbi_differential
- service::tbi_expression
- service::text_search
- pipe::list
- pipe::replace
- pipe::split
service::tbi_correlation
Parameters
donors | Array (optional) | Comma delimited list of Donor.id. Defaults to all donors. |
---|---|---|
structures | Array | Comma delimited list of Structure.id or Structure.acronym. |
probes | Integer | Probe id to correlate against |
sort_order | String (optional) | ‘asc’ or ‘desc’. Defaults to ‘desc’. |
start_row | Integer (optional) | Starting row of data for paging purposes. Defaults to 0. |
num_rows | Integer (optional) | Number of rows of data for paging purposes. Defaults to 2000. |
Example
http://api.brain-map.org/api/v2/data/query.xml?criteria= service::tbi_correlation[structures$eqHIP][probes$eq499304660]
service::tbi_differential
Parameters
donors1 | Array (optional) | Comma delimited list of Donor.id. Defaults to all donors. |
---|---|---|
structures1 | Array | Comma delimited list of Structure.id. |
donors2 | Array (optional) | Comma delimited list of Donor.id. Defaults to all donors. |
structures2 | Array | Comma delimited list of Structure.id. |
sort_by | String (optional) | ‘p-value’ or ‘fold-change’. Defaults to ‘p-value’. |
start_row | Integer (optional) | Starting row of data for paging purposes. Defaults to 0. |
num_rows | Integer (optional) | Number of rows of data for paging purposes. Defaults to 2000. |
Example
http://api.brain-map.org/api/v2/data/query.xml?criteria= service::tbi_differential[structures1$eqFWM][structures2$eqTCx]
service::tbi_expression
Parameters
probes | Integer | Comma delimited list of Probe.id to filter microarray expression results. |
---|---|---|
start_row | Integer (optional) | Starting row of data for paging purposes. Defaults to 0. |
num_rows | Integer (optional) | Number of rows of data for paging purposes. Defaults to 2000. |
donors | Integer (optional) | Comma delimited list of Donor.id to filter gbm expression results. |
structures | Integer (optional) | Comma delimited list of Structure.id to filter gbm expression results. |
Example
http://api.brain-map.org/api/v2/data/query.xml?criteria= service::tbi_expression[donors$eq309335438][structures$eqPCx][probes$eq499304660]
service::text_search
Parameters
query_string | String | String to search for (* is a wildcard) |
---|---|---|
k | String | The model that is the type of object to search for (i.e. Gene) |
Example
http://api.brain-map.org/api/v2/data/query.xml?criteria= service::text_search[query_string$eq'abat'][k$eqGene]
pipe::list
Input
The output from the previous pipeline stage in json format.
Parameters
(left hand side of parameter) | The variable id to be set in the pipeline namespace. |
---|---|
(right hand side of parameter) | A string using simple path syntax. |
Response
A comma separated list made up of the values found according to the path is assigned to the variable. More than one variable may be assigned in a single list pipe.
Notes
A pipe may not be used at the beginning or end of a query pipeline. Pipe::list may be used between model and service stages in any combination. The scope of a variable in a pipe::list stage is from the pipe to the end of the pipeline. Prefix a pipe list variable with a dollar sign ($) to reference it. Use the $in operator when referencing a pipeline variable set by pipe::list because the output is a list.
Fragment
pipe::list[gene_ids$eq'id'][probe_ids$eq'probes/probe/id']
Example
http://api.brain-map.org/api/v2/data/query.json?criteria=
model::Organism[name$il'*sapiens'],
pipe::list[xorganism_id$eq'id'],
model::Gene[organism_id$in$xorganism_id]
pipe::replace
Input
The constant string or variable passed into the input parameter
Parameters
pattern | Regular expression pattern to match against |
---|---|
replacement | String to replace the strings in input that match pattern. |
input | Variable obtained from pipe::list or a constant string. |
output | Name of a variable to assign the results to. |
Response
A string with the substitutions applied is assigned to the output variable.
Fragment
pipe::replace[pattern$eq'a'][replacement$eq'b'][input$in'abcd'][output$eqexample]
Example
http://api.brain-map.org/api/v2/data/query.json?criteria=
model::Structure[acronym$eq'HiF'][ontology_id$eq7],
pipe::list[path$eq'structure_id_path'],
pipe::replace[pattern$eq'$'][replacement$eq'*'][input$in$path][output$eq'descendents'], model::Structure[structure_id_path$il$descendents][ontology_id$eq7]
pipe::split
Input
The constant string or variable passed into the input parameter
Parameters
pattern | A regular expression pattern to match against. |
---|---|
input | A variable obtained from pipe::list or a constant string. |
output | The name of a variable to assign the results to. |
Response
An comma-separated list of input string split where the pattern matched.
Fragment
pipe::split[pattern$eq'x'][input$in'axbxcxd'][output$eqexample]
Example
http://api.brain-map.org/api/v2/data/query.json?criteria=
model::Structure[acronym$eq'HiF'][ontology_id$eq7],pipe::list[path$eq'structure_id_path'],
pipe::replace[pattern$eq'(^\/)|(\/$)'][replacement$eq''][input$in$path][output$eq'path'],
pipe::split[pattern$eq'/'][input$in$path][output$eq'ancestors'],model::Structure[id$in$ancestors][ontology_id$eq7]
SectionDataSet