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

Dummy node logic #187

Merged
merged 23 commits into from
Nov 23, 2024
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions config/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ container_registry:
algorithms:
- name: "pathlinker"
params:
include: true
sumedhars marked this conversation as resolved.
Show resolved Hide resolved
include: false
run1:
k: range(100,201,100)

Expand All @@ -56,10 +56,11 @@ algorithms:
b: [5, 6]
w: np.linspace(0,5,2)
d: [10]
dummy_mode: ["terminals"]
sumedhars marked this conversation as resolved.
Show resolved Hide resolved

- name: "omicsintegrator2"
params:
include: true
include: false
run1:
b: [4]
g: [0]
Expand All @@ -69,26 +70,26 @@ algorithms:

- name: "meo"
params:
include: true
include: false
run1:
max_path_length: [3]
local_search: ["Yes"]
rand_restarts: [10]

- name: "mincostflow"
params:
include: true
include: false
run1:
flow: [1] # The flow must be an int
capacity: [1]

- name: "allpairs"
params:
include: true
include: false

- name: "domino"
params:
include: true
include: false
run1:
slice_threshold: [0.3]
module_threshold: [0.05]
Expand All @@ -101,6 +102,7 @@ datasets:
-
# Labels can only contain letters, numbers, or underscores
label: data0
# To run OmicsIntegrator1 with dummy nodes, add the dummy.txt file to node_files
ntalluri marked this conversation as resolved.
Show resolved Hide resolved
node_files: ["node-prizes.txt", "sources.txt", "targets.txt"]
agitter marked this conversation as resolved.
Show resolved Hide resolved
# DataLoader.py can currently only load a single edge file, which is the primary network
edge_files: ["network.txt"]
Expand Down Expand Up @@ -173,4 +175,4 @@ analysis:
# 'euclidean', 'manhattan', 'cosine'
metric: 'euclidean'
evaluation:
include: true
include: true
25 changes: 25 additions & 0 deletions input/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,31 @@ C 2.5 True True
D 1.9 True True True
```

##### OmicsIntegrator1: Dummy Nodes
There are 4 dummy mode possibilities:
1. terminals -> connect the dummy node to all nodes that have been assigned prizes
2. all -> connect the dummy node to all nodes in the interactome i.e. full set of nodes in graph
3. others -> connect the dummy node to all nodes that are not terminal nodes i.e. nodes w/o prizes
4. file -> custom nodes - connect the dummy node to a specific list of nodes provided in a file
To support the `file` dummy node logic as part of OmicsIntegrator1, you can either add a seperate `dummy.txt` file (and add this to the `node_files` argument in `config.yaml `) or add a `dummy` column node attribute to a file that contains `NODEID`, `prize`, `source`, etc.
sumedhars marked this conversation as resolved.
Show resolved Hide resolved

If adding a seperate `dummy.txt` file:
Make a file with the name `dummy.txt` and list the dummy nodes, each seperated by a new line. Example:
```
A
B
C
```
sumedhars marked this conversation as resolved.
Show resolved Hide resolved

If adding the `dummy` column node attribute, then add the dummy column and specify boolean values for the `dummy` attribute:
```
NODEID prize sources targets dummy
A 1.0 True True True
B 3.3 True True
C 2.5 True True
D 1.9 True True True
```
sumedhars marked this conversation as resolved.
Show resolved Hide resolved

A secondary format provides only a list of node identifiers and uses the filename as the node attribute, as in the example `sources.txt`.
This format may be deprecated.

Expand Down
1 change: 1 addition & 0 deletions input/dummy.txt
sumedhars marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
A
Loading
Loading