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

Write unit tests for graph enrichment function #8

Open
cthoyt opened this issue Aug 14, 2017 · 4 comments
Open

Write unit tests for graph enrichment function #8

cthoyt opened this issue Aug 14, 2017 · 4 comments
Assignees

Comments

@cthoyt
Copy link
Member

cthoyt commented Aug 14, 2017

It's nice that we can serialize the entirety of a database to a BEL file, but often, we only want the parts that are relevant to a pre-existing BEL network. We need a function that extracts the proteins from a BEL network, queries the database for them, finds their InterPro entries, and adds them to the BEL graph

  1. Read the documentation on the BELGraph data model
  2. Write unit tests that have a small graph (built in python code)
@aramgrigoryan
Copy link
Contributor

interesting, should be my starting point for next steps i guess

@aramgrigoryan
Copy link
Contributor

def enrich_proteins(graph):
    """Adds the InterPro annotations for proteins in the graph

    :param pybel.BELGraph graph: A BEL Graph
    """
    raise NotImplemented

is not implemented, so this is what you mean? here it should get the bel script file that we've generated and create a belgraph ?

@cthoyt
Copy link
Member Author

cthoyt commented Aug 30, 2017

In test-driven development it's common to make the method stub and have it raise not implemented. Check the corresponding unit tests to see how it should work (i already wrote them for you)

@aramgrigoryan
Copy link
Contributor

i don't understand what should be done here. can you show me an example?
basically i dont know the input and the output

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

No branches or pull requests

2 participants