@biothings-explorer/query_graph_handler
Version:
A nodejs module to query TRAPI Query Graph
690 lines (689 loc) • 4.48 MB
JSON
{
"took": 90,
"total": 90,
"max_score": 0.7659169,
"hits": [
{
"_id": "04f42ae00c8e5991b98d0e681dbdc596",
"_meta": {
"date_created": "2021-03-04T18:27:43.614727+00:00",
"last_updated": "2021-03-29T07:00:46.292294+00:00",
"url": "http://bdt-social.renci.org:8080/socio_environmental_exposures_api/v1/openapi.json",
"username": "lstillwe"
},
"_score": 0.7659169,
"info": {
"contact": {
"email": "lisa@renci.org",
"name": "Lisa Stillwell"
},
"description": "\nThis API returns data from the US Census Bureau American Community Survey (ACS) for a given spatial location of interest.\n\nThe API returns estimated values for socio-economic variables and related variables for small geographic areas that may act as indirect indicators of relevant health behaviors and outcomes. The data are collected by the US Census Bureau and are publicly available.\n\nThe variables are taken from the five-year summary data file of the US Census Bureau ACS, which is constructed from five annual waves of the bureau’s largest household survey. Approximately, two million households have completed the survey annually since calendar year 2005. (Five waves of the survey before 2005 sampled approximately 500,000 households each.) See https://www.census.gov/acs/www/methodology/sample-size-and-data-quality/sample-size/ for more detail. Microdata are available, but small-area data are only available in summary tabulations.\n\nValues are provided at the US Census Block Group level, representing the 2007-2011 and 2012-2016 calendar-year periods for locations within the continental USA. Block groups, the smallest geographic area for which sample survey data are released, generally contain 600 to 3,000 people (e.g., the size of a single city apartment building). Block Groups are aggregates of an average of 39 Blocks each, each of which is delineated by visible and invisible geographic boundaries. Block groups, in turn, are aggregated into Census Tracts, which generally have a population size between 1,200 and 8,000 people, with an optimum size of 4,000 people. Census Tracts aggregate into counties and counties into states. Metropolitan and micropolitan areas are aggregates of counties. See https://www2.census.gov/geo/pdfs/reference/geodiagram.pdf for further detail. Census geography, even Block Groups, may cross municipal lines and may include both urbanized and rural areas. Because population is a large factor in determining Census geography, some Block Groups may cover an extensive rural or wilderness area while others are quite compact. Census Block, Block Group, and Tract boundaries may change somewhat with each decennial Census, but remain stable in between Censuses.\n\nThe US Census Bureau is mandated to preserve the confidentiality of individual-level data. Therefore, data are often summarized, coarsened into categories, or suppressed by complex secret algorithms (especially, but not limited to household income data). In addition, because the variables of interest may only apply to a small subset of Block Group missing data can occur. In some versions of the data, calculated values are suppressed in Block Groups with less than 50 residents.\n\nStandard errors for the socio-demographic variables are provided. Because each of the values in the ACS data files are summary statistics calculated from sample survey data for each Block Group, different samples yield somewhat different values. Therefore, the Census Bureau generates 80 replicate values for selected variables. These provide the basis for the estimated standard errors of the estimates.\n\nThe currently available variables are listed here:\n\n **(2007-2011 data)**\n- **YEARS** – the range of years for which this census data is valid\n- **GEOID** – a FIPS like code for identifying which census block group this data pertains to, see (https://www.census.gov/geo/reference/geoidentifiers.html)\n- **EstTotalPopulation** - estimated population count in block group\n- **MedianHouseholdIncome** - estimated median household income\n- **EstResidentialDensity** - block group population density\n- **EstPropNonHispWhite** – proportion of the block group population that is non-Hispanic white\n- **EstPropPersons5PlusNoEnglish** - proportion of the block group population aged 5 plus sometimes speaking a language other than English at home\n- **EstPropMaleLittleWork** - proportion of block group males aged 16-64 who worked less than 26 weeks in the previous year\n- **EstPropHouseholdsNoAuto** - proportion of the block group households with no automobile\n- **EstPropHouseholdSSI** - proportion of the block group households receiving Supplemental Security Income\n- **EstPropHouseholdPA** - proportion of the block group households receiving Public Assistance\n- **EstPropHighSchoolMaxEducation** - proportion of the block group population aged 25 and up with a HS diploma or less\n- **EstPropHighSchoolDropout** - proportion of the block group 16-19 year olds who are neither attending school nor HS graduates\n- **EstPropHighSchoolDropoutNoWork** - proportion of the block group 16-19 year olds who are neither attending school nor HS graduates and are without work\n- **EstPropFemaleHouseholdNoSpouse** - proportion of the block group family households headed by a female (no male partner present)\n- **EstPropFemaleHouseholdFamilyChild** - proportion of the block group family households headed by a female with related children aged 18 or under (no male partner present)\n- **EstPropFemaleHouseholdAnyChild** - proportion of the block group total households headed by a female with any children aged 18 or less (no male partner present)\n\n **(2012-2016 data)**\n- **YEARS** – the range of years for which this census data is valid\n- **GEOID** – a FIPS like code for identifying which census block group this data pertains to, see (https://www.census.gov/geo/reference/geoidentifiers.html)\n- **EstTotalPopulation** - estimated population count in block group\n- **EstTotalPopulation_SE** - standard error of total population in block group\n - **EstResidentialDensity** - block group population density\n- **EstResidentialDensity_SE** - standard error of residential population density in block group\n- **MedianHouseholdIncome** - estimated median household income\n- **MedianHouseholdIncome_SE** - standard error of median household income\n- **EstPropPersonsNoHealthIns** - proportion of the block group population with no health insurance - **EstPropPersonsNoHealthIns_SE** - standard error of proportion of the block group population with no health insurance\n- **EstPropNonHispWhite** – proportion of the block group population that is non-Hispanic white\n- **EstPropNonHispWhite_SE** - standard error of proportion of the block group population that is non-Hispanic white\n- **EstPropPersons5PlusNoEnglish** - proportion of the block group population aged 5 plus sometimes speaking a language other than English at home\n- **EstPropPersons5PlusNoEnglish_SE** - standard error of proportion of the block group population aged 5 plus sometimes speaking a language other than English at home\n- **EstPropMaleLittleWork** - proportion of block group males aged 16-64 who worked less than 26 weeks in the previous year\n- **EstPropHouseholdsNoAuto** - proportion of the block group households with no automobile\n- **EstPropHouseholdsNoAuto_SE** - standard error of proportion of the block group households with no automobile\n- **EstPropHouseholdSSI** - proportion of the block group households receiving Supplemental Security Income\n- **EstPropHouseholdSSI_SE** - standard error of proportion of the block group households receiving Supplemental Security Income\n- **EstPropHouseholdPA** - proportion of the block group households receiving Public Assistance\n- **EstPropHouseholdPA_SE** - standard error of proportion of the block group households receiving Public Assistance\n- **EstPropHighSchoolMaxEducation** - proportion of the block group population aged 25 and up with a HS diploma or less\n- **EstPropHighSchoolMaxEducation_SE** - standard error of proportion of the block group population aged 25 and up with a HS diploma or less\n- **EstPropHighSchoolDropout** - proportion of the block group 16-19 year olds who are neither attending school nor HS graduates\n- **EstPropHighSchoolDropoutNoWork** - proportion of the block group 16-19 year olds who are neither attending school nor HS graduates and are without work\n- **EstPropFemaleHouseholdNoSpouse** - proportion of the block group family households headed by a female (no male partner present)\n- **EstPropFemaleHouseholdNoSpouse_SE** - standard error of proportion of the block group family households headed by a female (no male partner present)\n- **EstPropFemaleHouseholdFamilyChild** - proportion of the block group family households headed by a female with related children aged 18 or under (no male partner present)\n- **EstPropFemaleHouseholdFamilyChild_SE** - standard error of proportion of the block group family households headed by a female with related children aged 18 or under (no male partner present)\n- **EstPropFemaleHouseholdAnyChild** - proportion of the block group total households headed by a female with any children aged 18 or less (no male partner present)\n- **EstPropFemaleHouseholdAnyChild_SE** - standard error of proportion of the block group total households headed by a female with any children aged 18 or less (no male partner present)\n\nLocations are expressed using WGS84 decimal format. WGS84 is the World Geodetic System for expressing latitude and longitude. For example, Raleigh, North Carolina is at latitude 35.7796 and longitude -78.6382.\n\nAdditional details on the data can be found in this documentation: (https://github.com/lstillwe/socio-economic-api/blob/master/docs/CensusData.md)\n",
"license": {
"name": "MIT",
"url": "http://opensource.org/licenses/MIT"
},
"title": "Socio-Environmental Exposures API",
"version": "1.0.1",
"x-translator": {
"component": "KP",
"team": [
"Exposures Provider"
]
}
},
"paths": {
"/values": {
"get": {
"description": "By passing in a location specification (lat, lon) and a year range, you can retrieve the the ACS Values for that location and year range\n",
"operationId": "get_values",
"parameters": [
{
"description": "latitude in decimal degrees format, ie: 32.47",
"in": "query",
"name": "latitude",
"required": true,
"schema": {
"type": "string"
}
},
{
"description": "longitude in decimal degrees format, ie: -86.5",
"in": "query",
"name": "longitude",
"required": true,
"schema": {
"type": "string"
}
},
{
"description": "ACS data year range specification",
"in": "query",
"name": "years",
"required": true,
"schema": {
"enum": [
"All (2007-2016)",
"2007-2011",
"2012-2016"
],
"type": "string"
}
}
],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"properties": {
"latitude": {
"example": "32.47",
"type": "string"
},
"longitude": {
"example": -86.5,
"type": "string"
},
"values": {
"items": {
"properties": {
"EstPropFemaleHouseholdAnyChild": {
"example": "0.154929577",
"type": "string"
},
"EstPropFemaleHouseholdAnyChild_SE": {
"example": "0.075973316",
"type": "string"
},
"EstPropFemaleHouseholdFamilyChild": {
"example": "0.227979275",
"type": "string"
},
"EstPropFemaleHouseholdFamilyChild_SE": {
"example": "0.151408698",
"type": "string"
},
"EstPropFemaleHouseholdNoSpouse": {
"example": "0.362694301",
"type": "string"
},
"EstPropFemaleHouseholdNoSpouse_SE": {
"example": "0.108321058",
"type": "string"
},
"EstPropHighSchoolDropout": {
"example": "n/a",
"type": "string"
},
"EstPropHighSchoolDropoutNoWork": {
"example": "n/a",
"type": "string"
},
"EstPropHighSchoolMaxEducation": {
"example": "0.53164557",
"type": "string"
},
"EstPropHighSchoolMaxEducation_SE": {
"example": "0.076480429",
"type": "string"
},
"EstPropHouseholdPA": {
"example": "0",
"type": "string"
},
"EstPropHouseholdPA_SE": {
"example": "0.060887293",
"type": "string"
},
"EstPropHouseholdSSI": {
"example": "0.088028169",
"type": "string"
},
"EstPropHouseholdSSI_SE": {
"example": "0.04974414",
"type": "string"
},
"EstPropHouseholdsNoAuto": {
"example": "0.038732394",
"type": "string"
},
"EstPropHouseholdsNoAuto_SE": {
"example": "0.039252128",
"type": "string"
},
"EstPropMaleLittleWork": {
"example": "0.385245902",
"type": "string"
},
"EstPropNonHispWhite": {
"example": "0.763758389",
"type": "string"
},
"EstPropNonHispWhite_SE": {
"example": "0.105181283",
"type": "string"
},
"EstPropPersons5PlusNoEnglish": {
"example": "0.075070822",
"type": "string"
},
"EstPropPersons5PlusNoEnglish_SE": {
"example": "0.040387049",
"type": "string"
},
"EstPropPersonsNoHealthIns": {
"example": "0.183892617",
"type": "string"
},
"EstPropPersonsNoHealthIns_SE": {
"example": "0.063328335",
"type": "string"
},
"EstResidentialDensity": {
"example": "175.1077206",
"type": "string"
},
"EstResidentialDensity_SE": {
"example": "32.32567504",
"type": "string"
},
"EstTotalPopulation": {
"example": "745",
"type": "string"
},
"EstTotalPopulation_SE": {
"example": "137.5303603",
"type": "string"
},
"MedianHouseholdIncome": {
"example": "n/a",
"type": "string"
},
"MedianHouseholdIncome_SE": {
"example": "9888",
"type": "string"
},
"geoid": {
"example": "15000US010010201001",
"type": "string"
},
"years": {
"example": "2012-2016",
"type": "string"
}
},
"type": "object"
},
"type": "array"
}
},
"type": "object"
}
}
},
"description": "OK"
},
"400": {
"content": {},
"description": "Invalid parameter"
},
"404": {
"content": {},
"description": "No values found"
},
"500": {
"content": {},
"description": "Server error"
}
},
"summary": "provides ACS values",
"x-openapi-router-controller": "swagger_server.controllers.default_controller"
}
}
},
"servers": [
{
"url": "/socio_environmental_exposures_api/v1"
}
],
"tags": [
{
"name": "translator"
}
]
},
{
"_id": "b0c489ea3a4d5aacfd833616d07a037a",
"_meta": {
"date_created": "2021-01-30T16:08:43.224448+00:00",
"last_updated": "2021-03-29T07:01:41.169400+00:00",
"url": "https://monarch-sandbox.cgrb.oregonstate.edu/openapi.json",
"username": "kshefchek"
},
"_score": 0.7659169,
"info": {
"contact": {
"email": "shefchek@oregonstate.edu",
"name": "Kent Shefchek",
"x-id": "https://github.com/kshefchek",
"x-role": "responsible developer"
},
"description": "The SRI reference KG aims to aggregate knowledge sources across translator using KGX. The initial graph contains data files provided by the Monarch Initiative and several ontologies.",
"termsOfService": "http://robokop.renci.org:7055/tos?service_long=Reference+KG+API&provider_long=the+Translator+Consortium",
"title": "SRI Reference Knowledge Graph API",
"version": "1.0.0",
"x-translator": {
"component": "KP",
"team": [
"Standards Reference Implementation Team"
]
}
},
"paths": {
"/query": {
"post": {
"description": "Given a question graph return question graph plus answers.",
"operationId": "reasoner_api_query_post",
"requestBody": {
"content": {
"application/json": {
"schema": {
"allOf": [
{
"$ref": "#/components/schemas/Query"
}
],
"example": {
"message": {
"query_graph": {
"edges": {},
"nodes": {
"n0": {
"category": "biolink:Gene",
"id": "NCBIGene:15"
}
}
}
}
},
"title": "Request"
}
}
},
"required": true
},
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Query"
}
}
},
"description": "Successful Response"
},
"422": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
},
"description": "Validation Error"
}
},
"summary": "Query Reasoner API",
"tags": [
"translator"
]
}
},
"/reasonerapi": {
"get": {
"description": "Returns a list of question templates that can be used to query this plater instance.",
"operationId": "get_reasoner_api_reasonerapi_get",
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"items": {
"$ref": "#/components/schemas/Message"
},
"title": "Response Get Reasoner Api Reasonerapi Get",
"type": "array"
}
}
},
"description": "Successful Response"
}
},
"summary": "Get question templates"
},
"post": {
"deprecated": true,
"description": "Handle TRAPI request.",
"operationId": "reasoner_api_reasonerapi_post",
"requestBody": {
"content": {
"application/json": {
"schema": {
"allOf": [
{
"$ref": "#/components/schemas/Query"
}
],
"example": {
"message": {
"query_graph": {
"edges": {},
"nodes": {
"n0": {
"category": "biolink:Gene",
"id": "NCBIGene:15"
}
}
}
}
},
"title": "Request"
}
}
},
"required": true
},
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Query"
}
}
},
"description": "Successful Response"
},
"422": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
},
"description": "Validation Error"
}
},
"summary": "Reasoner Api"
}
},
"/cypher": {
"post": {
"description": "Runs cypher query against the Neo4j instance, and returns an equivalent response expected from a Neo4j HTTP endpoint (https://neo4j.com/docs/rest-docs/current/).",
"operationId": "cypher_cypher_post",
"requestBody": {
"content": {
"application/json": {
"schema": {
"allOf": [
{
"$ref": "#/components/schemas/CypherRequest"
}
],
"example": {
"query": "MATCH (n) RETURN count(n)"
},
"title": "Request"
}
}
},
"required": true
},
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CypherResponse"
}
}
},
"description": "Successful Response"
},
"422": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
},
"description": "Validation Error"
}
},
"summary": "Run cypher query"
}
},
"/predicates": {
"get": {
"description": "Returns an object where outer keys represent source types with second level keys as targets. And the values of the second level keys is the type of possible edge typesthat connect these concepts.",
"operationId": "predicates_predicates_get",
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"additionalProperties": {
"additionalProperties": {
"items": {
"type": "string"
},
"type": "array"
},
"type": "object"
},
"title": "Response Predicates Predicates Get",
"type": "object"
}
}
},
"description": "Successful Response"
}
},
"summary": "Get one-hop connection types",
"tags": [
"translator"
]
}
},
"/graph/schema": {
"get": {
"deprecated": true,
"description": "Get one-hop connection types",
"operationId": "predicates_graph_schema_get",
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"title": "Response Predicates Graph Schema Get",
"type": "object"
}
}
},
"description": "Successful Response"
}
},
"summary": "Get one-hop connection types"
}
},
"/simple_spec": {
"get": {
"description": "Returns a list of available predicates when choosing a single source or target curie. Calling this endpoint with no query parameters will return all possible hops for all types.",
"operationId": "simple_spec_simple_spec_get",
"parameters": [
{
"in": "query",
"name": "source",
"required": false,
"schema": {
"title": "Source",
"type": "string"
}
},
{
"in": "query",
"name": "target",
"required": false,
"schema": {
"title": "Target",
"type": "string"
}
}
],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"items": {
"$ref": "#/components/schemas/SimpleSpecElement"
},
"title": "Response Simple Spec Simple Spec Get",
"type": "array"
}
}
},
"description": "Successful Response"
},
"422": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
},
"description": "Validation Error"
}
},
"summary": "Get one-hop connection schema"
}
},
"/graph/summary": {
"get": {
"description": "Returns a summary of the graph.",
"operationId": "graph_summary_graph_summary_get",
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"title": "Response Graph Summary Graph Summary Get",
"type": "object"
}
}
},
"description": "Successful Response"
}
},
"summary": "Get graph summary"
}
},
"/overlay": {
"post": {
"description": "Given a ReasonerAPI graph, add support edges for any nodes linked in result bindings.",
"operationId": "overlay_overlay_post",
"requestBody": {
"content": {
"application/json": {
"schema": {
"allOf": [
{
"$ref": "#/components/schemas/Query"
}
],
"example": {
"message": {
"knowledge_graph": {
"edges": {
"9f7f9d86cb57e7190aafa57f7564eb05": {
"attributes": [
{
"type": "WIKIDATA:Q80585",
"value": {
"ctime": 1610437123.7988985,
"predicate": "biolink:part_of",
"provided_by": "panther.get_gene_family_by_gene_family",
"publications": [],
"relation": "BFO:0000050",
"relation_label": "part of",
"source_database": "panther",
"source_id": "PANTHER.FAMILY:PTHR12015:SF170",
"target_id": "PANTHER.FAMILY:PTHR12015"
}
}
],
"object": "PANTHER.FAMILY:PTHR12015",
"predicate": "biolink:part_of",
"subject": "PANTHER.FAMILY:PTHR12015:SF170"
},
"dd8ef7a4606c4f8e405e6a5b1b095993": {
"attributes": [
{
"type": "WIKIDATA:Q80585",
"value": {
"ctime": 1584932086.0009434,
"predicate": "biolink:part_of",
"provided_by": "panther.get_gene_by_gene_family",
"publications": [],
"relation": "BFO:0000050",
"relation_label": "part of",
"source_database": "panther",
"source_id": "NCBIGene:6352",
"target_id": "PANTHER.FAMILY:PTHR12015"
}
}
],
"object": "PANTHER.FAMILY:PTHR12015",
"predicate": "biolink:part_of",
"subject": "NCBIGene:6352"
}
},
"nodes": {
"NCBIGene:6352": {
"attributes": [
{
"type": "WIKIDATA:Q80585",
"value": {
"category": [
"biolink:BiologicalEntity",
"biolink:GenomicEntity",
"biolink:GeneOrGeneProduct",
"biolink:MacromolecularMachine",
"biolink:NamedThing",
"biolink:MolecularEntity",
"biolink:Gene"
],
"chromosome": "17",
"equivalent_identifiers": [
"ENSEMBL:ENSG00000271503",
"NCBIGene:6352",
"NCBIGene:6352",
"HGNC:10632",
"UniProtKB:P13501"
],
"gene_family": [
"Chemokine ligands"
],
"gene_family_id": [
483
],
"location": "17q12",
"locus_group": "protein-coding gene",
"synonyms": [],
"taxon": 9606
}
}