Skip to content

Commit

Permalink
Merge pull request #5 from Knowledge-Graph-Hub/clean-up
Browse files Browse the repository at this point in the history
Removed commented code
  • Loading branch information
hrshdhgd authored Aug 26, 2024
2 parents d92a2c0 + 0168ce0 commit fe9ff13
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 45 deletions.
37 changes: 0 additions & 37 deletions kg_microbe_merge/merge.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,40 +101,3 @@ def duckdb_merge(

# Tarball all files in a directory
tarball_files_in_dir(MERGED_DATA_DIR, "merged_kg")


# def duckdb_merge(
# base_kg_nodes_file, subset_kg_nodes_file, base_kg_edges_file, subset_kg_edges_file
# ):

# # Connect to DuckDB
# con = duckdb.connect()
# Merge nodes
# duckdb_prepare_tables(
# con,
# base_kg_nodes_file,
# subset_kg_nodes_file,
# BASE_NODES_TABLE_NAME,
# SUBSET_NODES_TABLE_NAME,
# NODES_COLUMNS,
# )
# merge_kg_nodes,duplicate_nodes = merge_kg_tables(
# con, NODES_COLUMNS, BASE_NODES_TABLE_NAME, SUBSET_NODES_TABLE_NAME, "nodes"
# )
# write_file(con, NODES_COLUMNS, "merge_kg_nodes.tsv", merge_kg_nodes)
# write_file(con, NODES_COLUMNS, "duplicate_kg_nodes.tsv", duplicate_nodes)

# # Merge edges
# duckdb_prepare_tables(
# con,
# base_kg_edges_file,
# subset_kg_edges_file,
# BASE_EDGES_TABLE_NAME,
# SUBSET_EDGES_TABLE_NAME,
# EDGES_COLUMNS,
# )
# merge_kg_edges, duplicate_edges = merge_kg_tables(
# con, EDGES_COLUMNS, BASE_EDGES_TABLE_NAME, SUBSET_EDGES_TABLE_NAME, "edges"
# )
# write_file(con, EDGES_COLUMNS, "merge_kg_edges.tsv", merge_kg_edges)
# write_file(con, EDGES_COLUMNS, "duplicate_kg_edges.tsv", duplicate_edges)
8 changes: 0 additions & 8 deletions kg_microbe_merge/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,6 @@ def download(*args, **kwargs) -> None:
@click.option("yaml", "-y", type=click.Path(exists=True), required=False)
@click.option("processes", "-p", default=1, type=int)
@click.option("--merge-tool", "-m", default="kgx", type=click.Choice(["kgx", "duckdb"]))
# @click.option("base_nodes", "-base-n", type=click.Path(exists=True), required=False)
# @click.option("base_edges", "-base-e", type=click.Path(exists=True), required=False)
# @click.option("subset_nodes", "-subset-n", type=click.Path(exists=True), required=False)
# @click.option("subset_edges", "-subset-e", type=click.Path(exists=True), required=False)
@click.option("--data-dir", "-d", type=click.Path(exists=True), default=RAW_DATA_DIR)
@click.option("--subset-transforms", "-s", multiple=True)
@click.option("--nodes-batch-size", "-n", type=int, default=100000)
Expand All @@ -109,10 +105,6 @@ def merge(
subset_transforms: tuple,
nodes_batch_size: int,
edges_batch_size: int,
# base_nodes: str,
# base_edges: str,
# subset_nodes: str,
# subset_edges: str,
) -> None:
"""
Use KGX to load subgraphs to create a merged graph.
Expand Down

0 comments on commit fe9ff13

Please sign in to comment.