Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
minerva
core
Commits
5e941587
Commit
5e941587
authored
6 years ago
by
Piotr Gawron
Browse files
Options
Downloads
Patches
Plain Diff
list of implemented annotators is provided by spring
parent
ce85cfcd
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!595
Resolve "Small molecules annotators to be rearranged"
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
annotation/src/main/java/lcsb/mapviewer/annotation/services/ModelAnnotator.java
+6
-163
6 additions, 163 deletions
...va/lcsb/mapviewer/annotation/services/ModelAnnotator.java
with
6 additions
and
163 deletions
annotation/src/main/java/lcsb/mapviewer/annotation/services/ModelAnnotator.java
+
6
−
163
View file @
5e941587
...
...
@@ -10,30 +10,13 @@ import java.util.Map;
import
java.util.Queue
;
import
java.util.Set
;
import
javax.annotation.PostConstruct
;
import
org.apache.log4j.Logger
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
lcsb.mapviewer.annotation.services.annotators.AnnotationParameters
;
import
lcsb.mapviewer.annotation.services.annotators.AnnotatorException
;
import
lcsb.mapviewer.annotation.services.annotators.BiocompendiumAnnotator
;
import
lcsb.mapviewer.annotation.services.annotators.BrendaAnnotator
;
import
lcsb.mapviewer.annotation.services.annotators.CazyAnnotator
;
import
lcsb.mapviewer.annotation.services.annotators.ChebiAnnotator
;
import
lcsb.mapviewer.annotation.services.annotators.ElementAnnotator
;
import
lcsb.mapviewer.annotation.services.annotators.EnsemblAnnotator
;
import
lcsb.mapviewer.annotation.services.annotators.EntrezAnnotator
;
import
lcsb.mapviewer.annotation.services.annotators.GoAnnotator
;
import
lcsb.mapviewer.annotation.services.annotators.HgncAnnotator
;
import
lcsb.mapviewer.annotation.services.annotators.KeggAnnotator
;
import
lcsb.mapviewer.annotation.services.annotators.PdbAnnotator
;
import
lcsb.mapviewer.annotation.services.annotators.ReconAnnotator
;
import
lcsb.mapviewer.annotation.services.annotators.StitchAnnotator
;
import
lcsb.mapviewer.annotation.services.annotators.StringAnnotator
;
import
lcsb.mapviewer.annotation.services.annotators.TairAnnotator
;
import
lcsb.mapviewer.annotation.services.annotators.UniprotAnnotator
;
import
lcsb.mapviewer.common.IProgressUpdater
;
import
lcsb.mapviewer.common.exception.InvalidArgumentException
;
import
lcsb.mapviewer.model.map.BioEntity
;
...
...
@@ -77,84 +60,6 @@ public class ModelAnnotator {
*/
private
static
Logger
logger
=
Logger
.
getLogger
(
ModelAnnotator
.
class
);
/**
* BRENDA annotator.
*/
private
BrendaAnnotator
brendaAnnotator
;
/**
* Service accessing <a href= "http://biocompendium.embl.de/" >internal
* annotating service</a>.
*/
private
BiocompendiumAnnotator
biocompendiumAnnotator
;
/**
* CAZy annotator.
*/
private
CazyAnnotator
cazyAnnotator
;
/**
* Backend to the chebi database.
*/
private
ChebiAnnotator
chebiBackend
;
/**
* Uniprot annotator.
*/
private
UniprotAnnotator
uniprotAnnotator
;
/**
* PDB annotator.
*/
private
PdbAnnotator
pdbAnnotator
;
/**
* Recon annotator.
*/
private
ReconAnnotator
reconAnnotator
;
/**
* Service accessing <a href= "http://www.ebi.ac.uk/QuickGO/" >Gene
* Ontology</a>.
*/
private
GoAnnotator
goAnnotator
;
/**
* Service accessing <a href= "http://www.genenames.org/" >HUGO Gene
* Nomenclature Committee</a>.
*/
private
HgncAnnotator
hgncAnnotator
;
/**
* Service accessing <a href= "http://www.kegg.jp/" > KEGG EC Nomenclature</a>.
*/
private
KeggAnnotator
keggAnnotator
;
/**
* Service accessing <a href= "http://www.ncbi.nlm.nih.gov/gene/" >Entrez</a>.
*/
private
EntrezAnnotator
entrezAnnotator
;
/**
* Service accessing <a href= "http://ensembl.org">Ensembl</a>.
*/
private
EnsemblAnnotator
ensemblAnnotator
;
/**
* STITCH annotator.
*/
private
StitchAnnotator
stitchAnnotator
;
/**
* STRING annotator.
*/
private
StringAnnotator
stringAnnotator
;
/**
* TAIR annotator.
*/
private
TairAnnotator
tairAnnotator
;
/**
* List of all avaliable {@link ElementAnnotator} objects.
*/
...
...
@@ -169,76 +74,14 @@ public class ModelAnnotator {
* Constructor
*/
@Autowired
public
ModelAnnotator
(
MiriamConnector
miriamConnector
,
BrendaAnnotator
brendaAnnotator
,
BiocompendiumAnnotator
biocompendiumAnnotator
,
CazyAnnotator
cazyAnnotator
,
ChebiAnnotator
chebiBackend
,
UniprotAnnotator
uniprotAnnotator
,
PdbAnnotator
pdbAnnotator
,
ReconAnnotator
reconAnnotator
,
GoAnnotator
goAnnotator
,
HgncAnnotator
hgncAnnotator
,
KeggAnnotator
keggAnnotator
,
EntrezAnnotator
entrezAnnotator
,
EnsemblAnnotator
ensemblAnnotator
,
StitchAnnotator
stitchAnnotator
,
StringAnnotator
stringAnnotator
,
TairAnnotator
tairAnnotator
)
{
public
ModelAnnotator
(
MiriamConnector
miriamConnector
,
List
<
ElementAnnotator
>
availableAnnotators
)
{
this
.
miriamConnector
=
miriamConnector
;
this
.
brendaAnnotator
=
brendaAnnotator
;
this
.
biocompendiumAnnotator
=
biocompendiumAnnotator
;
this
.
cazyAnnotator
=
cazyAnnotator
;
this
.
chebiBackend
=
chebiBackend
;
this
.
uniprotAnnotator
=
uniprotAnnotator
;
this
.
pdbAnnotator
=
pdbAnnotator
;
this
.
reconAnnotator
=
reconAnnotator
;
this
.
goAnnotator
=
goAnnotator
;
this
.
hgncAnnotator
=
hgncAnnotator
;
this
.
keggAnnotator
=
keggAnnotator
;
this
.
entrezAnnotator
=
entrezAnnotator
;
this
.
ensemblAnnotator
=
ensemblAnnotator
;
this
.
stitchAnnotator
=
stitchAnnotator
;
this
.
stringAnnotator
=
stringAnnotator
;
this
.
tairAnnotator
=
tairAnnotator
;
}
/**
* Post intintialization method. Will be called after spring creates beans and
* set the list of valid annotators.
*/
@PostConstruct
public
final
void
init
()
{
availableAnnotators
=
new
ArrayList
<>();
this
.
availableAnnotators
=
availableAnnotators
;
defaultAnnotators
=
new
ArrayList
<>();
addAnnotator
(
brendaAnnotator
);
addAnnotator
(
biocompendiumAnnotator
);
addAnnotator
(
cazyAnnotator
);
addAnnotator
(
chebiBackend
);
addAnnotator
(
uniprotAnnotator
);
addAnnotator
(
goAnnotator
);
addAnnotator
(
hgncAnnotator
);
addAnnotator
(
keggAnnotator
);
addAnnotator
(
pdbAnnotator
);
addAnnotator
(
reconAnnotator
);
addAnnotator
(
entrezAnnotator
);
addAnnotator
(
ensemblAnnotator
);
addAnnotator
(
stitchAnnotator
);
addAnnotator
(
stringAnnotator
);
addAnnotator
(
tairAnnotator
);
}
/**
* Adds annotator list of available annotators in {@link ModelAnnotator} class.
*
* @param annotator
* {@link ElementAnnotator} annotator o add
*/
private
void
addAnnotator
(
ElementAnnotator
annotator
)
{
availableAnnotators
.
add
(
annotator
);
if
(
annotator
.
isDefault
())
{
defaultAnnotators
.
add
(
annotator
);
for
(
ElementAnnotator
annotator
:
availableAnnotators
)
{
if
(
annotator
.
isDefault
())
{
defaultAnnotators
.
add
(
annotator
);
}
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment