Public
Edited
May 21, 2024
CCF-API Documentation Javascript
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
ccfOpenapiClient = import("https://cdn.skypack.dev/@ccf-openapi/js-client@1.1.2");
Insert cell
Insert cell
host = "https://ccf-api.hubmapconsortium.org/v1";
Insert cell
Insert cell
apiClient = new ccfOpenapiClient.ApiClient(host);
Insert cell
Insert cell
apiInstance = new ccfOpenapiClient.DefaultApi(apiClient);
Insert cell
Insert cell
Insert cell
status = await apiInstance.dbStatus();
Insert cell
Insert cell
sparqlGet = await apiInstance.sparql('SELECT * WHERE { ?sub ?pred ?obj . } LIMIT 10');
Insert cell
Insert cell
sparqlQueryRequest = new ccfOpenapiClient.SparqlQueryRequest('SELECT * WHERE { ?sub ?pred ?obj . } LIMIT 10');
Insert cell
Insert cell
sparql_post = apiInstance.sparqlPost(sparqlQueryRequest);
Insert cell
Insert cell
aggregateResults = await apiInstance.aggregateResults({
'age': new ccfOpenapiClient.MinMax(45.0, 60.0),
'bmi': new ccfOpenapiClient.MinMax(65.0, 83.0),
'cache': true,
'ontologyTerms': ["http://purl.obolibrary.org/obo/UBERON_0000955",],
'cellTypeTerms': ["http://purl.obolibrary.org/obo/CL_0000000",],
'providers': [],
'sex': "female",
'spatial': [{"x":84.0,"y":146.0,"z":53.0,"radius":12.0,"target":"http://purl.org/ccf/latest/ccf.owl#VHFAllenBrain"},],
'technologies': [],
'token': ""
})
Insert cell
Insert cell
apiInstance.getSpatialPlacement({
"target_iri": "http://purl.org/ccf/latest/ccf.owl#VHFemale",
"rui_location": {
"@context": "https://hubmapconsortium.github.io/hubmap-ontology/ccf-context.jsonld",
"@id": "http://purl.org/ccf/1.5/f7130161-ad0a-4801-b5a4-f6297e0f1869",
"@type": "SpatialEntity",
"creator": "Bruce Herr",
"creator_first_name": "Bruce",
"creator_last_name": "Herr",
"creation_date": "2022-04-27",
"ccf_annotations": ["http://purl.obolibrary.org/obo/UBERON_0002015", "http://purl.obolibrary.org/obo/UBERON_0000362", "http://purl.obolibrary.org/obo/UBERON_0004200", "http://purl.obolibrary.org/obo/UBERON_0001225", "http://purl.obolibrary.org/obo/UBERON_0001284", "http://purl.obolibrary.org/obo/UBERON_0002189"],
"x_dimension": 11,
"y_dimension": 12,
"z_dimension": 13,
"dimension_units": "millimeter",
"placement": {
"@context": "https://hubmapconsortium.github.io/hubmap-ontology/ccf-context.jsonld",
"@id": "http://purl.org/ccf/1.5/f7130161-ad0a-4801-b5a4-f6297e0f1869_placement",
"@type": "SpatialPlacement",
"target": "http://purl.org/ccf/latest/ccf.owl#VHFLeftKidneyV1.1",
"placement_date": "2022-04-27",
"x_scaling": 1,
"y_scaling": 1,
"z_scaling": 1,
"scaling_units": "ratio",
"x_rotation": -61,
"y_rotation": 50,
"z_rotation": -84,
"rotation_order": "XYZ",
"rotation_units": "degree",
"x_translation": 20.149,
"y_translation": 109.963,
"z_translation": 38.79,
"translation_units": "millimeter"
}
}
});
Insert cell
Insert cell
apiInstance.gtexRuiLocations({cache: false})
Insert cell
Insert cell
apiInstance.ontologyTermOccurences({
'age': new ccfOpenapiClient.MinMax(45.0, 60.0),
'bmi': new ccfOpenapiClient.MinMax(65.0, 83.0),
'cache': true,
'ontologyTerms': ["http://purl.obolibrary.org/obo/UBERON_0000955",],
'cellTypeTerms': ["http://purl.obolibrary.org/obo/CL_0000000",],
'providers': [],
'sex': "female",
'spatial': [{"x":84.0,"y":146.0,"z":53.0,"radius":12.0,"target":"http://purl.org/ccf/latest/ccf.owl#VHFAllenBrain"},],
'technologies': [],
'token': ""
});
Insert cell
Insert cell
apiInstance.cellTypeTermOccurences({
'age': new ccfOpenapiClient.MinMax(45.0, 60.0),
'bmi': new ccfOpenapiClient.MinMax(65.0, 83.0),
'cache': true,
'ontologyTerms': ["http://purl.obolibrary.org/obo/UBERON_0000955",],
'cellTypeTerms': ["http://purl.obolibrary.org/obo/CL_0000000",],
'providers': [],
'sex': "female",
'spatial': [{"x":84.0,"y":146.0,"z":53.0,"radius":12.0,"target":"http://purl.org/ccf/latest/ccf.owl#VHFAllenBrain"},],
'technologies': [],
'token': ""
});
Insert cell
Insert cell
apiInstance.ontologyTreeModel();
Insert cell
Insert cell
apiInstance.cellTypeTreeModel({cache: false});
Insert cell
Insert cell
apiInstance.providerNames({cache: true});
Insert cell
Insert cell
apiInstance.referenceOrgans({cache: true});
Insert cell
Insert cell
apiInstance.referenceOrganScene(({organ_iri : "http://purl.obolibrary.org/obo/UBERON_0004539"}));
Insert cell
Insert cell
apiInstance.scene({
'age': new ccfOpenapiClient.MinMax(45.0, 60.0),
'bmi': new ccfOpenapiClient.MinMax(65.0, 83.0),
'cache': true,
'ontologyTerms': ["http://purl.obolibrary.org/obo/UBERON_0000955",],
'cellTypeTerms': ["http://purl.obolibrary.org/obo/CL_0000000",],
'providers': [],
'sex': "female",
'spatial': [{"x":84.0,"y":146.0,"z":53.0,"radius":12.0,"target":"http://purl.org/ccf/latest/ccf.owl#VHFAllenBrain"},],
'technologies': [],
'token': ""
});
Insert cell
Insert cell
apiInstance.technologyNames(({cache: false}));
Insert cell
Insert cell
apiInstance.tissueBlocks({
'age': new ccfOpenapiClient.MinMax(45.0, 60.0),
'bmi': new ccfOpenapiClient.MinMax(65.0, 83.0),
'cache': true,
'ontologyTerms': ["http://purl.obolibrary.org/obo/UBERON_0000955",],
'cellTypeTerms': ["http://purl.obolibrary.org/obo/CL_0000000",],
'providers': [],
'sex': "female",
'spatial': [{"x":84.0,"y":146.0,"z":53.0,"radius":12.0,"target":"http://purl.org/ccf/latest/ccf.owl#VHFAllenBrain"},],
'technologies': [],
'token': "",
'organ_iri': "http://purl.obolibrary.org/obo/UBERON_0004539"
});
Insert cell
Insert cell
apiInstance.dbStatus(({token:'abcdefgh12334'}));
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more