Investigation
Mrautenberg (Talk | contribs) (→Get an investigation representation) |
Mrautenberg (Talk | contribs) (→Get investigation metadata) |
||
Line 68: | Line 68: | ||
== Get investigation metadata == | == Get investigation metadata == | ||
{{HasOperation |id=API_Investigation:Metadata}} | {{HasOperation |id=API_Investigation:Metadata}} | ||
+ | ==== cURL example ==== | ||
+ | curl -X GET -k -H 'Accept:application/rdf+xml' -H 'subjectid:MYTOKEN' https://toxbanktest1.opentox.org/investigation/545407d1-8bf1-479a-b92e-5b142ee99ee1/metadata | ||
== Get an ISA-TAB entry == | == Get an ISA-TAB entry == |
Revision as of 15:35, 4 July 2012
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.
Filenames: ISA-TAB filenames (in zip archives and individual files) have to 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 within an investigation. 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.
Investigation
An Investigation is a collection of related studies.
A Study has associated Assays, it is the result of executing a set of Protocols. A Study has an Author (an User).
An Assay serves as a container, associating a Protocol with the generated data.
Data can be either an OpenTox dataset or a native data file (e.g. Affymetrix CEL file).
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
cURL example
curl -X GET -k -H 'Accept:text/uri-list' -H 'subjectid:MYTOKEN' https://toxbanktest1.opentox.org curl -X GET -k -H 'Accept:application/rdf+xml' -H 'subjectid:MYTOKEN' https://toxbanktest1.opentox.org
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
cURL example
curl -Lk -X POST -i -H "subjectid:MYTOKEN" -F file="@ExampleFilename.zip;type=application/zip" \ -d "allowReadByUser=USER_URI1,USER_URI2" -d "allowReadByGroup=GROUP_URI1,GROUP_URI2" -d 'summarySearchable=VALUE' https://toxbanktest1.opentox.org
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
cURL example
curl -X GET -k -H 'Accept:text/uri-list' -H 'subjectid:MYTOKEN' https://toxbanktest1.opentox.org/investigation/6f042393-8d6e-4df1-81a9-21a6f761c938 curl -X GET -k -H 'Accept:application/rdf+xml' -H 'subjectid:MYTOKEN' https://toxbanktest1.opentox.org/investigation/6f042393-8d6e-4df1-81a9-21a6f761c938
Get investigation metadata
Description | Get investigation metadata |
---|---|
Resource | Investigation |
Method | GET |
URI | /investigation/{id}/metadata |
Parameters | |
Header Parameters | Accept: one of text/plain (n-triples), text/turtle, application/rdf+xml, subjectid:SECURITY-TOKEN |
Media Type (input) | |
Results | Investigation metadata in n-triples, turtle or RDF format |
Media Type (output) | text/plain (n-triples), text/turtle, application/rdf+xml |
Status code | 200, 400, 401 |
Links: Page, Edit with form
cURL example
curl -X GET -k -H 'Accept:application/rdf+xml' -H 'subjectid:MYTOKEN' https://toxbanktest1.opentox.org/investigation/545407d1-8bf1-479a-b92e-5b142ee99ee1/metadata
Get an ISA-TAB entry
Description | Get an ISA-TAB entry |
---|---|
Resource | Investigation |
Method | GET |
URI | /investigation/{id}/{resource} |
Parameters | |
Header Parameters | Accept: one of text/plain (n-triples), text/turtle, application/rdf+xml, subjectid:SECURITY-TOKEN |
Media Type (input) | |
Results | Investigation ISA-TAB entry in n-triples, turtle or RDF format |
Media Type (output) | text/plain (n-triples), text/turtle, application/rdf+xml |
Status code | 200, 400, 401 |
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 studies, assays 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
cURL example
Add studies, assays or data to an investigation or update data
curl -Lk -X PUT -i -H "subjectid:MYTOKEN" -F file="@ExampleFilename.zip;type=application/zip" \ -d "allowReadByUser=USER_URI1,USER_URI2" -d "allowReadByGroup=GROUP_URI1,GROUP_URI2" -d 'summarySearchable=VALUE' https://toxbanktest1.opentox.org/investigation/UUID
Update isPublished flag in metadata
curl -Lk -X PUT -i -H "subjectid:MYTOKEN" -d "published=true" https://toxbanktest1.opentox.org/investigation/UUID
Get a study, assay or data 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
Delete individual studies, assays or data from an investigation
Links: Page, Edit with form
Investigation metadata in RDF
Investigation
Namespace: tbisa: http://onto.toxbank.net/isa
Class
<investigation_uri> a tbisa:Investigation.
Data properties
tbisa:hasAccessionID "String" . dcterms:title "String". dcterms:abstract "String". dcterms:created "Date". dcterms:issued "Date".
Object properties:
tbisa:hasStudy rdfs:domain tbisa:Investigation . tbisa:hasStudy rdfs:range tbisa:Study . tbisa:hasOwner rdfs:range tbisa:Contact .
Example N3
@prefix foaf: <http://xmlns.com/foaf/0.1/> . @prefix tbisa: <http://onto.toxbank.net/isa/> . @prefix dcterms: <http://purl.org/dc/terms/> . <http://onto.toxbank.net/isa/BIII1/I2215> a tbisa:Investigation ; tbisa:hasAccessionID "BII-I-1" ; tbisa:hasOwner <http://onto.toxbank.net/isa/BIII1/ISA_3977> , <http://onto.toxbank.net/isa/BIII1/ISA_3975> , <http://onto.toxbank.net/isa/BIII1/ISA_3976> ; tbisa:hasStudy <http://onto.toxbank.net/isa/BIII1/S212> , <http://onto.toxbank.net/isa/BIII1/S213> ; dcterms:abstract """Background Cell growth underlies many key cellular and developmental processes, yet a limited number of studies have been carried out on cell- (skipped) ...engineering, and for the design of genome-scale systems biology models of the eukaryotic cell.""" ; dcterms:created "29 Apr 2007 21:00:00 GMT" ; dcterms:issued "29 Apr 2007 21:00:00 GMT" ; dcterms:title "Growth control of the eukaryote cell: a systems biology study in yeast" .
Study
Class
<study_uri> a tbisa:Study.
Data properties
tbisa:hasAccessionID "String" . dcterms:title "String". dcterms:description "String". dcterms:created "Date".
Object properties:
tbisa:hasAssay rdfs:domain tbisa:Study . tbisa:hasAssay rdfs:range tbisa:Assay . tbisa:hasProtocol rdfs:domain tbisa:Study . tbisa:hasProtocol rdfs:range tbisa:Protocol . tbisa:hasOwner rdfs:range tbisa:Contact .
Example N3
<http://onto.toxbank.net/isa/BIII1/S1138> a tbisa:Study ; tbisa:hasAccessionID "BII-S-2" ; tbisa:hasAssay <http://onto.toxbank.net/isa/BIII1/A1037> , <http://onto.toxbank.net/isa/BIII1/A1055> ; tbisa:hasOwner <http://onto.toxbank.net/isa/BIII1/ISA_1137> , <http://onto.toxbank.net/isa/BIII1/ISA_3982> ; tbisa:hasProtocol <http://onto.toxbank.net/isa/BIII1/P_10> , <http://onto.toxbank.net/isa/BIII1/P_18> ; dcterms:created "29 Apr 2007 21:00:00 GMT" ; dcterms:description "Comprehensive high-throughput analyses .... (skipped) ." ; dcterms:title "A time course analysis of transcription response in yeast treated with rapamycin, a specific inhibitor of the TORC1 complex: impact on yeast growth" . <http://onto.toxbank.net/isa/BIII1/PA2538> a tbisa:ProtocolApplication ; tbisa:appliesProtocol <http://onto.toxbank.net/isa/BIII1/P_10> .
Protocol
Class
<protocol_uri> a tbisa:Protocol , tb:Protocol;
Data properties
tbisa:hasAccessionID "String" . dcterms:title "String"..
Object properties:
tbisa:appliesProtocol a owl:FunctionalProperty , owl:ObjectProperty ; rdfs:domain tbisa:ProtocolApplication ; rdfs:range tbisa:Protocol . tbisa:hasProtocol a owl:ObjectProperty ; rdfs:domain tbisa:Study ; rdfs:range tbisa:Protocol . tbisa:appliesProtocol a owl:FunctionalProperty , owl:ObjectProperty ; rdfs:domain tbisa:ProtocolApplication ; rdfs:range tbisa:Protocol . tbisa:hasParameterValue a owl:ObjectProperty ; rdfs:domain tbisa:ProtocolApplication ; rdfs:range tbisa:ParameterValue . tbisa:hasProtocolApplication a owl:ObjectProperty ; rdfs:domain tbisa:Processing ; rdfs:range tbisa:ProtocolApplication .
Example N3
<http://onto.toxbank.net/isa/BIII1/P_17> a tbisa:Protocol ; rdfs:label "mRNA extraction"^^<http://www.w3.org/2001/XMLSchema#string> ; tbisa:hasAccessionID "BII-S-2\\mRNA extraction" .
Contact (Person, User )
Classes
<person_uri> a foaf:Person , tbisa:Contact , tb:User ;
Data properties
(as for tb:User - foaf:family_name, foaf:givenname , etc.)
Object properties:
tbisa:hasOwner rdfs:range tbisa:Contact .
Example N3
<http://onto.toxbank.net/isa/BIII1/ISA_3980> a foaf:Person , tbisa:Contact , tb:User ; foaf:family_name "Oliver"^^<http://www.w3.org/2001/XMLSchema#string> ; foaf:givenname "Stephen"^^<http://www.w3.org/2001/XMLSchema#string> .
Processing node
Classes
<processingnode> a tbisa: Processing;
Subclasses
tbisa:DataProcessing rdfs:subClassOf tbisa:Processing .
tbisa:MaterialProcessing rdfs:subClassOf tbisa:Processing .
tbisa:DataAcquisition rdfs:subClassOf tbisa:Processing .
Object properties:
tbisa:hasProtocolApplication a owl:ObjectProperty ; rdfs:domain tbisa:Processing ; rdfs:range tbisa:ProtocolApplication . tbisa:hasInputNode a owl:ObjectProperty ; rdfs:domain tbisa:Processing ; rdfs:range tbisa:Node . tbisa:hasOutputNode a owl:ObjectProperty ; rdfs:domain tbisa:Processing ; rdfs:range tbisa:Node .