#!/usr/bin/env python3 import csv from heatmaps.scigraph_client import Graph, Vocabulary from collections import defaultdict NIF_Directory = defaultdict(list) a=0 v=Vocabulary() g=Graph() count=0 need=0 with open('cell_layer_data.csv', 'rt') as cell_open: cell_IDs= [r[3] for r in csv.reader(cell_open)][1:] with open('brain_region_data.csv', 'rt') as brain_open: cell_IDs+= [r[3] for r in csv.reader(brain_open)][1:] with open('neuron_data_curated.csv', 'rt') as neuron_open: cell_IDs+= [r[3] for r in csv.reader(neuron_open)][1:] with open('lost_cat.csv', 'rt') as f: cell_IDs += [r[3] for r in csv.reader(f)][1:] #print(cell_IDs) n=len(cell_IDs)
#!/usr/bin/env python3 import csv from heatmaps.scigraph_client import Graph, Vocabulary from collections import defaultdict NIF_Directory = defaultdict(list) a = 0 v = Vocabulary() g = Graph() count = 0 need = 0 with open('cell_layer_data.csv', 'rt') as cell_open: cell_IDs = [r[3] for r in csv.reader(cell_open)][1:] with open('brain_region_data.csv', 'rt') as brain_open: cell_IDs += [r[3] for r in csv.reader(brain_open)][1:] with open('neuron_data_curated.csv', 'rt') as neuron_open: cell_IDs += [r[3] for r in csv.reader(neuron_open)][1:] with open('lost_cat.csv', 'rt') as f: cell_IDs += [r[3] for r in csv.reader(f)][1:] #print(cell_IDs) n = len(cell_IDs) #print('We have',n,'IDs') #print('') Curie_Prefixes = v.getCuriePrefixes()[1:] Curie_Prefixes.append('nlx_only') print(Curie_Prefixes)
import json import csv import json from IPython import embed from collections import * from heatmaps.scigraph_client import Graph, Vocabulary from collected import data from rdflib import * import rdflib from rdflib.namespace import RDF g = Graph() v = Vocabulary() v.getCuriePrefixes() ''' .namespace to map long names .graph to make tuples ''' ns = Namespace person = ns( "http://ontology.neuinfo.org/NIF/Backend/BIRNLex_annotation_properties.owl#Bill_Bug" ) + ns( "http://ontology.neuinfo.org/NIF/Backend/BIRNLex_annotation_properties.owl#Bill_Bug" ) #print(person) rawInput = ns( "http://ontology.neuinfo.org/NIF/Backend/BIRNLex_annotation_properties.owl#raw_import" ) nueroNames = ns( "http://ontology.neuinfo.org/NIF/Backend/BIRNLex_annotation_properties.owl#NeuroNames_abbrevSource" )