Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SOaAS
dbxref
Commits
d64ebcc6
Commit
d64ebcc6
authored
Jan 17, 2018
by
Lukas Jelonek
Browse files
Refactor project such that it can be build and deployed via pip
parent
8e6a7f70
Changes
8
Hide whitespace changes
Inline
Side-by-side
.gitignore
View file @
d64ebcc6
*.pyc
docs/build/
build/
dist/
*.egg-info/
*.egg
*.py[cod]
__pycache__/
*.so
*~
docs/_build/
LICENSE
View file @
d64ebcc6
The MIT License (MIT)
Copyright (c) 2017
SOaAS
Copyright (c) 2017
Lukas Jelonek
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
...
...
README.md
View file @
d64ebcc6
# DB XREF resolver and retriever tool
A tool that resolves db_xrefs into URLs and that retrieves the data as json documents.
A tool that resolves database cross references (dbxrefs). It can return a list of
locations where the cross reference points to in different formats, like HTML,
XML, flat file or json. It can also retrieve the data for some of the supported
databases and convert it into json.
# Getting started (Setup)
The intended audience for this tool are bioinformatician that need to collect
data for dbxrefs and postprocess it. By returning everything in json format the
need for normalization and special parsing of the data is reduced.
# Getting started for development (Setup)
Prerequisites:
...
...
@@ -11,10 +18,24 @@ Prerequisites:
Supported bioinformatic databases:
*
None yet
*
Ontologies
*
Gene Ontology
Checkout the repository:
~~~~
git clone git@git.computational.bio.uni-giessen.de:SOaAS/dbxref.git
~~~~
Setup a virtualenv for development and install it in editable mode:
~~~~
virtualenv --python=python3 venv; source venv/bin/activate;
pip install -e .
~~~~
Use the application:
~~~~
dbxref resolve GO:0097281
~~~~
bin/dbxref
deleted
100755 → 0
View file @
8e6a7f70
#!/usr/bin/env python3
import
os
import
sys
sys
.
path
.
insert
(
0
,
os
.
path
.
abspath
(
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
'..'
)))
from
dbxref.main
import
main
main
()
config.yaml
deleted
100644 → 0
View file @
8e6a7f70
dbxref/config.py
View file @
d64ebcc6
def
get_install_location
():
"""Finds the location directory of the tool"""
import
os
script_path
=
os
.
path
.
realpath
(
__file__
)
script_dir
=
os
.
path
.
dirname
(
script_path
)
install_dir
=
os
.
path
.
dirname
(
script_dir
)
return
install_dir
def
get_providers_path
():
import
pkg_resources
return
pkg_resources
.
resource_filename
(
'dbxref'
,
'providers.yaml'
)
def
load_providers
():
import
yaml
data
=
[]
with
open
(
get_
install_location
()
+
'/
providers
.yaml'
)
as
data_file
:
with
open
(
get_providers
_path
()
)
as
data_file
:
data
=
yaml
.
load
(
data_file
)
return
index_providers
(
data
)
...
...
providers.yaml
→
dbxref/
providers.yaml
View file @
d64ebcc6
File moved
setup.py
0 → 100644
View file @
d64ebcc6
from
setuptools
import
setup
,
find_packages
from
codecs
import
open
from
os
import
path
here
=
path
.
abspath
(
path
.
dirname
(
__file__
))
# Get the long description from the README file
with
open
(
path
.
join
(
here
,
'README.md'
),
encoding
=
'utf-8'
)
as
f
:
long_description
=
f
.
read
()
setup
(
name
=
'dbxref'
,
version
=
'0.1.0'
,
description
=
'A library for resolving database cross references'
,
long_description
=
long_description
,
url
=
'https://git.computational.bio.uni-giessen.de/SOaAS/dbxref'
,
author
=
'Lukas Jelonek'
,
author_email
=
'Lukas.Jelonek@computational.bio.uni-giessen.de'
,
keywords
=
'dbxref'
,
packages
=
find_packages
(
exclude
=
[
'contrib'
,
'docs'
,
'tests'
]),
package_data
=
{
'dbxref'
:[
'*.yaml'
]},
install_requires
=
[
'requests'
,
'cachecontrol'
,
'pyyaml'
,
'lockfile'
],
entry_points
=
{
'console_scripts'
:
[
'dbxref=dbxref.main:main'
,
],
},
)
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment