Skip to content

Commit

Permalink
documented research per algorithm as docstrings per class for the alg…
Browse files Browse the repository at this point in the history
…orithms in master
  • Loading branch information
ntalluri committed Aug 23, 2023
1 parent 20160ca commit af6a590
Show file tree
Hide file tree
Showing 6 changed files with 58 additions and 3 deletions.
10 changes: 9 additions & 1 deletion src/domino.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,15 @@
ID_PREFIX = 'ENSG0'
ID_PREFIX_LEN = len(ID_PREFIX)


"""
Domino will construct a fully undirected graph from the provided input file
- in the algorithm, it uses nx.Graph()
Expected raw input format:
Interactor1 ppi Interactor2
- the expected raw input file should have node pairs in the 1st and 3rd columns, with a 'ppi' in the 2nd column
- it can include repeated and bidirectional edges
"""
class DOMINO(PRM):
required_inputs = ['network', 'active_genes']

Expand Down
10 changes: 10 additions & 0 deletions src/meo.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,16 @@ def write_properties(filename=Path('properties.txt'), edges=None, sources=None,
# Do not need csp.phase, csp.gen.file, or csp.sol.file because MAXCSP is not supported


"""
MEO can support partially directed graphs
Expected raw input format:
Interactor1 pp/pd Interactor2 Weight
- the expected raw input file should have node pairs in the 1st and 3rd columns, with a directionality in the 2nd column and the weight in the 4th column
- it use pp for undirected edges and pd for directed edges
- it cannot include repeated and bidirectional edges
- there is a chance MRO assumes that it should just be an undirected edge instead
"""
class MEO(PRM):
required_inputs = ['sources', 'targets', 'edges']

Expand Down
11 changes: 10 additions & 1 deletion src/mincostflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,16 @@

__all__ = ['MinCostFlow']


"""
MinCostFlow deals with fully directed graphs
- OR Tools MCF is designed for directed graphs
- when an edge (arc), it has a source and target node, so flow it only allowed to moced from source to the target
Expected raw input format:
Interactor1 Interactor2 Weight
- the expected raw input file should have node pairs in the 1st and 2nd columns, with the weight in the 3rd column
- it can include repeated and bidirectional edges
"""
class MinCostFlow (PRM):
required_inputs = ['sources', 'targets', 'edges']

Expand Down
10 changes: 10 additions & 0 deletions src/omicsintegrator1.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,17 @@ def write_conf(filename=Path('config.txt'), w=None, b=None, d=None, mu=None, noi
f.write('processes = 1\n')
f.write('threads = 1\n')

"""
Omics Integrator 1 will construct works with partially directed graphs
- it takes in the universal input directly
Expected raw input format:
Interactor1 Interactor2 Weight Direction
- the expected raw input file should have node pairs in the 1st and 2nd columns, with a weight in the 3rd column and directionality in the 4th column
- it can include repeated and bidirectional edges
- it uses 'U' for undirected edges and 'D' for directed edges
"""
class OmicsIntegrator1(PRM):
required_inputs = ['prizes', 'edges']

Expand Down
11 changes: 10 additions & 1 deletion src/omicsintegrator2.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,16 @@

__all__ = ['OmicsIntegrator2']


"""
Omics Integrator 2 will construct a fully undirected graph from the provided input file
- in the algorithm, it uses nx.Graph() objects, which are undirected
- uses a pcst_fast solver which supports undirected graphs
Expected raw input format:
Interactor1 Interactor2 Weight
- the expected raw input file should have node pairs in the 1st and 2nd columns, with a weight in the 3rd column
- it can include repeated and bidirectional edges
"""
class OmicsIntegrator2(PRM):
required_inputs = ['prizes', 'edges']

Expand Down
9 changes: 9 additions & 0 deletions src/pathlinker.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,15 @@

__all__ = ['PathLinker']

"""
Pathlinker will construct a fully directed graph from the provided input file
- an edge is represented with a head and tail node, which represents the direction of the interation between two nodes
Expected raw input format:
Interactor1 Interactor2 Weight
- the expected raw input file should have node pairs in the 1st and 2nd columns, with a weight in the 3rd column
- it can include repeated and bidirectional edges
"""
class PathLinker(PRM):
required_inputs = ['nodetypes', 'network']

Expand Down

0 comments on commit af6a590

Please sign in to comment.