Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update createDerby.groovy for BioDataSources #14

Open
DeniseSl22 opened this issue Feb 4, 2019 · 2 comments
Open

Update createDerby.groovy for BioDataSources #14

DeniseSl22 opened this issue Feb 4, 2019 · 2 comments
Assignees
Labels

Comments

@DeniseSl22
Copy link

See line https://github.com/bridgedb/create-bridgedb-hmdb/blob/master/createDerby.groovy#L46 for example..... I'm not sure why the datasource has to be created; If I look in
https://github.com/bridgedb/BridgeDb/blob/929de3bbd428c4f45b8c442d2d83d37649b3ad96/org.bridgedb.bio/src/org/bridgedb/bio/BioDataSource.java#L73, Chemspider is already present. Then why do we have to invoke the datasource again?

@egonw egonw changed the title Update createDrerby.groovy for BioDataSources Update createDerby.groovy for BioDataSources Feb 4, 2019
@egonw
Copy link
Member

egonw commented Feb 4, 2019

Not all data sources have a field, like in this code: casDS = BioDataSource.CAS. These fields are basically predefined instances of the class DataSource. If there is no such field, then it needs to be creates on the fly. That explain line 46.

I think CHEMSPIDER did not exist in that class as field when I wrote one of the earlier versions of the createDerby.groovy script and I did not want to wait for the next BridgeDb release?

BTW, the "again" in the last sentence is not really again... it actually creates a new object instance of that class, but it will be considered the same because the name and the syscode are the same.

@egonw egonw removed their assignment Feb 4, 2019
@DeniseSl22
Copy link
Author

Okay that clears that up.... so, when you make a new bridgedb release, I can update the createDerby code as well? Then all the newly added databases should exist as predefined instances right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants