Comments (8)
I got some time to look into the notebook more... there was at least a step missing... the bdbClass
should not be used in a static way, but be instantiated around an "Eclipse workspace":
workspaceRoot = "."
bdbClass = jimport("net.bioclipse.managers.BridgedbManager")
bdb = bdbClass(workspaceRoot)
Then, put the BridgeDb database in a project (which will go into that workspace):
!mkdir -p BridgeDb; cd BridgeDb; wget https://ndownloader.figshare.com/files/26001794
!cp 26001794 metabolites_20210109.bridge
Then, the loading would be like this:
test = bdb.loadRelationalDatabase("/BridgeDb/metabolites_20210109.bridge")
But then I still run into a problem, a missing class. I will look into that next.
from bacting.
Okay, the method actually doesn't use the workspace approach :/
So, this is the code that works for me now:
from scyjava import config, jimport
config.add_endpoints('io.github.egonw.bacting:managers-bridgedb:0.0.23-SNAPSHOT')
workspaceRoot = "."
bdbClass = jimport("net.bioclipse.managers.BridgedbManager")
bdb = bdbClass(workspaceRoot)
test = bdb.loadRelationalDatabase("./Test/complexes_20200510.bridge")
I will try to release 0.0.23 today.
from bacting.
Bacting 0.0.23 is released which includes this fix.
from bacting.
@egonw Thanks. I updated https://colab.research.google.com/drive/1hs-yuKl_pOCIkUl5DM4h_Ecyp6rI2cOx?usp=sharing .
It works well.
from bacting.
@kozo2, sorry for the delay... could I ask you to try the following?
test = bdbClass.loadRelationalDatabase(to_java("./metabolites_20210109.bridge"))
Looking at the error message, I think it's trying to pass a Python str
to the method, see also https://github.com/scijava/scyjava#available-functions
from bacting.
@egonw I updated https://colab.research.google.com/drive/1hs-yuKl_pOCIkUl5DM4h_Ecyp6rI2cOx?usp=sharing
It tries
import scyjava
test = bdbClass.loadRelationalDatabase(scyjava.to_java("./metabolites_20210109.bridge"))
but, there is still the following TypeError
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-12-3d6a271882bf> in <module>()
----> 1 test = bdbClass.loadRelationalDatabase(scyjava.to_java("./metabolites_20210109.bridge"))
2 #test = bdbClass.loadRelationalDatabase("./metabolites_20210109.bridge")
TypeError: No matching overloads found for *static* net.bioclipse.managers.BridgedbManager.loadRelationalDatabase(java.lang.String), options are:
public org.bridgedb.IDMapper net.bioclipse.managers.BridgedbManager.loadRelationalDatabase(java.lang.String) throws net.bioclipse.core.business.BioclipseException
from bacting.
I can confirm this dependency is indeed not given. Fixing this now.
from bacting.
Fixed in 08a23fb
from bacting.
Related Issues (20)
- update codecov
- write documentation how to develop a Quarkus REST service around Bacting
- reproduce scripts in "Bioclipse 2: A scriptable integration platform for the life sciences"
- reproduce scripts in "Applications of the InChI in cheminformatics with the CDK and Bioclipse"
- reproduce scripts in "Computational toxicology using the OpenTox application programming interface and Bioclipse"
- check if paper can be updated for progress monitoring
- Oscar manager support HOT 1
- ponder about JavaScript examples
- IcebearManager
- Update SPARQL instructions
- set up Bacting bundle with everything HOT 1
- CDKManager.loadMolecule with Scyjava does not work HOT 7
- WikidataManager
- port xml.validate(IFile file, IProgressMonitor monitor) HOT 1
- PathvisioManager
- UIManager
- port xml.validateAgainstXMLSchema(IFile file, IFile schema, IProgressMonitor monitor)
- JSoupManager
- too many commons-io versions HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bacting.