Investigation
(→Add a study to an investigation) |
(→Study) |
||
Line 63: | Line 63: | ||
{{HasOperation |id=API_Study:Upload}} | {{HasOperation |id=API_Study:Upload}} | ||
− | = Study = | + | = Study, Assay, Data = |
A [[API_Study|Study]] has associated [[API_Study#Assays|Assays]], it is the result of executing a set of [[API_Protocol|Protocols]]. | A [[API_Study|Study]] has associated [[API_Study#Assays|Assays]], it is the result of executing a set of [[API_Protocol|Protocols]]. |
Revision as of 12:40, 9 December 2011
Investigation |
---|
Investigations/Studies/Assays/Data are modeled according to ISA-TAB standards.
Investigation: High level concept to link related studies.
Study: The central ISA-TAB unit containing information on the subjet under study, its characteristics and any treatments applied.
Assay: Tests performed either on material taken from the subject or on the whole initial subject, which produce qualitative or quantitative measurements (data).
Data: OpenTox Datasets or external files in native or other formats.
Investigations can be queried with SPARQL. REST operations are avialble for accessing individual investigations, studies, assays and data.
Investigations are created by submitting a zip archive with ISA-TAB files. Individual studies, assays and datafiles can be submitted as ISA-TAB files (studies, assays) or as native data files (e.g. Affymetrix CEL files).
Uploading ISA-TAB archives: Investigations can be uploaded in a zip archive with all ISA-TAB files in a single folder.
Uploading individual ISA-TAB files: It is possible to upload individual data and study/assay ISA-TAB files. In this case the client has to ensure that ISA-TAB references are valid URIs or relative paths.
Naming conventions: ISA-TAB filenames (in zip archives and individual files) should follow the conventions:
i_*.txt: Investigation s_*.txt: Study a_*.txt: Assay all other filenames will be interpreted as data files
Filenames have to be unique for a given study. Submissions with conflicting filenames will not be accepted and return a 400 (Bad Request) error. Existing files in an investigation can be queried with GET /investigation/{id}; Accept: text/uri-list.
Contents |
Investigation
A collection of related studies.
Get a list of investigations
Description | Get a list of all investigations |
---|---|
Resource | Investigation |
Method | GET |
URI | /investigation |
Parameters | |
Header Parameters | Accept:text/uri-list, application/rdf+xml subjectid:SECURITY-TOKEN |
Media Type (input) | |
Results | List of investigations |
Media Type (output) | text/uri-list, application/rdf+xml |
Status code | 200, 400 |
Description | Get a list of user related investigations |
---|---|
Resource | Investigation |
Method | GET |
URI | /investigation |
Parameters | |
Header Parameters | User:USER_URI subjectid:SECURITY-TOKEN |
Media Type (input) | Accept:application/rdf+xml, application/json, text/uri-list |
Results | list of investigations owned/uploaded by a specific user |
Media Type (output) | application/rdf+xml, application/json, text/uri-list |
Status code | 200, 400 |
Links: Page, Edit with form
Query all investigations
Description | Query all investigations with SPARQL |
---|---|
Resource | Investigation |
Method | GET |
URI | /investigation |
Parameters | query |
Header Parameters | Accept: one of text/plain (n-triples), text/turtle, application/rdf+xml (for CONSTRUCT queries), subjectid:SECURITY-TOKEN |
Media Type (input) | |
Results | Query result |
Media Type (output) | application/sparql-results+xml (SELECT queries), text/plain (n-triples), text/turtle, application/rdf+xml (CONSTRUCT queries) |
Status code | 200 |
Links: Page, Edit with form
Create an investigation
Description | Create a new investigation from ISA-TAB files |
---|---|
Resource | Investigation |
Method | POST |
URI | /investigation |
Parameters | optional params:
required params (when upload not in isa-tab format):
optional params (when upload not in isa-tab format):
|
Header Parameters | subjectid:SECURITY-TOKEN |
Media Type (input) | multipart/form-data:
|
Results | Task URI |
Media Type (output) | text/uri-list |
Status code | 202, 400, 401 |
cURL example
curl -Lk -X POST -i -H "subjectid:MYTOKEN" -F file="@ExampleFilename.zip;type=application/zip" \ https://services.toxbank.net/investigation?allowReadByUser=USER_URI1,USER_URI2&allowReadByGroup=GROUP_URI1,GROUP_URI2&summarySearchable=VALUE
curl -Lk -X POST -i -H "subjectid:MYTOKEN" -d "type=noData" -d "title=STRING" -d "abstract=STRING" -d "owningOrg=GROUP_URI" \ -d owningPro=GROUP_URI1,GROUP_URI2" -d "authors=USER_URI1,USER_URI2" -d "keywords=OWL_URI1,OWL_URI2" -d "allowReadByUser=USER_URI1,USER_URI2" \ -d "allowReadByGroup=GROUP_URI1,GROUP_URI2" -d "summarySearchable=VALUE" https://services.toxbank.net/investigation
curl -Lk -X POST -i -H "subjectid:MYTOKEN" -F file="@ExampleFilename.zip;type=application/zip" \ https://services.toxbank.net/investigation?type=unformattedData&title=STRING&abstract=STRING&owningOrg=GROUP_URI&owningPro=GROUP_URI1,GROUP_URI2 \ &authors=USER_URI1,USER_URI2&keywords=OWL_URI1,OWL_URI2&allowReadByUser=USER_URI1,USER_URI2&allowReadByGroup=GROUP_URI1,GROUP_URI2 \ &summarySearchable=VALUE
curl -Lk -X POST -i -H "subjectid:MYTOKEN" -d "type=ftpData" -d "title=STRING" -d "abstract=STRING" -d "owningOrg=GROUP_URI" \ -d owningPro=GROUP_URI1,GROUP_URI2" -d "authors=USER_URI1,USER_URI2" -d "keywords=OWL_URI1,OWL_URI2" -d "licenses=STRING" \ -d "ftpFile=FILENAME_A,FILENAME_B" -d "allowReadByUser=USER_URI1,USER_URI2" -d "allowReadByGroup=GROUP_URI1,GROUP_URI2" \ -d "summarySearchable=VALUE" https://services.toxbank.net/investigation
Links: Page, Edit with form
Get an investigation representation
Description | Get an investigation representation |
---|---|
Resource | Investigation |
Method | GET |
URI | /investigation/{id} |
Parameters | |
Header Parameters | Accept: one of text/tab-separated-values, text/uri-list, application/zip, text/plain (n-triples), text/turtle, application/rdf+xml, subjectid:SECURITY-TOKEN |
Media Type (input) | |
Results | Investigation ISA-TAB file, list of study, assay and data URIs, zipped ISA-TAB files (including studies, assays and data files) or RDF representation |
Media Type (output) | text/tab-separated-values, text/uri-list, application/zip, text/plain, application/rdf+xml |
Status code | 200, 400, 401, 404 |
Links: Page, Edit with form
Delete an investigation
Description | Delete an investigation |
---|---|
Resource | Investigation |
Method | DELETE |
URI | /investigation/{id} |
Parameters | |
Header Parameters | subjectid:SECURITY-TOKEN |
Media Type (input) | |
Results | Success message |
Media Type (output) | text/plain |
Status code | 200, 401 |
Links: Page, Edit with form
Add a study, assay or data to an investigation
Description | Add/update studies, assays or data to an investigation |
---|---|
Resource | Investigation |
Method | PUT |
URI | /investigation/{id} |
Parameters | optional params:
required params (when upload not in isa-tab format):
|
Header Parameters | subjectid:SECURITY-TOKEN |
Media Type (input) | multipart/form-data |
Results | Task URI |
Media Type (output) | text/uri-list |
Status code | 202, 400, 401, 423 |
Individual ISA-TAB files (text/tab-separated-values) or zip archives of study, assay and data files can be posted as form data to add files to an existing investigation. Investigations without ISA-TAB formated data can be edited by parameters and data files posted as form data replace existing data. Links: Page, Edit with form
Study, Assay, Data
A Study has associated Assays, it is the result of executing a set of Protocols.
A Study has an Author (an User).
Get a list of studies in an investigation
Description | Get a list of studies |
---|---|
Resource | Investigation |
Method | GET |
URI | /investigation/{id}/study |
Parameters | |
Header Parameters | |
Media Type (input) | none |
Results | List of studies |
Media Type (output) | text/uri-list |
Status code | 200,400,401,402,403 |
Links: Page, Edit with form
Get a study representation
Description | Get a study, assay, data representation |
---|---|
Resource | Investigation |
Method | GET |
URI | /investigation/{id}/isatab/{filename} |
Parameters | |
Header Parameters | subjectid:SECURITY-TOKEN |
Media Type (input) | |
Results | Study, assay, data representation in ISA-TAB format |
Media Type (output) | text/tab-separated-values |
Status code | 200, 400, 401, 404 |
Links: Page, Edit with form
Add a study to an investigation
Description | Add/update studies, assays or data to an investigation |
---|---|
Resource | Investigation |
Method | PUT |
URI | /investigation/{id} |
Parameters | optional params:
required params (when upload not in isa-tab format):
|
Header Parameters | subjectid:SECURITY-TOKEN |
Media Type (input) | multipart/form-data |
Results | Task URI |
Media Type (output) | text/uri-list |
Status code | 202, 400, 401, 423 |
Individual ISA-TAB files (text/tab-separated-values) or zip archives of study, assay and data files can be posted as form data to add files to an existing investigation. Investigations without ISA-TAB formated data can be edited by parameters and data files posted as form data replace existing data. Links: Page, Edit with form
Assay
An Assay serves as a container, associating a Protocol with the generated data.
Get a list of assays in a study
Description | Get a list of all assays in a study |
---|---|
Resource | Investigation |
Method | GET |
URI | /investigation/{id}/study/{id}/assay |
Parameters | |
Header Parameters | |
Media Type (input) | |
Results | List of assay URIs |
Media Type (output) | text/uri-list |
Status code | 200,400,401,402,403 |
Links: Page, Edit with form
Get an assay representation
Description | Get an assay representation |
---|---|
Resource | Investigation |
Method | GET |
URI | /investigation/{id}/study/{id}/assay/{id} |
Parameters | |
Header Parameters | |
Media Type (input) | |
Results | Assay representation in ISA-TAB or RDF format |
Media Type (output) | text/tab-separated-values, application/sparql-results+json |
Status code | 200,400,401,402,403 |
Links: Page, Edit with form
Add an assay to a study
Description | Add an assay to a study |
---|---|
Resource | Investigation |
Method | POST |
URI | /investigation/{id}/study/{id}/assay |
Parameters | |
Header Parameters | |
Media Type (input) | multipart/form-data |
Results | URI of the new assay |
Media Type (output) | text/uri-list |
Status code | 200,202,400,401,402,403 |
Assays should be submitted as attachment in ISA-TAB format (text/tab-separated-values). Links: Page, Edit with form
Data
Data can be either an OpenTox dataset or a native data file (e.g. Affymetrix CEL file).
Get a list of data URIs for an assay
Description | Get all data associated with an assay |
---|---|
Resource | Investigation |
Method | GET |
URI | /investigation/{id}/study/{id}/assay/{id}/data |
Parameters | |
Header Parameters | |
Media Type (input) | |
Results | Links to datasets |
Media Type (output) | text/uri-list |
Status code | 200,400,401,402,403 |
Links: Page, Edit with form
Add datafile to an assay
Description | Upload assay data |
---|---|
Resource | Investigation |
Method | POST |
URI | /investigation/{id}/study/{id}/assay/{id}/data |
Parameters | |
Header Parameters | |
Media Type (input) | multipart/form-data |
Results | URI of new dataset |
Media Type (output) | text/uri-list |
Status code | 200,202,400,401,402,403 |
Upload data files in their native format (e.g. CEL files, ISA-TAB data). Links: Page, Edit with form
Get datafile in native format
Description | Get assay data in the submitted format |
---|---|
Resource | Investigation |
Method | GET |
URI | /investigation/{id}/study/{id}/assay/{id}/data/{id} |
Parameters | |
Header Parameters | |
Media Type (input) | |
Results | Data in native format |
Media Type (output) | text/tab-separated-values, CEL files, ... |
Status code |
Links: Page, Edit with form