Skip to content

Commit

Permalink
Updated API to include ir_filtered_sequence_count as a response field.
Browse files Browse the repository at this point in the history
  • Loading branch information
bcorrie committed Nov 11, 2017
1 parent 822a78e commit 1f8c656
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 14 deletions.
43 changes: 36 additions & 7 deletions iReceptor_Data_Service_API_V2.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"host": "ipa.ireceptor.org",
"basePath": "/v2",
"definitions": {
"ireceptor_summary_response": {
"ireceptor_sample_summary_response": {
"type": "array",
"items": {
"allOf": [
Expand All @@ -29,6 +29,25 @@
]
}
},
"ireceptor_sequence_summary_response": {
"type": "array",
"items": {
"allOf": [
{
"$ref": "#/definitions/ireceptor_sequence_count_model"
},
{
"$ref": "#/definitions/ireceptor_filtered_sequence_count_model"
},
{
"$ref": "#/definitions/airr_summary_model"
},
{
"$ref": "https://raw.githubusercontent.com/sfu-ireceptor/api/AIRR-compliance/ireceptor_summary.yaml#/ireceptor_summary_model"
}
]
}
},
"ireceptor_sequence_response": {
"type": "array",
"items": {
Expand Down Expand Up @@ -75,11 +94,21 @@
"properties": {
"ir_sequence_count": {
"type": "integer",
"description": "Number of sequences found that met the search criteria for this sample",
"description": "Number of sequences found that met the sample search criteria for this sample",
"example": 123456
}
}
},
"ireceptor_filtered_sequence_count_model": {
"type": "object",
"properties": {
"ir_filtered_sequence_count": {
"type": "integer",
"description": "Number of sequences found that met the sequence search criteria for this sample",
"example": 4321
}
}
},
"ireceptor_core_samples_parameters_model": {
"type": "object",
"required": [
Expand Down Expand Up @@ -783,7 +812,7 @@
"200": {
"description": "A successful call returns an array of sample summary metadata for\neach sample that meets the search criteria. The metadata returned\nfor each sample includes the number of sequences found for that sample\nas well as the study/subject/sample data for that sample. The metadata\nfor each sample in the response contains a set of AIRR compliant data\nas well as repository specific data that is required to query the\nrepository about those types of elements. \n",
"schema": {
"$ref": "#/definitions/ireceptor_summary_response"
"$ref": "#/definitions/ireceptor_sample_summary_response"
}
},
"400": {
Expand Down Expand Up @@ -875,7 +904,7 @@
"200": {
"description": "A successful call returns an array of sample summary metadata for each sample that meets the search criteria. The metadata returned for each sample includes the number of sequences found for that sample as well as the study/subject/sample data for that sample. The metadata for each sample in the response contains a set of AIRR compliant data as well as repository specific data that is required to query the repository about those types of elements. \n",
"schema": {
"$ref": "#/definitions/ireceptor_summary_response"
"$ref": "#/definitions/ireceptor_sample_summary_response"
}
},
"400": {
Expand Down Expand Up @@ -943,7 +972,7 @@
"type": "object",
"properties": {
"summary": {
"$ref": "#/definitions/ireceptor_summary_response"
"$ref": "#/definitions/ireceptor_sequence_summary_response"
},
"items": {
"$ref": "#/definitions/ireceptor_sequence_response"
Expand Down Expand Up @@ -1013,7 +1042,7 @@
"type": "object",
"properties": {
"summary": {
"$ref": "#/definitions/ireceptor_summary_response"
"$ref": "#/definitions/ireceptor_sequence_summary_response"
},
"items": {
"$ref": "#/definitions/ireceptor_sequence_response"
Expand Down Expand Up @@ -1219,7 +1248,7 @@
"type": "object",
"properties": {
"summary": {
"$ref": "#/definitions/ireceptor_summary_response"
"$ref": "#/definitions/ireceptor_sequence_summary_response"
},
"items": {
"$ref": "#/definitions/ireceptor_sequence_response"
Expand Down
29 changes: 22 additions & 7 deletions iReceptor_Data_Service_API_V2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,21 @@ definitions:
# response is used wherever summary data at the sample level is provided
# by an API call. It is composed of the sequence count, the relevant AIRR
# model elements, and the revelant iReceptor model elements.
ireceptor_summary_response:
ireceptor_sample_summary_response:
type: array
items:
allOf:
- $ref: '#/definitions/ireceptor_sequence_count_model'
- $ref: '#/definitions/airr_summary_model'
- $ref: 'https://raw.githubusercontent.com/sfu-ireceptor/api/AIRR-compliance/ireceptor_summary.yaml#/ireceptor_summary_model'
ireceptor_sequence_summary_response:
type: array
items:
allOf:
- $ref: '#/definitions/ireceptor_sequence_count_model'
- $ref: '#/definitions/ireceptor_filtered_sequence_count_model'
- $ref: '#/definitions/airr_summary_model'
- $ref: 'https://raw.githubusercontent.com/sfu-ireceptor/api/AIRR-compliance/ireceptor_summary.yaml#/ireceptor_summary_model'
# A definition of the sequence response for an iReceptor API call. This
# response is used wherever sequence data is provided by an API call.
# It is a composite of the sequence fields defined by the MiAIRR standard,
Expand Down Expand Up @@ -56,8 +64,15 @@ definitions:
properties:
ir_sequence_count:
type: integer
description: Number of sequences found that met the search criteria for this sample
description: Number of sequences found that met the sample search criteria for this sample
example: 123456
ireceptor_filtered_sequence_count_model:
type: object
properties:
ir_filtered_sequence_count:
type: integer
description: Number of sequences found that met the sequence search criteria for this sample
example: 4321
ireceptor_core_samples_parameters_model:
type: object
required:
Expand Down Expand Up @@ -700,7 +715,7 @@ paths:
as well as repository specific data that is required to query the
repository about those types of elements.
schema:
$ref: '#/definitions/ireceptor_summary_response'
$ref: '#/definitions/ireceptor_sample_summary_response'
'400':
description: malformed request
'401':
Expand Down Expand Up @@ -756,7 +771,7 @@ paths:
as well as repository specific data that is required to query the
repository about those types of elements.
schema:
$ref: '#/definitions/ireceptor_summary_response'
$ref: '#/definitions/ireceptor_sample_summary_response'
'400':
description: malformed request
'401':
Expand Down Expand Up @@ -804,7 +819,7 @@ paths:
type: object
properties:
summary:
$ref: '#/definitions/ireceptor_summary_response'
$ref: '#/definitions/ireceptor_sequence_summary_response'
items:
$ref: '#/definitions/ireceptor_sequence_response'
'400':
Expand Down Expand Up @@ -852,7 +867,7 @@ paths:
type: object
properties:
summary:
$ref: '#/definitions/ireceptor_summary_response'
$ref: '#/definitions/ireceptor_sequence_summary_response'
items:
$ref: '#/definitions/ireceptor_sequence_response'
'400':
Expand Down Expand Up @@ -986,7 +1001,7 @@ paths:
type: object
properties:
summary:
$ref: '#/definitions/ireceptor_summary_response'
$ref: '#/definitions/ireceptor_sequence_summary_response'
items:
$ref: '#/definitions/ireceptor_sequence_response'
'400':
Expand Down

0 comments on commit 1f8c656

Please sign in to comment.