samples
Find samples
Lists samples, filtering by data passed as URL parameters.
Errors
Status | Description |
---|---|
400 | Invalid query |
Request
get
/samples
Response
{
"status": "200"
}
Create a sample
Creates a new sample with the given name, labels and subtractions.
Parameters
Name | Type | Required | Description |
---|---|---|---|
files | array | true | |
group | integer | false | |
host | string | false | |
isolate | string | false | |
labels | array | false | |
library_type | false | ||
locale | string | false | |
name | string | true | |
notes | string | false | |
subtractions | array | false |
Errors
Status | Description |
---|---|
400 | Invalid input |
403 | Not permitted |
Request
post
/samples
Response
{
"example": {
"all_read": false,
"all_write": false,
"artifacts": [],
"created_at": "2022-05-20T23:48:00.901000Z",
"format": "fastq",
"group": {
"id": 4,
"name": "Sidney"
},
"group_read": true,
"group_write": true,
"hold": true,
"host": "Malus domestica",
"id": "9zn468u9",
"is_legacy": false,
"isolate": "",
"labels": [],
"library_type": "normal",
"locale": "",
"name": "HX8",
"notes": "",
"nuvs": false,
"paired": true,
"pathoscope": true,
"quality": {
"bases": [
[
36,
37,
37,
37,
37,
37
],
[
36,
37,
37,
37,
37,
37
]
],
"composition": [
[
29,
18,
15,
36.5
],
[
25.5,
19,
31.5,
22
]
],
"count": 94601674,
"encoding": "Sanger / Illumina 1.9\n",
"gc": 43,
"length": [
150,
150
],
"sequences": [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
18,
298
]
},
"reads": [
{
"download_url": "/samples/9zn468u9/reads/reads_1.fq.gz",
"id": 713,
"name": "reads_1.fq.gz",
"name_on_disk": "reads_1.fq.gz",
"sample": "9zn468u9",
"size": 3540467819,
"upload": null,
"uploaded_at": "2022-05-21T00:10:27.418000Z"
},
{
"download_url": "/samples/9zn468u9/reads/reads_2.fq.gz",
"id": 714,
"name": "reads_2.fq.gz",
"name_on_disk": "reads_2.fq.gz",
"sample": "9zn468u9",
"size": 3321721014,
"upload": null,
"uploaded_at": "2022-05-21T00:11:10.743000Z"
}
],
"ready": true,
"subtractions": [
{
"id": "0nhpi36p",
"name": "Malus domestica"
}
],
"user": {
"administrator": true,
"handle": "mrott",
"id": "ihvze2u9"
},
"workflows": {
"aodp": "incompatible",
"nuvs": "none",
"pathoscope": "none"
}
},
"status": "201"
}
Delete a sample
Removes a sample document and all associated analyses.
Request
delete
/samples/{sample_id}
Get a sample
Fetches the details for a sample.
Errors
Status | Description |
---|---|
403 | |
404 |
Request
get
/samples/{sample_id}
Response
{
"example": {
"all_read": false,
"all_write": false,
"artifacts": [],
"created_at": "2022-05-20T23:48:00.901000Z",
"format": "fastq",
"group": {
"id": 4,
"name": "Sidney"
},
"group_read": true,
"group_write": true,
"hold": true,
"host": "Malus domestica",
"id": "9zn468u9",
"is_legacy": false,
"isolate": "",
"labels": [],
"library_type": "normal",
"locale": "",
"name": "HX8",
"notes": "",
"nuvs": false,
"paired": true,
"pathoscope": true,
"quality": {
"bases": [
[
36,
37,
37,
37,
37,
37
],
[
36,
37,
37,
37,
37,
37
]
],
"composition": [
[
29,
18,
15,
36.5
],
[
25.5,
19,
31.5,
22
]
],
"count": 94601674,
"encoding": "Sanger / Illumina 1.9\n",
"gc": 43,
"length": [
150,
150
],
"sequences": [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
18,
298
]
},
"reads": [
{
"download_url": "/samples/9zn468u9/reads/reads_1.fq.gz",
"id": 713,
"name": "reads_1.fq.gz",
"name_on_disk": "reads_1.fq.gz",
"sample": "9zn468u9",
"size": 3540467819,
"upload": null,
"uploaded_at": "2022-05-21T00:10:27.418000Z"
},
{
"download_url": "/samples/9zn468u9/reads/reads_2.fq.gz",
"id": 714,
"name": "reads_2.fq.gz",
"name_on_disk": "reads_2.fq.gz",
"sample": "9zn468u9",
"size": 3321721014,
"upload": null,
"uploaded_at": "2022-05-21T00:11:10.743000Z"
}
],
"ready": true,
"subtractions": [
{
"id": "0nhpi36p",
"name": "Malus domestica"
}
],
"user": {
"administrator": true,
"handle": "mrott",
"id": "ihvze2u9"
},
"workflows": {
"aodp": "incompatible",
"nuvs": "none",
"pathoscope": "none"
}
},
"status": "200"
}
Update a sample
Updates a sample using its 'sample id'.
Parameters
Name | Type | Required | Description |
---|---|---|---|
host | string | false | |
isolate | string | false | |
labels | array | false | |
locale | string | false | |
name | string | false | |
notes | string | false | |
subtractions | array | false |
Errors
Status | Description |
---|---|
400 | Sample name is already in use |
403 | Insufficient rights |
404 | Not found |
Request
patch
/samples/{sample_id}
{
"host": "Tobacco",
"labels": [
1,
5,
6
],
"name": "Tobacco mosaic viru"
}
Response
{
"example": {
"all_read": false,
"all_write": false,
"artifacts": [],
"created_at": "2022-05-20T23:48:00.901000Z",
"format": "fastq",
"group": {
"id": 4,
"name": "Sidney"
},
"group_read": true,
"group_write": true,
"hold": true,
"host": "Tobacco",
"id": "9zn468u9",
"is_legacy": false,
"isolate": "",
"labels": [
1,
5,
6
],
"library_type": "normal",
"locale": "",
"name": "Tobacco mosaic viru",
"notes": "",
"nuvs": false,
"paired": true,
"pathoscope": true,
"quality": {
"bases": [
[
36,
37,
37,
37,
37,
37
],
[
36,
37,
37,
37,
37,
37
]
],
"composition": [
[
29,
18,
15,
36.5
],
[
25.5,
19,
31.5,
22
]
],
"count": 94601674,
"encoding": "Sanger / Illumina 1.9\n",
"gc": 43,
"length": [
150,
150
],
"sequences": [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
18,
298
]
},
"reads": [
{
"download_url": "/samples/9zn468u9/reads/reads_1.fq.gz",
"id": 713,
"name": "reads_1.fq.gz",
"name_on_disk": "reads_1.fq.gz",
"sample": "9zn468u9",
"size": 3540467819,
"upload": null,
"uploaded_at": "2022-05-21T00:10:27.418000Z"
},
{
"download_url": "/samples/9zn468u9/reads/reads_2.fq.gz",
"id": 714,
"name": "reads_2.fq.gz",
"name_on_disk": "reads_2.fq.gz",
"sample": "9zn468u9",
"size": 3321721014,
"upload": null,
"uploaded_at": "2022-05-21T00:11:10.743000Z"
}
],
"ready": true,
"subtractions": [
{
"id": "0nhpi36p",
"name": "Malus domestica"
}
],
"user": {
"administrator": true,
"handle": "mrott",
"id": "ihvze2u9"
},
"workflows": {
"aodp": "incompatible",
"nuvs": "none",
"pathoscope": "none"
}
},
"status": "200"
}
Get analyses
Lists the analyses associated with the given sample_id
.
Errors
Status | Description |
---|---|
403 | Insufficient rights |
404 | Not found |
Request
get
/samples/{sample_id}/analyses
Response
{
"status": "200"
}
Start analysis job
Starts an analysis job for a given sample.
Parameters
Name | Type | Required | Description |
---|---|---|---|
ml | integer | false | |
ref_id | string | true | |
subtractions | array | false | |
workflow | true |
Errors
Status | Description |
---|---|
400 | Invalid input |
403 | Insufficient rights |
404 | Not found |
Request
post
/samples/{sample_id}/analyses
Response
{
"example": {
"created_at": "2022-05-21T01:28:55.441000Z",
"id": "m9ktiz0i",
"index": {
"id": "9c5u6wsq",
"version": 13
},
"job": {
"id": "bt8nwg9z"
},
"ready": true,
"reference": {
"id": "d19exr83",
"name": "New Plant Viruses"
},
"sample": {
"id": "9zn468u9"
},
"subtractions": [
{
"id": "0nhpi36p",
"name": "Malus domestica"
}
],
"updated_at": "2022-05-21T01:28:55.441000Z",
"user": {
"administrator": true,
"handle": "mrott",
"id": "ihvze2u9"
},
"workflow": "pathoscope_bowtie"
},
"status": "201"
}
Update rights settings
Updates the rights settings for the specified sample document.
Parameters
Name | Type | Required | Description |
---|---|---|---|
all_read | boolean | false | |
all_write | boolean | false | |
group | false | ||
group_read | boolean | false | |
group_write | boolean | false |
Errors
Status | Description |
---|---|
400 | Group does not exist |
403 | Must be administrator or sample owner |
404 | Not found |
Request
patch
/samples/{sample_id}/rights
{
"group": "administrator",
"group_read": true,
"group_write": true
}
Response
{
"example": {
"all_read": false,
"all_write": false,
"artifacts": [],
"created_at": "2022-05-20T23:48:00.901000Z",
"format": "fastq",
"group": "administrator",
"group_read": true,
"group_write": true,
"hold": true,
"host": "virus",
"id": "9zn468u9",
"is_legacy": false,
"isolate": "",
"labels": [
1,
5,
6
],
"library_type": "normal",
"locale": "",
"name": "foo",
"notes": "",
"nuvs": false,
"paired": true,
"pathoscope": true,
"quality": {
"bases": [
[
36,
37,
37,
37,
37,
37
],
[
36,
37,
37,
37,
37,
37
]
],
"composition": [
[
29,
18,
15,
36.5
],
[
25.5,
19,
31.5,
22
]
],
"count": 94601674,
"encoding": "Sanger / Illumina 1.9\n",
"gc": 43,
"length": [
150,
150
],
"sequences": [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
18,
298
]
},
"reads": [
{
"download_url": "/samples/9zn468u9/reads/reads_1.fq.gz",
"id": 713,
"name": "reads_1.fq.gz",
"name_on_disk": "reads_1.fq.gz",
"sample": "9zn468u9",
"size": 3540467819,
"upload": null,
"uploaded_at": "2022-05-21T00:10:27.418000Z"
},
{
"download_url": "/samples/9zn468u9/reads/reads_2.fq.gz",
"id": 714,
"name": "reads_2.fq.gz",
"name_on_disk": "reads_2.fq.gz",
"sample": "9zn468u9",
"size": 3321721014,
"upload": null,
"uploaded_at": "2022-05-21T00:11:10.743000Z"
}
],
"ready": true,
"subtractions": [
{
"id": "0nhpi36p",
"name": "Malus domestica"
}
],
"user": {
"administrator": true,
"handle": "mrott",
"id": "ihvze2u9"
},
"workflows": {
"aodp": "incompatible",
"nuvs": "none",
"pathoscope": "none"
}
},
"status": "200"
}