예제 #1
0
# Get projects with medium curation level.
osb_projects = osb.get_projects('Medium')

for model_name in nml2_model_list:
    print(model_name)
    path = os.path.join(NEUROML2_PATH, model_name)
    nml_files = glob.glob(path + "/*.nml")
    if not len(nml_files):
        qprint("No .nml files found for model %s" % model_name)
    for nml_file in nml_files:
        nml = loaders.NeuroMLLoader.load(nml_file)
        for cell in nml.cells:
            nlex_id = cell.neuro_lex_id
            if nlex_id is None:
                project = osb.get_project_with_identifier(
                    model_name, osb_projects)
                if project:
                    nlex_id_list = project.NEUROLEX_IDS_CELLS
                    if len(nlex_id_list):
                        if ';' not in nlex_id_list:
                            nlex_id = nlex_id_list
                        else:
                            qprint("Multiple neurolex ids found; skipping...")
                            continue
                    else:
                        qprint("No neurolex id found; skipping...")
                        continue
            qprint("Model %s had neurolex id %s" % (model_name, nlex_id))

            # Specify reference data for this test.
            reference_data = neuroelectro.NeuroElectroSummary(
예제 #2
0
# Get projects with medium curation level. 
osb_projects = osb.get_projects('Medium')  

for model_name in nml2_model_list:
	print(model_name)
	path = os.path.join(NEUROML2_PATH,model_name)
	nml_files = glob.glob(path+"/*.nml")
	if not len(nml_files):
		qprint("No .nml files found for model %s" % model_name)
	for nml_file in nml_files:
		nml = loaders.NeuroMLLoader.load(nml_file)
		for cell in nml.cells:
			nlex_id = cell.neuro_lex_id
			if nlex_id is None:
				project = osb.get_project_with_identifier(model_name,osb_projects)
				if project:
					nlex_id_list = project.NEUROLEX_IDS_CELLS
					if len(nlex_id_list):
						if ';' not in nlex_id_list:
							nlex_id = nlex_id_list
						else:
							qprint("Multiple neurolex ids found; skipping...")
							continue
					else:
						qprint("No neurolex id found; skipping...")
						continue
			qprint("Model %s had neurolex id %s" % (model_name,nlex_id))

			# Specify reference data for this test.  
			reference_data = neuroelectro.NeuroElectroSummary(
예제 #3
0
			path = os.path.join(OSB_MODELS,brain_area,neuron_type,model_name,"neuroConstruct")
			if not os.path.isdir(path):
				continue
			
			if model_name in ['korngreen-pyramidal',
							  'IzhikevichModel',
							  'RothmanEtAl_KoleEtAl_PyrCell']:
				continue
			#if models_tested not in [11,17]:
			#	models_tested += 1
			#	continue
					
			print("\r\r*** %d: %s ***\r\r" % (models_tested,model_name))
			models_tested += 1
			identifier = model_name#.lower()
			project = osb.get_project_with_identifier(identifier,projects=osb_projects)
			if project is None:
				print("No OSB project identifier found for model %s" % model_name)
				continue
			
			neurolex_ids = project.NEUROLEX_IDS_CELLS
			if not neurolex_ids or not len(neurolex_ids):
				print("No neurolex ids found for model %s" % model_name)
				continue
			if ';' not in neurolex_ids:
				neurolex_id = neurolex_ids
			else:
				print("Multiple neurolex ids found; skipping...")
				continue
			print("Neurolex ID is %s" % neurolex_id)
			if neurolex_id in nlex_ids: