}) pagination = api.model( 'A page of results', { 'page': fields.Integer(description='Number of this page of results'), 'pages': fields.Integer(description='Total number of pages of results'), 'per_page': fields.Integer(description='Number of items per page of results'), 'total': fields.Integer(description='Total number of results'), }) page_of_variantsets = api.inherit( 'Page of variant sets', pagination, {'items': fields.List(fields.Nested(variantset))}) class VariantSetsCollection(Resource): @api.expect(pagination_arguments) @api.marshal_with(page_of_variantsets) def get(self): """ Returns list of variant sets. """ args = pagination_arguments.parse_args(request) page = args.get('page', 1) per_page = args.get('per_page', 10) posts_query = VariantSet.query
}) bbop_graph = api.model( 'Graph', { 'nodes': fields.List(fields.Nested(node)), 'edges': fields.List(fields.Nested(edge)), }) named_object = api.model( 'NamedObject', { 'id': fields.String(readOnly=True, description='ID'), 'label': fields.String(readOnly=True, description='RDFS Label'), 'category': fields.String(readOnly=True, description='Type of object') }) relation = api.inherit('Relation', named_object, {}) publication = api.inherit( 'Publication', named_object, { # authors etc }) # todo: inherits taxon = api.model( 'Taxon', { 'id': fields.String(readOnly=True, description='ID'), 'label': fields.String(readOnly=True, description='RDFS Label') })
compare_input = api.model( 'CompareInput', { 'reference_ids': fields.List(fields.String(description='curie formatted id'), description='list of ids'), 'query_ids': fields.List(fields.List( fields.String(description='curie formatted id'), description='list of ids'), description='list of query profiles') }) # Schema for output document for sim search ic_node = api.inherit('IcNode', named_object_core, { 'IC': fields.Float(description='Information content'), }) typed_node = api.inherit( 'TypedNode', named_object_core, { 'type': fields.String(description='node type (eg phenotype, disease)'), 'taxon': fields.Nested(named_object_core, description='taxon') }) pairwise_match = api.model( 'PairwiseMatch', { 'reference': fields.Nested(ic_node, description='reference id'), 'match': fields.Nested(ic_node, description='match id'), 'lcs': fields.Nested(ic_node, description='lowest common subsumer') })
from flask_restplus import fields from biolink.api.restplus import api abstract_property_value = api.model('AbstractPropertyValue', { 'val': fields.String(readOnly=True, description='value part'), 'pred': fields.String(readOnly=True, description='predicate (attribute) part'), 'xrefs': fields.List(fields.String, description='Xrefs provenance for property-value'), }) synonym_property_value = api.inherit('SynonymPropertyValue', abstract_property_value, { }) xref_property_value = api.inherit('SynonymPropertyValue', abstract_property_value, { }) definition_property_value = api.inherit('DefinitionPropertyValue', abstract_property_value, { }) basic_property_value = api.inherit('DefinitionPropertyValue', abstract_property_value, { }) meta = api.model('Meta', { 'definition': fields.Nested(definition_property_value), description='definition plus source'), 'comments': fields.List(fields.String(readOnly=True), description='comments'), 'subsets': fields.List(fields.String(readOnly=True), description='subsets (slims)'), 'xrefs': fields.List(fields.Nested(xref_property_value)), description='xrefs plus source'), 'synonyms': fields.List(fields.Nested(synonym_property_value)), description='synonyms plus scope, type and source'), 'basic_property_values': fields.List(fields.Nested(basic_property_value)), description='synonyms plus scope, type and source'), })
}) ## BBOP/OBO Graphs abstract_property_value = api.model( 'AbstractPropertyValue', { 'val': fields.String(readOnly=True, description='value part'), 'pred': fields.String(readOnly=True, description='predicate (attribute) part'), 'xrefs': fields.List(fields.String, description='Xrefs provenance for property-value'), }) synonym_property_value = api.inherit('SynonymPropertyValue', abstract_property_value, {}) summary_property_value = api.inherit('SummaryPropertyValue', abstract_property_value, {}) association_property_value = api.inherit('AssociationPropertyValue', abstract_property_value, {}) node = api.model( 'Node', { 'id': fields.String(readOnly=True, description='ID or CURIE'), 'lbl': fields.String(readOnly=True, description='human readable label, maps to rdfs:label') })