Skip to content

Commit 77f6d9a

Browse files
committed
Add descriptions for kegg and mustard
1 parent 613fb2e commit 77f6d9a

File tree

2 files changed

+40
-0
lines changed

2 files changed

+40
-0
lines changed

meteor/data/ko_list_v116.feather

2.47 MB
Binary file not shown.

meteor/merging.py

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -428,5 +428,45 @@ def execute(self) -> None:
428428
sep="\t",
429429
index=False,
430430
)
431+
elif my_pattern == "mustard_as_genes_sum":
432+
mustard_annotation_path = Path(
433+
str(
434+
importlib.resources.files("meteor")
435+
/ "data/category_pcm.feather"
436+
)
437+
)
438+
mustard_annotation = self.load_data(mustard_annotation_path)
439+
mustard_annotation = mustard_annotation[
440+
mustard_annotation["ARD"].isin(filtered_df["annotation"])
441+
]
442+
mustard_annotation[
443+
[
444+
"ARD",
445+
"Antimicrobial"]
446+
].to_csv(
447+
Path(f"{output_name}_antimicrobial.tsv"),
448+
sep="\t",
449+
index=False,
450+
)
451+
elif my_pattern == "kegg_as_genes_sum":
452+
kegg_annotation_path = Path(
453+
str(
454+
importlib.resources.files("meteor")
455+
/ "data/ko_list_v116.feather"
456+
)
457+
)
458+
kegg_annotation = self.load_data(kegg_annotation_path)
459+
kegg_annotation = kegg_annotation[
460+
kegg_annotation["knum"].isin(filtered_df["annotation"])
461+
]
462+
kegg_annotation[
463+
[
464+
"knum",
465+
"definition"]
466+
].to_csv(
467+
Path(f"{output_name}_description.tsv"),
468+
sep="\t",
469+
index=False,
470+
)
431471
filtered_df.to_csv(output_name.with_suffix(".tsv"), sep="\t", index=False)
432472
logging.info("Data saved as %s", output_name)

0 commit comments

Comments
 (0)