-
Notifications
You must be signed in to change notification settings - Fork 3
API Documentation
An object where the keys are dataset ids and the values are datasets Each dataset will have the values seen below in the example.
The description
is in markdown format, with \n
where a newline character would normally be.
The uploadDate
is a Unix timestamp in seconds representing when the dataset was created.
The rest of the items should be pretty self-explanatory.
{
"sampledataset": {
"description": "This will be a description\n\n",
"id": "sampledataset",
"name": "Sample Dataset",
"numFeatures": 20000,
"numMetaTypes": 32,
"numSamples": 250,
"uploadDate": 1510576060,
"featureDescription": "gene",
"featureDescriptionPlural": "genes"
}
}
:id
- dataset id
An object with a meta
key and a features
key.
The meta
key will be either:
- an object mapping metadata types (strings) to metadata values (objects)
-
null
meaning there are too many metadata types to search through in the browser. You can use the/api/datasets/:id/meta/search
endpoint to search for metadata types
If meta
is not null
, each metadata value will have an key called options
which will be either:
- An array of strings representing the available options, along with
numOptions
-
"continuous"
meaning there are alsomin
andmax
keys on the object -
null
meaning there are again, too many options to search through on the browser. You can use the/api/datasets/:id/meta/:meta_type/search
endpoint to search through the available options.numOptions
will also be set.
The features
key will always have numOptions
and options
, but options
may be null, meaning you can search the available values using the /api/datasets/:id/features/search
endpoint.
{
"meta": {
"discreteVariable": {
"numOptions": 3,
"options": ["option1","option2","option3"]
},
"continuousVariable": {
"min": 0,
"max": 5,
"options": "continuous"
},
"sampleID": {
"numOptions": 1200,
"options": null
}
},
"features": {
"numOptions": 190000,
"options": null
}
}
{
"meta": null,
"features": {
"numOptions": 3,
"options": ["feature1","feature2","feature3"]
}
}
:id
- dataset id
:meta_type
- name of metadata type
An object representing the possible values for that metadata type. This is used when there are too many metadata types to search through, and you need to load the metadata values one by one. The values have the same possibilities as the response from this endpoint.
{
"numOptions": 3,
"options": ["option1","option2","option3"]
}
{
"min": 0,
"max": 5,
"options": "continuous"
}
{
"numOptions": 1200,
"options": null
}
:id
- dataset id
:search_str
- OPTIONAL search value to try and match
An array of strings, each one being a different metadata type that matched the search value. If no search value is provided, it will return the first 100 metadata types, as well as "sampleID". When a search value is provided, it will return a maximum of 100 values.
["metadata1","metadata12","sampleID"]
-
:id
- dataset id -
:meta_type
- name of metadata type or "features" to search features -
:search_str
- OPTIONAL search value to try and match
An array of strings, each one being a different option that matched the search value for the metadata type given. If no search value is provided, it will return the first 100 values. When a search value is provided, it will return a maximum of 100 values.
["option1","option2","option3"]
-
:id
- dataset id
A valid Geney query as JSON. Note that you can leave the features
and metaTypes
arrays empty since we are only going to look at the filters to count the samples.
An integer, which is the number of samples that matched the given filters.
123
-
:id
- dataset id
Because we want the browser to download the response as a new file, we submit a form via a POST request that opens a new browser tab so we don't lose our work. Since we are submitting a form we cannot send our request as raw JSON, but as form data which is is essentially a list of key-value pairs. This endpoint requires there to be two keys query
and options
which are both simply JSON strings.
-
query
- a valid Geney query as a string. -
options
- a JSON string with afileformat
property that is one of the supported file formats.
A subset of the initial dataset as requested via the query. It will include a Content-Disposition
header to prompt the browser to download the response as a file rather than display it on the screen.