From 2964db171a72eae88445202531dbd6b015dee0da Mon Sep 17 00:00:00 2001 From: ntalluri Date: Fri, 22 Dec 2023 12:22:20 -0800 Subject: [PATCH] almost done with adding header files --- docker-wrappers/Cytoscape/cytoscape_util.py | 4 +++- spras/allpairs.py | 4 +++- spras/analysis/graphspace.py | 8 ++++---- spras/analysis/ml.py | 7 +++++-- spras/analysis/summary.py | 13 +++++++++++-- spras/domino.py | 6 ++++-- spras/meo.py | 6 +++--- spras/mincostflow.py | 3 ++- spras/omicsintegrator1.py | 6 +++--- spras/omicsintegrator2.py | 3 ++- spras/pathlinker.py | 3 ++- ...egfr-omicsintegrator1-params-3THRXWW_pathway.txt | 1 + ...egfr-omicsintegrator1-params-5QH767V_pathway.txt | 1 + ...egfr-omicsintegrator1-params-ITO5EQS_pathway.txt | 1 + .../tps-egfr-pathlinker-params-7S4SLU6_pathway.txt | 1 + .../tps-egfr-pathlinker-params-TCEMRS7_pathway.txt | 1 + .../example/data0-meo-params-GKEDDFZ_pathway.txt | 1 + ...ata0-omicsintegrator1-params-RQCQ4YN_pathway.txt | 1 + ...ata0-omicsintegrator1-params-WY4V42C_pathway.txt | 1 + ...ata0-omicsintegrator2-params-IV3IPCJ_pathway.txt | 1 + .../data0-pathlinker-params-6SWY7JS_pathway.txt | 1 + .../data0-pathlinker-params-VQL7BDZ_pathway.txt | 1 + .../example/data1-meo-params-GKEDDFZ_pathway.txt | 1 + ...ata1-omicsintegrator1-params-JAZWLAK_pathway.txt | 1 + ...ata1-omicsintegrator1-params-PU62FNV_pathway.txt | 1 + ...ata1-omicsintegrator2-params-IV3IPCJ_pathway.txt | 1 + .../data1-pathlinker-params-6SWY7JS_pathway.txt | 1 + .../data1-pathlinker-params-VQL7BDZ_pathway.txt | 1 + test/analysis/input/standardized-ranked.txt | 1 + test/analysis/input/toy/network1.txt | 1 + test/analysis/input/toy/network2.txt | 1 + test/analysis/input/toy/network3.txt | 1 + test/analysis/input/toy/network4.txt | 1 + test/analysis/input/toy/network5.txt | 1 + test/analysis/output/example_summary.txt | 6 ------ test/ml/input/test-data-longName/longName.txt | 1 + test/ml/input/test-data-longName2/longName2.txt | 1 + test/ml/input/test-data-s1/s1.txt | 1 + test/ml/input/test-data-s2/s2.txt | 1 + test/ml/input/test-data-s3/s3.txt | 1 + test/ml/input/test-data-spaces/spaces.txt | 1 + .../input/test-mixed-direction/mixed-direction.txt | 1 + .../expected/allpairs-pathway-expected.txt | 1 + .../expected/domino-pathway-expected.txt | 1 + .../parse-outputs/expected/meo-pathway-expected.txt | 1 + .../expected/mincostflow-pathway-expected.txt | 1 + .../expected/omicsintegrator1-pathway-expected.txt | 1 + .../expected/omicsintegrator2-pathway-expected.txt | 1 + .../expected/pathlinker-pathway-expected.txt | 1 + 49 files changed, 79 insertions(+), 27 deletions(-) diff --git a/docker-wrappers/Cytoscape/cytoscape_util.py b/docker-wrappers/Cytoscape/cytoscape_util.py index dcf110f1..c8f47922 100644 --- a/docker-wrappers/Cytoscape/cytoscape_util.py +++ b/docker-wrappers/Cytoscape/cytoscape_util.py @@ -116,7 +116,9 @@ def load_pathways(pathways: List[str], output: str) -> None: suid = p4c.networks.import_network_from_tabular_file( file=path, column_type_list='s,t,x,ea', - delimiters='\t' + delimiters='\t', + first_row_as_column_names = True, + start_load_row = 2, ) p4c.networks.rename_network(name, network=suid) diff --git a/spras/allpairs.py b/spras/allpairs.py index 3de9029d..38f7f000 100644 --- a/spras/allpairs.py +++ b/spras/allpairs.py @@ -110,6 +110,8 @@ def parse_output(raw_pathway_file, standardized_pathway_file): @param standardized_pathway_file: the same pathway written in the universal format """ df = pd.read_csv(raw_pathway_file, sep='\t', header=None) + df['Rank'] = 1 # add a rank column of 1s since the edges are not ranked. df = reinsert_direction_col_undirected(df) - df.to_csv(standardized_pathway_file, header=False, index=False, sep='\t') + df.columns = ['Node1', 'Node2', 'Rank', 'Direction'] + df.to_csv(standardized_pathway_file, header=True, index=False, sep='\t') diff --git a/spras/analysis/graphspace.py b/spras/analysis/graphspace.py index ba87de6e..bee103f6 100644 --- a/spras/analysis/graphspace.py +++ b/spras/analysis/graphspace.py @@ -77,21 +77,21 @@ def load_graph(path: str) -> Tuple[Union[nx.Graph, nx.DiGraph], bool]: directed = False try: - pathways = pd.read_csv(path, sep="\t", header=None) + pathways = pd.read_csv(path, sep="\t", header=0) except pd.errors.EmptyDataError: print(f"The file {path} is empty.") return G, directed - pathways.columns = ["Interactor1", "Interactor2", "Rank", "Direction"] + mask_u = pathways['Direction'] == 'U' mask_d = pathways['Direction'] == 'D' pathways.drop(columns=["Direction"]) if mask_u.all(): - G = nx.from_pandas_edgelist(pathways, "Interactor1", "Interactor2", ["Rank"]) + G = nx.from_pandas_edgelist(pathways, "Node1", "Node2", ["Rank"]) directed = False elif mask_d.all(): - G = nx.from_pandas_edgelist(pathways, "Interactor1", "Interactor2", ["Rank"], create_using=nx.DiGraph()) + G = nx.from_pandas_edgelist(pathways, "Node1", "Node2", ["Rank"], create_using=nx.DiGraph()) directed = True else: print(f"{path} could not be visualized. GraphSpace does not support mixed direction type graphs currently") diff --git a/spras/analysis/ml.py b/spras/analysis/ml.py index 64260ad6..2c129873 100644 --- a/spras/analysis/ml.py +++ b/spras/analysis/ml.py @@ -44,7 +44,7 @@ def summarize_networks(file_paths: Iterable[Union[str, PathLike]]) -> pd.DataFra edges = [] for line in lines: parts = line.split('\t') - if len(parts) > 0: # in case of empty line in file + if len(parts) >= 4: # in case of empty line in file or line doesn't include all values node1 = parts[0] node2 = parts[1] direction = str(parts[3]).strip() @@ -55,7 +55,10 @@ def summarize_networks(file_paths: Iterable[Union[str, PathLike]]) -> pd.DataFra # node order does matter for directed edges edges.append(DIR_CONST.join([node1, node2])) else: - ValueError(f"direction is {direction}, rather than U or D") + if direction == 'Direction': # if reading the header + continue + else: + raise ValueError(f"direction is {direction}, rather than U or D") # getting the algorithm name p = PurePath(file) diff --git a/spras/analysis/summary.py b/spras/analysis/summary.py index 9b0d797d..d0bc9582 100644 --- a/spras/analysis/summary.py +++ b/spras/analysis/summary.py @@ -33,8 +33,17 @@ def summarize_networks(file_paths: Iterable[Path], node_table: pd.DataFrame) -> # Iterate through each network file path for file_path in sorted(file_paths): - # Load in the network - nw = nx.read_edgelist(file_path, data=(('weight', float), ('Direction',str))) + nw = None + # nw = nx.read_edgelist(file_path, data=(('weight', float), ('Direction',str))) + if os.path.getsize(file_path) == 0: + continue + else: + with open(file_path, 'r') as f: + # skip the header line + next(f) + # Load in the network + nw = nx.read_edgelist(f, data=(('weight', float), ('Direction', str))) + # Save the network name, number of nodes, number edges, and number of connected components nw_name = str(file_path) number_nodes = nw.number_of_nodes() diff --git a/spras/domino.py b/spras/domino.py index 53434e3f..4666bf83 100644 --- a/spras/domino.py +++ b/spras/domino.py @@ -205,8 +205,10 @@ def parse_output(raw_pathway_file, standardized_pathway_file): edges_df['source'] = edges_df['source'].apply(post_domino_id_transform) edges_df['target'] = edges_df['target'].apply(post_domino_id_transform) edges_df = reinsert_direction_col_undirected(edges_df) - - edges_df.to_csv(standardized_pathway_file, sep='\t', header=False, index=False) + edges_df.columns = ['Node1', 'Node2', 'Rank', 'Direction'] + edges_df.to_csv(standardized_pathway_file, sep='\t', header=True, index=False) + else: + edges_df.to_csv(standardized_pathway_file, sep='\t', header=None, index=False) def pre_domino_id_transform(node_id): diff --git a/spras/meo.py b/spras/meo.py index d9cf2f24..2d5d8741 100644 --- a/spras/meo.py +++ b/spras/meo.py @@ -188,6 +188,6 @@ def parse_output(raw_pathway_file, standardized_pathway_file): # Would need to load the paths output file to rank edges correctly df = add_rank_column(df) df = reinsert_direction_col_directed(df) - - df.to_csv(standardized_pathway_file, columns=['Source', 'Target', 'Rank', "Direction"], header=False, - index=False, sep='\t') + df.drop(columns=['Type', 'Oriented', 'Weight'], inplace = True) + df.columns = ['Node1', 'Node2', 'Rank', "Direction"] + df.to_csv(standardized_pathway_file, header=True, index=False, sep='\t') diff --git a/spras/mincostflow.py b/spras/mincostflow.py index 24ee9677..a1e18942 100644 --- a/spras/mincostflow.py +++ b/spras/mincostflow.py @@ -154,5 +154,6 @@ def parse_output(raw_pathway_file, standardized_pathway_file): # TODO update MinCostFlow version to support mixed graphs # Currently directed edges in the input will be converted to undirected edges in the output df = reinsert_direction_col_undirected(df) - df.to_csv(standardized_pathway_file, header=False, index=False, sep='\t') + df.columns = ['Node1', 'Node2', 'Rank', "Direction"] + df.to_csv(standardized_pathway_file, header=True, index=False, sep='\t') diff --git a/spras/omicsintegrator1.py b/spras/omicsintegrator1.py index 6e2c6807..bf619093 100644 --- a/spras/omicsintegrator1.py +++ b/spras/omicsintegrator1.py @@ -201,6 +201,6 @@ def parse_output(raw_pathway_file, standardized_pathway_file): df.columns = ["Edge1", "InteractionType", "Edge2"] df = add_rank_column(df) df = reinsert_direction_col_mixed(df, "InteractionType", "pd", "pp") - - df.to_csv(standardized_pathway_file, columns=['Edge1', 'Edge2', 'Rank', "Direction"], header=False, index=False, - sep='\t') + df.drop(columns=['InteractionType'], inplace = True) + df.columns = ['Node1', 'Node2', 'Rank', "Direction"] + df.to_csv(standardized_pathway_file, header=True, index=False, sep='\t') diff --git a/spras/omicsintegrator2.py b/spras/omicsintegrator2.py index 5099b8d9..1b953600 100644 --- a/spras/omicsintegrator2.py +++ b/spras/omicsintegrator2.py @@ -155,4 +155,5 @@ def parse_output(raw_pathway_file, standardized_pathway_file): df = df.take([0, 1], axis=1) df = add_rank_column(df) df = reinsert_direction_col_undirected(df) - df.to_csv(standardized_pathway_file, header=False, index=False, sep='\t') + df.columns = ['Node1', 'Node2', 'Rank', "Direction"] + df.to_csv(standardized_pathway_file, header=True, index=False, sep='\t') diff --git a/spras/pathlinker.py b/spras/pathlinker.py index 85b38fe9..0147dc40 100644 --- a/spras/pathlinker.py +++ b/spras/pathlinker.py @@ -140,4 +140,5 @@ def parse_output(raw_pathway_file, standardized_pathway_file): # What about multiple raw_pathway_files df = pd.read_csv(raw_pathway_file, sep='\t').take([0, 1, 2], axis=1) df = reinsert_direction_col_directed(df) - df.to_csv(standardized_pathway_file, header=False, index=False, sep='\t') + df.columns = ['Node1', 'Node2', 'Rank', "Direction"] + df.to_csv(standardized_pathway_file, header=True, index=False, sep='\t') diff --git a/test/analysis/input/egfr/tps-egfr-omicsintegrator1-params-3THRXWW_pathway.txt b/test/analysis/input/egfr/tps-egfr-omicsintegrator1-params-3THRXWW_pathway.txt index 03571eae..44944b37 100644 --- a/test/analysis/input/egfr/tps-egfr-omicsintegrator1-params-3THRXWW_pathway.txt +++ b/test/analysis/input/egfr/tps-egfr-omicsintegrator1-params-3THRXWW_pathway.txt @@ -1,3 +1,4 @@ +Node1 Node2 Rank Direction ABI1_HUMAN MK01_HUMAN 1 U CBLB_HUMAN EGFR_HUMAN 1 U CBL_HUMAN CD2AP_HUMAN 1 U diff --git a/test/analysis/input/egfr/tps-egfr-omicsintegrator1-params-5QH767V_pathway.txt b/test/analysis/input/egfr/tps-egfr-omicsintegrator1-params-5QH767V_pathway.txt index 30d107b0..b2033b57 100644 --- a/test/analysis/input/egfr/tps-egfr-omicsintegrator1-params-5QH767V_pathway.txt +++ b/test/analysis/input/egfr/tps-egfr-omicsintegrator1-params-5QH767V_pathway.txt @@ -1,3 +1,4 @@ +Node1 Node2 Rank Direction ABI1_HUMAN MK01_HUMAN 1 U CBLB_HUMAN EGFR_HUMAN 1 U CBL_HUMAN CD2AP_HUMAN 1 U diff --git a/test/analysis/input/egfr/tps-egfr-omicsintegrator1-params-ITO5EQS_pathway.txt b/test/analysis/input/egfr/tps-egfr-omicsintegrator1-params-ITO5EQS_pathway.txt index 065ef6f9..e0adf2fc 100644 --- a/test/analysis/input/egfr/tps-egfr-omicsintegrator1-params-ITO5EQS_pathway.txt +++ b/test/analysis/input/egfr/tps-egfr-omicsintegrator1-params-ITO5EQS_pathway.txt @@ -1,3 +1,4 @@ +Node1 Node2 Rank Direction ABI1_HUMAN MK01_HUMAN 1 U CBL_HUMAN CD2AP_HUMAN 1 U CBL_HUMAN CRKL_HUMAN 1 U diff --git a/test/analysis/input/egfr/tps-egfr-pathlinker-params-7S4SLU6_pathway.txt b/test/analysis/input/egfr/tps-egfr-pathlinker-params-7S4SLU6_pathway.txt index 899147f8..bc9dfc85 100644 --- a/test/analysis/input/egfr/tps-egfr-pathlinker-params-7S4SLU6_pathway.txt +++ b/test/analysis/input/egfr/tps-egfr-pathlinker-params-7S4SLU6_pathway.txt @@ -1,3 +1,4 @@ +Node1 Node2 Rank Direction EGF_HUMAN EGFR_HUMAN 1 U EGF_HUMAN S10A4_HUMAN 2 U S10A4_HUMAN MYH9_HUMAN 2 U diff --git a/test/analysis/input/egfr/tps-egfr-pathlinker-params-TCEMRS7_pathway.txt b/test/analysis/input/egfr/tps-egfr-pathlinker-params-TCEMRS7_pathway.txt index 3b1ddef5..a1738b00 100644 --- a/test/analysis/input/egfr/tps-egfr-pathlinker-params-TCEMRS7_pathway.txt +++ b/test/analysis/input/egfr/tps-egfr-pathlinker-params-TCEMRS7_pathway.txt @@ -1,3 +1,4 @@ +Node1 Node2 Rank Direction EGF_HUMAN EGFR_HUMAN 1 U EGF_HUMAN S10A4_HUMAN 2 U S10A4_HUMAN MYH9_HUMAN 2 U diff --git a/test/analysis/input/example/data0-meo-params-GKEDDFZ_pathway.txt b/test/analysis/input/example/data0-meo-params-GKEDDFZ_pathway.txt index 9d65620f..5547a49c 100644 --- a/test/analysis/input/example/data0-meo-params-GKEDDFZ_pathway.txt +++ b/test/analysis/input/example/data0-meo-params-GKEDDFZ_pathway.txt @@ -1,2 +1,3 @@ +Node1 Node2 Rank Direction A B 1 D B C 1 D diff --git a/test/analysis/input/example/data0-omicsintegrator1-params-RQCQ4YN_pathway.txt b/test/analysis/input/example/data0-omicsintegrator1-params-RQCQ4YN_pathway.txt index e2fd8d57..21768464 100644 --- a/test/analysis/input/example/data0-omicsintegrator1-params-RQCQ4YN_pathway.txt +++ b/test/analysis/input/example/data0-omicsintegrator1-params-RQCQ4YN_pathway.txt @@ -1,2 +1,3 @@ +Node1 Node2 Rank Direction A B 1 U B C 1 U diff --git a/test/analysis/input/example/data0-omicsintegrator1-params-WY4V42C_pathway.txt b/test/analysis/input/example/data0-omicsintegrator1-params-WY4V42C_pathway.txt index e2fd8d57..21768464 100644 --- a/test/analysis/input/example/data0-omicsintegrator1-params-WY4V42C_pathway.txt +++ b/test/analysis/input/example/data0-omicsintegrator1-params-WY4V42C_pathway.txt @@ -1,2 +1,3 @@ +Node1 Node2 Rank Direction A B 1 U B C 1 U diff --git a/test/analysis/input/example/data0-omicsintegrator2-params-IV3IPCJ_pathway.txt b/test/analysis/input/example/data0-omicsintegrator2-params-IV3IPCJ_pathway.txt index 65f6f221..e34eeaff 100644 --- a/test/analysis/input/example/data0-omicsintegrator2-params-IV3IPCJ_pathway.txt +++ b/test/analysis/input/example/data0-omicsintegrator2-params-IV3IPCJ_pathway.txt @@ -1,2 +1,3 @@ +Node1 Node2 Rank Direction B A 1 U B C 1 U diff --git a/test/analysis/input/example/data0-pathlinker-params-6SWY7JS_pathway.txt b/test/analysis/input/example/data0-pathlinker-params-6SWY7JS_pathway.txt index 9d65620f..5547a49c 100644 --- a/test/analysis/input/example/data0-pathlinker-params-6SWY7JS_pathway.txt +++ b/test/analysis/input/example/data0-pathlinker-params-6SWY7JS_pathway.txt @@ -1,2 +1,3 @@ +Node1 Node2 Rank Direction A B 1 D B C 1 D diff --git a/test/analysis/input/example/data0-pathlinker-params-VQL7BDZ_pathway.txt b/test/analysis/input/example/data0-pathlinker-params-VQL7BDZ_pathway.txt index 9d65620f..5547a49c 100644 --- a/test/analysis/input/example/data0-pathlinker-params-VQL7BDZ_pathway.txt +++ b/test/analysis/input/example/data0-pathlinker-params-VQL7BDZ_pathway.txt @@ -1,2 +1,3 @@ +Node1 Node2 Rank Direction A B 1 D B C 1 D diff --git a/test/analysis/input/example/data1-meo-params-GKEDDFZ_pathway.txt b/test/analysis/input/example/data1-meo-params-GKEDDFZ_pathway.txt index 71ed6ccf..a87a0437 100644 --- a/test/analysis/input/example/data1-meo-params-GKEDDFZ_pathway.txt +++ b/test/analysis/input/example/data1-meo-params-GKEDDFZ_pathway.txt @@ -1,3 +1,4 @@ +Node1 Node2 Rank Direction A B 1 D B C 1 D A D 1 D diff --git a/test/analysis/input/example/data1-omicsintegrator1-params-JAZWLAK_pathway.txt b/test/analysis/input/example/data1-omicsintegrator1-params-JAZWLAK_pathway.txt index afbe030d..885a8574 100644 --- a/test/analysis/input/example/data1-omicsintegrator1-params-JAZWLAK_pathway.txt +++ b/test/analysis/input/example/data1-omicsintegrator1-params-JAZWLAK_pathway.txt @@ -1,3 +1,4 @@ +Node1 Node2 Rank Direction A D 1 U G H 1 U G I 1 U diff --git a/test/analysis/input/example/data1-omicsintegrator1-params-PU62FNV_pathway.txt b/test/analysis/input/example/data1-omicsintegrator1-params-PU62FNV_pathway.txt index afbe030d..885a8574 100644 --- a/test/analysis/input/example/data1-omicsintegrator1-params-PU62FNV_pathway.txt +++ b/test/analysis/input/example/data1-omicsintegrator1-params-PU62FNV_pathway.txt @@ -1,3 +1,4 @@ +Node1 Node2 Rank Direction A D 1 U G H 1 U G I 1 U diff --git a/test/analysis/input/example/data1-omicsintegrator2-params-IV3IPCJ_pathway.txt b/test/analysis/input/example/data1-omicsintegrator2-params-IV3IPCJ_pathway.txt index eddad79c..069481df 100644 --- a/test/analysis/input/example/data1-omicsintegrator2-params-IV3IPCJ_pathway.txt +++ b/test/analysis/input/example/data1-omicsintegrator2-params-IV3IPCJ_pathway.txt @@ -1,3 +1,4 @@ +Node1 Node2 Rank Direction C D 1 U C F 1 U A D 1 U diff --git a/test/analysis/input/example/data1-pathlinker-params-6SWY7JS_pathway.txt b/test/analysis/input/example/data1-pathlinker-params-6SWY7JS_pathway.txt index 92b60b6e..ec070652 100644 --- a/test/analysis/input/example/data1-pathlinker-params-6SWY7JS_pathway.txt +++ b/test/analysis/input/example/data1-pathlinker-params-6SWY7JS_pathway.txt @@ -1,3 +1,4 @@ +Node1 Node2 Rank Direction A B 1 D B C 1 D A D 2 D diff --git a/test/analysis/input/example/data1-pathlinker-params-VQL7BDZ_pathway.txt b/test/analysis/input/example/data1-pathlinker-params-VQL7BDZ_pathway.txt index 92b60b6e..ec070652 100644 --- a/test/analysis/input/example/data1-pathlinker-params-VQL7BDZ_pathway.txt +++ b/test/analysis/input/example/data1-pathlinker-params-VQL7BDZ_pathway.txt @@ -1,3 +1,4 @@ +Node1 Node2 Rank Direction A B 1 D B C 1 D A D 2 D diff --git a/test/analysis/input/standardized-ranked.txt b/test/analysis/input/standardized-ranked.txt index c432c386..27f8222f 100644 --- a/test/analysis/input/standardized-ranked.txt +++ b/test/analysis/input/standardized-ranked.txt @@ -1,3 +1,4 @@ +Node1 Node2 Rank Direction A B 1 U A C 3 U C D 5 U diff --git a/test/analysis/input/toy/network1.txt b/test/analysis/input/toy/network1.txt index 21847821..bd5bd343 100644 --- a/test/analysis/input/toy/network1.txt +++ b/test/analysis/input/toy/network1.txt @@ -1,3 +1,4 @@ +Node1 Node2 Rank Direction A B 1 U C D 1 U E F 1 U diff --git a/test/analysis/input/toy/network2.txt b/test/analysis/input/toy/network2.txt index f7811bc4..7506195d 100644 --- a/test/analysis/input/toy/network2.txt +++ b/test/analysis/input/toy/network2.txt @@ -1,3 +1,4 @@ +Node1 Node2 Rank Direction A B 1 U B C 1 U C D 1 U diff --git a/test/analysis/input/toy/network3.txt b/test/analysis/input/toy/network3.txt index cbf42fb5..eaf05c07 100644 --- a/test/analysis/input/toy/network3.txt +++ b/test/analysis/input/toy/network3.txt @@ -1,3 +1,4 @@ +Node1 Node2 Rank Direction A B 1 U A C 1 U A D 1 U diff --git a/test/analysis/input/toy/network4.txt b/test/analysis/input/toy/network4.txt index d711ec1a..61ed9a4b 100644 --- a/test/analysis/input/toy/network4.txt +++ b/test/analysis/input/toy/network4.txt @@ -1,3 +1,4 @@ +Node1 Node2 Rank Direction A B 1 U B C 1 U D E 1 U diff --git a/test/analysis/input/toy/network5.txt b/test/analysis/input/toy/network5.txt index 5aaf5c0b..3d0eaf8c 100644 --- a/test/analysis/input/toy/network5.txt +++ b/test/analysis/input/toy/network5.txt @@ -1,3 +1,4 @@ +Node1 Node2 Rank Direction A B 1 U B C 1 U C D 1 U diff --git a/test/analysis/output/example_summary.txt b/test/analysis/output/example_summary.txt index f34497a4..fde30449 100644 --- a/test/analysis/output/example_summary.txt +++ b/test/analysis/output/example_summary.txt @@ -1,19 +1,13 @@ Name Number of nodes Number of undirected edges Number of connected components Nodes in sources Nodes in targets test/analysis/input/example/data0-meo-params-GKEDDFZ_pathway.txt 3 2 1 1 1 -test/analysis/input/example/data0-omicsintegrator1-params-JAZWLAK_pathway.txt 0 0 0 0 0 -test/analysis/input/example/data0-omicsintegrator1-params-PU62FNV_pathway.txt 0 0 0 0 0 test/analysis/input/example/data0-omicsintegrator1-params-RQCQ4YN_pathway.txt 3 2 1 1 1 test/analysis/input/example/data0-omicsintegrator1-params-WY4V42C_pathway.txt 3 2 1 1 1 -test/analysis/input/example/data0-omicsintegrator2-params-EHHWPMD_pathway.txt 0 0 0 0 0 test/analysis/input/example/data0-omicsintegrator2-params-IV3IPCJ_pathway.txt 3 2 1 1 1 test/analysis/input/example/data0-pathlinker-params-6SWY7JS_pathway.txt 3 2 1 1 1 test/analysis/input/example/data0-pathlinker-params-VQL7BDZ_pathway.txt 3 2 1 1 1 test/analysis/input/example/data1-meo-params-GKEDDFZ_pathway.txt 4 4 1 1 2 test/analysis/input/example/data1-omicsintegrator1-params-JAZWLAK_pathway.txt 5 3 2 1 3 test/analysis/input/example/data1-omicsintegrator1-params-PU62FNV_pathway.txt 5 3 2 1 3 -test/analysis/input/example/data1-omicsintegrator1-params-RQCQ4YN_pathway.txt 0 0 0 0 0 -test/analysis/input/example/data1-omicsintegrator1-params-WY4V42C_pathway.txt 0 0 0 0 0 -test/analysis/input/example/data1-omicsintegrator2-params-EHHWPMD_pathway.txt 0 0 0 0 0 test/analysis/input/example/data1-omicsintegrator2-params-IV3IPCJ_pathway.txt 7 6 1 1 4 test/analysis/input/example/data1-pathlinker-params-6SWY7JS_pathway.txt 4 3 1 1 2 test/analysis/input/example/data1-pathlinker-params-VQL7BDZ_pathway.txt 4 3 1 1 2 diff --git a/test/ml/input/test-data-longName/longName.txt b/test/ml/input/test-data-longName/longName.txt index aabf41b2..7e120dff 100644 --- a/test/ml/input/test-data-longName/longName.txt +++ b/test/ml/input/test-data-longName/longName.txt @@ -1,3 +1,4 @@ +Node1 Node2 Rank Direction node1 node2 1 U node1 node3 1 U node4 node5 1 U diff --git a/test/ml/input/test-data-longName2/longName2.txt b/test/ml/input/test-data-longName2/longName2.txt index 8765175f..35bf0c2e 100644 --- a/test/ml/input/test-data-longName2/longName2.txt +++ b/test/ml/input/test-data-longName2/longName2.txt @@ -1,3 +1,4 @@ +Node1 Node2 Rank Direction node3 node2 1 U node1 node3 1 U node5 node4 1 U diff --git a/test/ml/input/test-data-s1/s1.txt b/test/ml/input/test-data-s1/s1.txt index 031f4142..a8a52914 100644 --- a/test/ml/input/test-data-s1/s1.txt +++ b/test/ml/input/test-data-s1/s1.txt @@ -1,3 +1,4 @@ +Node1 Node2 Rank Direction A B 1 U C D 1 U E F 1 U \ No newline at end of file diff --git a/test/ml/input/test-data-s2/s2.txt b/test/ml/input/test-data-s2/s2.txt index 680bf369..d4e9860b 100644 --- a/test/ml/input/test-data-s2/s2.txt +++ b/test/ml/input/test-data-s2/s2.txt @@ -1,3 +1,4 @@ +Node1 Node2 Rank Direction A B 1 U C D 1 U E F 1 U diff --git a/test/ml/input/test-data-s3/s3.txt b/test/ml/input/test-data-s3/s3.txt index d06960f9..6884cfe8 100644 --- a/test/ml/input/test-data-s3/s3.txt +++ b/test/ml/input/test-data-s3/s3.txt @@ -1,3 +1,4 @@ +Node1 Node2 Rank Direction L M 1 U M N 1 U O P 1 U diff --git a/test/ml/input/test-data-spaces/spaces.txt b/test/ml/input/test-data-spaces/spaces.txt index 0860d779..3565af81 100644 --- a/test/ml/input/test-data-spaces/spaces.txt +++ b/test/ml/input/test-data-spaces/spaces.txt @@ -1,3 +1,4 @@ +Node1 Node2 Rank Direction L M 1 U O P 1 U nodes with spaces in name 1 U \ No newline at end of file diff --git a/test/ml/input/test-mixed-direction/mixed-direction.txt b/test/ml/input/test-mixed-direction/mixed-direction.txt index 6463ab3b..f77061a1 100644 --- a/test/ml/input/test-mixed-direction/mixed-direction.txt +++ b/test/ml/input/test-mixed-direction/mixed-direction.txt @@ -1,3 +1,4 @@ +Node1 Node2 Rank Direction A B 1 D B A 1 D C D 1 U diff --git a/test/parse-outputs/expected/allpairs-pathway-expected.txt b/test/parse-outputs/expected/allpairs-pathway-expected.txt index ee3c198b..3af52bc6 100644 --- a/test/parse-outputs/expected/allpairs-pathway-expected.txt +++ b/test/parse-outputs/expected/allpairs-pathway-expected.txt @@ -1,3 +1,4 @@ +Node1 Node2 Rank Direction S1 A 1 U S1 B 1 U A E 1 U diff --git a/test/parse-outputs/expected/domino-pathway-expected.txt b/test/parse-outputs/expected/domino-pathway-expected.txt index 3fb1c13a..074f1b20 100644 --- a/test/parse-outputs/expected/domino-pathway-expected.txt +++ b/test/parse-outputs/expected/domino-pathway-expected.txt @@ -1,3 +1,4 @@ +Node1 Node2 Rank Direction ENSG00000122691 ENSG00000138757 1 U ENSG00000122691 ENSG00000109320 1 U ENSG00000134954 ENSG00000077150 1 U diff --git a/test/parse-outputs/expected/meo-pathway-expected.txt b/test/parse-outputs/expected/meo-pathway-expected.txt index 1971d419..6515013f 100644 --- a/test/parse-outputs/expected/meo-pathway-expected.txt +++ b/test/parse-outputs/expected/meo-pathway-expected.txt @@ -1,2 +1,3 @@ +Node1 Node2 Rank Direction GENEA GENEC 1 D GENEC GENEB 1 D diff --git a/test/parse-outputs/expected/mincostflow-pathway-expected.txt b/test/parse-outputs/expected/mincostflow-pathway-expected.txt index cd60214e..b25d172b 100644 --- a/test/parse-outputs/expected/mincostflow-pathway-expected.txt +++ b/test/parse-outputs/expected/mincostflow-pathway-expected.txt @@ -1,2 +1,3 @@ +Node1 Node2 Rank Direction B A 1 U D B 1 U diff --git a/test/parse-outputs/expected/omicsintegrator1-pathway-expected.txt b/test/parse-outputs/expected/omicsintegrator1-pathway-expected.txt index 16f30549..f808bc3a 100644 --- a/test/parse-outputs/expected/omicsintegrator1-pathway-expected.txt +++ b/test/parse-outputs/expected/omicsintegrator1-pathway-expected.txt @@ -1,2 +1,3 @@ +Node1 Node2 Rank Direction A C 1 D C D 1 U diff --git a/test/parse-outputs/expected/omicsintegrator2-pathway-expected.txt b/test/parse-outputs/expected/omicsintegrator2-pathway-expected.txt index 65f6f221..e34eeaff 100644 --- a/test/parse-outputs/expected/omicsintegrator2-pathway-expected.txt +++ b/test/parse-outputs/expected/omicsintegrator2-pathway-expected.txt @@ -1,2 +1,3 @@ +Node1 Node2 Rank Direction B A 1 U B C 1 U diff --git a/test/parse-outputs/expected/pathlinker-pathway-expected.txt b/test/parse-outputs/expected/pathlinker-pathway-expected.txt index 9edabc0c..e490cd91 100644 --- a/test/parse-outputs/expected/pathlinker-pathway-expected.txt +++ b/test/parse-outputs/expected/pathlinker-pathway-expected.txt @@ -1,3 +1,4 @@ +Node1 Node2 Rank Direction S2 T3 1 D A E 2 D S1 A 2 D