diff --git a/kg_microbe_merge/merge.py b/kg_microbe_merge/merge.py index 7ad2dea..3610ead 100644 --- a/kg_microbe_merge/merge.py +++ b/kg_microbe_merge/merge.py @@ -60,14 +60,13 @@ def duckdb_merge( Path(file_path) for file_path in nodes_files_path if "ontologies" in str(file_path) ] for file_path in ontology_nodes_paths: - if file_path.suffix == ".tsv": - with file_path.open(newline="") as tsvfile: - reader = csv.DictReader(tsvfile, delimiter="\t") - for row in reader: - provided_by_value = row.get("provided_by") - if provided_by_value: - priority_sources.append(provided_by_value) - break # We only need the value from one row + with file_path.open(newline="") as tsvfile: + reader = csv.DictReader(tsvfile, delimiter="\t") + for row in reader: + provided_by_value = row.get("provided_by") + if provided_by_value: + priority_sources.append(provided_by_value) + break # We only need the value from one row # Merge nodes duckdb_nodes_merge(nodes_files_path, merge_nodes_output_path, priority_sources)