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

Implement KEGG List Operation #28

Open
Rabadash8820 opened this issue Apr 7, 2017 · 0 comments
Open

Implement KEGG List Operation #28

Rabadash8820 opened this issue Apr 7, 2017 · 0 comments

Comments

@Rabadash8820
Copy link
Owner

Rabadash8820 commented Apr 7, 2017

The KEGG list operation will be implemented as a set of methods on our various KeggDb classes. We are moving away from the static operation class pattern because it makes a lot more sense to have operations be actions that a KeggDb instance can perform. Compare:

KeggList.InDatabase(PathwayDb.Instance)

vs

PathwayDb.Instance.ListPathways()

The second form is a bit more clean/fluent, and allows us to have very descriptive method names on each KeggDb class (ListModules(), ListCompounds(), etc.). Of course, this will require a little more dev effort, as we must implement the methods in each class, not some base abstract class.

Some notes on the List() methods:

  • They will return a ListResults<ID> of all KeggIds in the KeggDb instance, where ID derives from KeggId.
  • For each List() method, there should be one that returns all entries in a single massive list (very time- and memory-intensive), and one that returns them in a ListResults&lt;T&gt; data structure (faster and easier to get results a couple at a time
    • ListResults<T> will need to either inherit from Stream, or wrap a Stream
  • EnzymeDb is the only composite databases that will have a List() method, returning a ListResults<TNumber> of all ECNumbers
  • GenomeDb will have the following methods:
    • ListGenomeIds(): returns a ListResults<TNumber> of all genomes
    • ListOrganismCodes(): returns a ListResults<OrganismCode> of all organisms
    • ListGenesInGenome(TNumber): returns a ListResults<GeneId> of all genes in the provided genome
    • ListGenesInOrganism(OrganismCode): returns a ListResults<GeneId> of all genes belonging to the provided organism
  • PathwayDb will have the following methods:
    • ListPathways: Returns a ListResults<MapNumber> of all KEGG Pathways
    • ListPathwaysInOrganism(OrganismCode): Returns a ListResults<MapNumber> of all pathways belonging to the provided organism
    • ListPathwaysInGenome(TNumber): Returns a ListResults<MapNumber> of all pathways belonging to the provided genome
  • ModuleDb will have the following methods:
    • ListPathways: Returns a ListResults<MNumber> of all KEGG Modules
    • ListPathwaysInOrganism(OrganismCode): Returns a ListResults<MNumber> of all modules belonging to the provided organism
    • ListPathwaysInGenome(TNumber): Returns a ListResults<MNumber> of all modules belonging to the provided genome
@Rabadash8820 Rabadash8820 changed the title Implement KeggList Implement Kegg List Operation Apr 17, 2017
@Rabadash8820 Rabadash8820 changed the title Implement Kegg List Operation Implement KEGG List Operation Apr 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant