Investigation
(→cURL example) |
(→cURL example) |
||
Line 82: | Line 82: | ||
curl -X GET -k -H 'Accept:application/json' -H 'subjectid:MYTOKEN' https://services.toxbank.net/investigation/{id}/sparql/FactorvaluesByInvestigation | curl -X GET -k -H 'Accept:application/json' -H 'subjectid:MYTOKEN' https://services.toxbank.net/investigation/{id}/sparql/FactorvaluesByInvestigation | ||
+ | |||
+ | curl -X GET -k -H 'Accept:application/json' -H 'subjectid:MYTOKEN' https://services.toxbank.net/investigation/{id}/sparql/FilesAndAssaysByInvestigation | ||
curl -X GET -k -H 'Accept:application/json' -H 'subjectid:MYTOKEN' https://services.toxbank.net/investigation/{id}/sparql/FilesByInvestigation | curl -X GET -k -H 'Accept:application/json' -H 'subjectid:MYTOKEN' https://services.toxbank.net/investigation/{id}/sparql/FilesByInvestigation |
Revision as of 15:20, 14 March 2014
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
get a URI list of all investigation:
curl -X GET -k -H 'Accept:text/uri-list' -H 'subjectid:MYTOKEN' https://services.toxbank.net/investigation
get a RDF representation of a users investigations:
curl -X GET -k -H 'Accept:application/rdf+xml' -H 'user:USER_URI'-H 'subjectid:MYTOKEN' https://services.toxbank.net/investigation
get JSON URI/modified date list:
curl -X GET -k -H 'Accept:application/json' -H 'user:USER_URI'-H 'subjectid:MYTOKEN' https://services.toxbank.net/investigation
get URI list of the users investigations URIs:
curl -X GET -k -H 'Accept:text/uri-list' -H 'user:USER_URI'-H 'subjectid:MYTOKEN' https://services.toxbank.net/investigation
Get informations from published investigations
Description | Get information from investigations |
---|---|
Resource | Investigation |
Method | GET |
URI | investigation/sparql/{template_name} |
Parameters | params per template(template_name):* no params needed for investigation_and_characteristics, investigations_and_factors and investigations_and_protocols* factorValues: URI array for investigation_by_factors and protocols_by_factors template * geneIdentifiers: Array of Strings for biosearch (e.G.: entrez:3075,genesymbol:HSPD1). |
Header Parameters | Accept: application/json, subjectid:SECURITY-TOKEN |
Media Type (input) | |
Results | Investigation data as json |
Media Type (output) | application/json |
Status code | 200, 400, 401, 404 |
Get information from published investigations via predefined SPARQL queries. (e.G.: https://services.toxbank.net/investigation/sparql/investigations_and_protocols ) . You may also use camelcase notation for templatenames (e.G.: InvestigationsAndProtocols, InvestigationByFactors).
cURL example
curl -X GET -k -H 'Accept:application/json' -H 'subjectid:MYTOKEN' https://services.toxbank.net/investigation/sparql/genelist
curl -X GET -k -H "Accept:application/json" -H "subjectid:MYTOKEN" https://services.toxbank.net/investigation/sparql/investigation_and_characteristics
curl -X GET -k -H "Accept:application/json" -H "subjectid:MYTOKEN" -d "value=http://purl.obolibrary.org/obo/NEWT_4932" https://services.toxbank.net/investigation/sparql/investigation_by_characteristic
curl -X GET -k -H "Accept:application/json" -H "subjectid:MYTOKEN" -d "value=organism" https://services.toxbank.net/investigation/sparql/investigation_by_characteristic_name
curl -X GET -k -H "Accept:application/json" -H "subjectid:MYTOKEN" -d "value=Saccharomyces cerevisiae (Baker's yeast)" https://services.toxbank.net/investigation/sparql/investigation_by_characteristic_value
curl -X GET -k -H "Accept:application/json" -H "subjectid:MYTOKEN" -d "values=http://purl.obolibrary.org/chebi/CHEBI:39867" https://services.toxbank.net/investigation/sparql/investigation_by_factor
curl -X GET -k -H "Accept:application/json" -H "subjectid:MYTOKEN" -d "factorValues=['http://purl.obolibrary.org/chebi/CHEBI:39867']" https://services.toxbank.net/investigation/sparql/investigation_by_factors
curl -X GET -k -H "Accept:application/json" -H "subjectid:MYTOKEN" -d "geneIdentifiers=['entrez:3075']" https://services.toxbank.net/investigation/sparql/biosearch
curl -X GET -k -H 'Accept:application/json' -H 'subjectid:MYTOKEN' https://services.toxbank.net/investigation/sparql/investigations_and_factors
curl -X GET -k -H 'Accept:application/json' -H 'subjectid:MYTOKEN' https://services.toxbank.net/investigation/sparql/investigations_and_protocols
curl -X GET -k -H 'Accept:application/json' -H 'subjectid:MYTOKEN' -d "factorValues=['http://purl.obolibrary.org/chebi/CHEBI:39867']" https://services.toxbank.net/investigation/sparql/protocols_by_factors
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
cURL example
curl -X GET -k -H 'Accept:text/uri-list' -H 'subjectid:MYTOKEN' https://services.toxbank.net/investigation/{id} curl -X GET -k -H 'Accept:application/rdf+xml' -H 'subjectid:MYTOKEN' https://services.toxbank.net/investigation/{id}
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://services.toxbank.net/investigation/{id}/metadata
Get investigation data
Description | Get investigation data via predefined SPARQL templates |
---|---|
Resource | Investigation |
Method | GET |
URI | /investigation/{id}/sparql/{template_name} or investigation/{id}/sparql/{template_name}/{biosample_id} |
Parameters | |
Header Parameters | Accept: one of < application/sparql-results+xml, application/json, text/uri-list, text/html > , subjectid:SECURITY-TOKEN |
Media Type (input) | |
Results | Investigation data as sparql-results+xml json uri-list html |
Media Type (output) | application/sparql-results+xml application/json text/uri-list text/html |
Status code | 200, 400, 401, 404 |
Get investigation data via predefined SPARQL templates. Add one of investigation_endpoint_technology, investigation_details, factors_by_investigation or characteristics_by_investigation to an investigation plus /sparql/ URI (e.G.: https://services.toxbank.net/investigation/{id}/sparql/investigation_endpoint_technology ) . You may also use camelcase notation for templatenames (e.G.: FactorsByInvestigation). Links: Page, Edit with form
cURL example
curl -X GET -k -H 'Accept:application/json' -H 'subjectid:MYTOKEN' https://services.toxbank.net/investigation/{id}/sparql/CharacteristicsByInvestigation
curl -X GET -k -H 'Accept:application/json' -H 'subjectid:MYTOKEN' https://services.toxbank.net/investigation/{id}/sparql/CharacteristicsBySample/{biosample}
curl -X GET -k -H 'Accept:application/json' -H 'subjectid:MYTOKEN' https://services.toxbank.net/investigation/{id}/sparql/FactorsByInvestigation
curl -X GET -k -H 'Accept:application/json' -H 'subjectid:MYTOKEN' https://services.toxbank.net/investigation/{id}/sparql/FactorvaluesByInvestigation
curl -X GET -k -H 'Accept:application/json' -H 'subjectid:MYTOKEN' https://services.toxbank.net/investigation/{id}/sparql/FilesAndAssaysByInvestigation
curl -X GET -k -H 'Accept:application/json' -H 'subjectid:MYTOKEN' https://services.toxbank.net/investigation/{id}/sparql/FilesByInvestigation
curl -X GET -k -H 'Accept:application/json' -H 'subjectid:MYTOKEN' https://services.toxbank.net/investigation/{id}/sparql/FilesWithDatanodesByInvestigation
curl -X GET -k -H 'Accept:application/json' -H 'subjectid:MYTOKEN' https://services.toxbank.net/investigation/{id}/sparql/InvestigationDetails
curl -X GET -k -H 'Accept:application/json' -H 'subjectid:MYTOKEN' https://services.toxbank.net/investigation/{id}/sparql/InvestigationEndpointTechnology
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
cURL example
curl -X GET -k -H 'Accept:application/rdf+xml' -H 'subjectid:MYTOKEN' https://services.toxbank.net/investigation/{id}/MN20977
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
cURL example
curl -X DELETE -k -H 'subjectid:MYTOKEN' https://services.toxbank.net/investigation/{id}
Add/update 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/update 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://services.toxbank.net/investigation/{id}
Update isPublished flag in metadata
curl -Lk -X PUT -i -H "subjectid:MYTOKEN" -d "published=true" https://services.toxbank.net/investigation/{id}
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
Get a protocol uri associated with a Study
Description | Get a study related protocol uri |
---|---|
Resource | Investigation |
Method | GET |
URI | /investigation/{id}/protocol |
Parameters | |
Header Parameters | Subjectid:SECURITY-TOKEN |
Media Type (input) | Accept:application/rdf+xml |
Results | Protocol uris |
Media Type (output) | application/rdf+xml |
Status code | 200, 400, 401, 404 |
Links: Page, Edit with form
cURL example
curl -X GET -k -H 'Accept:application/rdf+xml' -H 'subjectid:MYTOKEN' https://services.toxbank.net/investigation/{id}/protocol
Security
see Protocol
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 .