Difference between revisions of "Classification hub"

From BioUML platform
Jump to: navigation, search
(+{{Stub}})
(Implementation via SqlCachedFunctionalHubSupport)
 
Line 4: Line 4:
  
 
=== Implementation details ===
 
=== Implementation details ===
{{Stub|information about implementation via SqlCachedFunctionalHubSupport}}
 
 
To mark BioHub as classification hub, its {{Method|ru.biosoft.access.biohub.BioHub.getPriority}} method should return positive priority when <code>"FunctionalClassification"</code> {{Class|ru.biosoft.access.biohub.TargetOptions.CollectionRecord}} is supplied. The easiest way to implement such hub is to subclass {{Class|biouml.plugins.enrichment.SqlCachedFunctionalHubSupport}} abstract class.
 
To mark BioHub as classification hub, its {{Method|ru.biosoft.access.biohub.BioHub.getPriority}} method should return positive priority when <code>"FunctionalClassification"</code> {{Class|ru.biosoft.access.biohub.TargetOptions.CollectionRecord}} is supplied. The easiest way to implement such hub is to subclass {{Class|biouml.plugins.enrichment.SqlCachedFunctionalHubSupport}} abstract class.
  
Line 10: Line 9:
  
 
When user selects "Repository folder" as the classification hub, then {{Class|biouml.plugins.enrichment.RepositoryHub}} is used.
 
When user selects "Repository folder" as the classification hub, then {{Class|biouml.plugins.enrichment.RepositoryHub}} is used.
 +
 +
=== Implementation via SqlCachedFunctionalHubSupport ===
 +
The easiest way to implement your own '''classification hub''' is to subclass {{Class|biouml.plugins.enrichment.SqlCachedFunctionalHubSupport}}. There must be MySQL database available where this class will automatically create a table with classification information during the first use. You will have to implement the following methods:
 +
* '''getTableName()''': must return a name of the SQL table which will be used to store the classification information.
 +
* '''getInputReferenceType()''': must return a [[reference type]] object which represents the input identifiers for your classification. If this reference type differs from [[File:ReferenceType-EnsemblGeneTableType-icon.png]] [[Genes - Ensembl|Ensembl genes]] then available [[matching BioHub]]s will be used to convert your identifiers.
 +
* '''getGroups()''': must return a collection of {{Class|biouml.plugins.enrichment.SqlCachedFunctionalHubSupport.Group}} objects. The {{Class|biouml.plugins.enrichment.SqlCachedFunctionalHubSupport.Group}} object contains group title, group accession number and list of group member identifiers which belong to the reference type returned by getInputReferenceType(). This method is called only once when SQL table is not created. During subsequent runs the data stored in SQL table is used. If you want to update the classification, you have to delete the table manually and restart BioUML.
 +
* '''annotateElement(Element)''' (optional): add custom annotation fields to the category element.
  
 
[[Category:Development]]
 
[[Category:Development]]
 
[[Category:BioHub]]
 
[[Category:BioHub]]

Latest revision as of 16:13, 3 July 2013

Classification hub is a kind of BioHub which used to classify the genes into several groups. This BioHub type is defined in biouml.plugins.enrichment plugin and used for two analysis methods: Data-Functional-classification-icon.png Functional classification and Data-Enrichment-analysis-icon.png Enrichment analysis. Currently only ReferenceType-EnsemblGeneTableType-icon.png Ensembl genes are accepted for classification via classification hubs. If you have other type of identifiers, consider using Data-Convert-table-icon.png Convert table analysis.

An example of classification hub is the FunctionalGOHub, which classifies supplied genes via Gene Ontology categories.

[edit] Implementation details

To mark BioHub as classification hub, its BioHub.getPriority method should return positive priority when "FunctionalClassification" CollectionRecord is supplied. The easiest way to implement such hub is to subclass SqlCachedFunctionalHubSupport abstract class.

When classification hub is requested to provide the matching, it must provide some additional information including total number of Ensembl genes participating in classification; total number of genes in the individual groups and number of input genes which participate in classifications. Also some additional group annotation fields can be added. These fields will appear in the analysis output table.

When user selects "Repository folder" as the classification hub, then RepositoryHub is used.

[edit] Implementation via SqlCachedFunctionalHubSupport

The easiest way to implement your own classification hub is to subclass SqlCachedFunctionalHubSupport. There must be MySQL database available where this class will automatically create a table with classification information during the first use. You will have to implement the following methods:

  • getTableName(): must return a name of the SQL table which will be used to store the classification information.
  • getInputReferenceType(): must return a reference type object which represents the input identifiers for your classification. If this reference type differs from ReferenceType-EnsemblGeneTableType-icon.png Ensembl genes then available matching BioHubs will be used to convert your identifiers.
  • getGroups(): must return a collection of Group objects. The Group object contains group title, group accession number and list of group member identifiers which belong to the reference type returned by getInputReferenceType(). This method is called only once when SQL table is not created. During subsequent runs the data stored in SQL table is used. If you want to update the classification, you have to delete the table manually and restart BioUML.
  • annotateElement(Element) (optional): add custom annotation fields to the category element.
Personal tools
Namespaces

Variants
Actions
BioUML platform
Community
Modelling
Analysis & Workflows
Collaborative research
Development
Virtual biology
Wiki
Toolbox