def main(): memoryCheck(7300000000) ncbigene_make() build(Chebi, n_jobs=1) chebi_dead().write() if False: from pyontutils.qnamefix import cull_prefixes with open('/tmp/chebi-debug.xml', 'wb') as f: ChebiOntSrc.raw.write(f) #with open('/tmp/chebi-debug.ttl', 'wb') as f: f.write(ChebiOntSrc._data[2].serialize(format='nifttl')) g = cull_prefixes(ChebiOntSrc._data[2]) g.filename = '/tmp/chebi-debug.ttl' g.write() embed()
def main(): olr = auth.get_path('ontology-local-repo') resources = auth.get_path('resources') if not olr.exists(): raise FileNotFoundError(f'{olr} does not exist cannot continue') if not resources.exists(): raise FileNotFoundError(f'{resources} does not exist cannot continue') from docopt import docopt args = docopt(__doc__, version='parcellation 0.0.1') # import all ye submodules we have it sorted! LabelBase will find everything for us. :D if not args['--local']: from nifstd_tools.parcellation.aba import Artifacts as abaArts from nifstd_tools.parcellation.fsl import FSL # Artifacts is attached to the class from nifstd_tools.parcellation.whs import Artifacts as whsArts from nifstd_tools.parcellation.berman import Artifacts as bermArts from nifstd_tools.parcellation.paxinos import Artifacts as paxArts from nifstd_tools.parcellation.swanson import Artifacts as swArts from nifstd_tools.parcellation.freesurfer import Artifacts as fsArts onts = getOnts() _ = *(print(ont) for ont in onts), out = build(*onts, parcBridge, fail=args['--fail'], n_jobs=int(args['--jobs'])) if args['--stats']: breakpoint()
def main(): from docopt import docopt # import from this file to avoid __main__ vs module issues # when trying to debug inspect in an ipython instance # who doesn't love completely inconsistent behavior within # purely interpreted code? can you imagine what is going to # happen if python ever gets a real compiler !? try: from scr_sync import Registry, RegistrySource except: try: from nifstd_tools.scr_sync import Registry, RegistrySource except: pass args = docopt(__doc__, version='registry-sync 1.0.0') (user, host, port, database, git_remote, git_local, org, repo) = (args['--' + k] for k in ('user', 'host', 'port', 'database', 'git-remote', 'git-local', 'org', 'repo')) remote = os.path.join(git_remote, org, repo) local = Path(git_local, repo) if not local.exists(): local.parent else: Registry.local_base = local RegistrySource.source = f'{host}:{port}/{database}' Registry.config(user=user, host=host, port=port, database=database) if not args['--test']: graph, = build(Registry, n_jobs=1)
def main(): getOnts() return out = build( DHBALabels, DMBALabels, HBALabels, MBALabels, )
def main(): from docopt import docopt args = docopt(__doc__, version='registry-sync 1.0.0') (user, host, port, database, git_remote, git_local, org, repo) = (args['--' + k] for k in ('user', 'host', 'port', 'database', 'git-remote', 'git-local', 'org', 'repo')) remote = os.path.join(git_remote, org, repo) local = Path(git_local, repo) if not local.exists(): local.parent RegistrySource.source = f'{host}:{port}/{database}' Registry.config(user=user, host=host, port=port, database=database) if not args['--test']: graph, = build(Registry, n_jobs=1)
def main(): build(ksDefs, n_jobs=1)
def main(): build(DKTLabels, FreeSurferLabels)
def main(): from pyontutils.core import build build(WHSSDLabels)