Skip to content

Commit

Permalink
speciestree
Browse files Browse the repository at this point in the history
  • Loading branch information
ajo2995 committed Mar 18, 2016
1 parent a456a51 commit 0d8486a
Show file tree
Hide file tree
Showing 3 changed files with 98 additions and 8 deletions.
92 changes: 91 additions & 1 deletion api/swagger/swagger.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
swagger: "2.0"
info:
version: "0.50.8-zm4.1"
version: "0.50.8-zm4.2"
title: Gramene API for maizev4
# basePath prefixes all resource paths
basePath: /zm4/v50
Expand Down Expand Up @@ -219,6 +219,26 @@ paths:
description: "MongoDB response object"
schema:
$ref: "#/definitions/MongoGenetreesResponse"
/speciestrees:
x-swagger-router-controller: mongo
get:
summary: "MongoDB"
operationId: speciestrees
description: "Fetch documents from a collection"
parameters:
- $ref: "#/parameters/q"
- $ref: "#/parameters/rows"
- $ref: "#/parameters/start"
- $ref: "#/parameters/fl"
- $ref: "#/parameters/wt"
- $ref: "#/parameters/idList"
tags:
- "Data access"
responses:
200:
description: "MongoDB response object"
schema:
$ref: "#/definitions/MongoSpeciestreesResponse"
/maps:
x-swagger-router-controller: mongo
get:
Expand Down Expand Up @@ -1013,6 +1033,72 @@ definitions:
type: integer
minimum: 0

MongoSpeciestreesResponse:
type: 'array'
items:
$ref: '#/definitions/SpeciestreeRootNode'

SpeciestreeRootNode:
allOf:
- $ref: '#/definitions/SpeciestreeNode'
-
required:
- root_id
- compara_db
properties:
root_id:
type: integer
minimum: 0
compara_db:
type: string

SpeciestreeNode:
allOf:
- $ref: '#/definitions/SpeciestreeInternalNode'
- $ref: '#/definitions/SpeciestreeLeafNode'
-
required:
- node_id
- distance_to_parent
- left_index
- right_index
- taxon_id
- taxon_name
- num_genes
properties:
node_id:
type: integer
minimum: 0
distance_to_parent:
type: number
minimum: 0.0
left_index:
type: integer
minimum: 0
right_index:
type: integer
taxon_id:
type: integer
minimum: 0
taxon_name:
type: string
minimum: 0
num_genes:
type: integer
minimum: 0

SpeciestreeInternalNode:
properties:
children:
type: array
items:
$ref: '#/definitions/SpeciestreeNode'

SpeciestreeLeafNode:
properties:
system_name:
type: string

MongoGenetreesResponse:
type: 'array'
items:
Expand All @@ -1027,6 +1113,7 @@ definitions:
- tree_id
- tree_stable_id
- tree_type
- compara_db
properties:
root_id:
type: integer
Expand All @@ -1040,6 +1127,9 @@ definitions:
enum:
- 'tree'
- 'supertree'
compara_db:
type: string

GenetreeNode:
allOf:
- $ref: '#/definitions/GenetreeInternalNode'
Expand Down
12 changes: 6 additions & 6 deletions npm-shrinkwrap.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"csv-stringify": "0.0.8",
"csv2": "^0.1.1",
"express": "^4.12.3",
"gramene-mongodb-config": "warelab/gramene-mongodb-config#zm4",
"gramene-mongodb-config": "git://github.com/warelab/gramene-mongodb-config#zm4",
"gramene-bedify": "1.0.5",
"isnumber": "^1.0.0",
"kerberos": "0.0.18",
Expand Down

0 comments on commit 0d8486a

Please sign in to comment.