diff --git a/meteor/merging.py b/meteor/merging.py index d5b1b05..49dad93 100644 --- a/meteor/merging.py +++ b/meteor/merging.py @@ -319,7 +319,11 @@ def execute(self) -> None: "modules_completeness": ["msp_name", "mod_id"], "modules": ["mod_id"], "mustard_as_genes_sum": ["annotation"], + "resfinder_as_genes_sum": ["annotation"], + "resfinderfg_as_genes_sum": ["annotation"], "mustard_as_msp_sum": ["annotation"], + "resfinder_as_msp_sum": ["annotation"], + "resfinderfg_as_msp_sum": ["annotation"], "dbcan_as_genes_sum": ["annotation"], "dbcan_as_msp_sum": ["annotation"], "kegg_as_genes_sum": ["annotation"], diff --git a/meteor/profiler.py b/meteor/profiler.py index 01a89f5..0d8d0bb 100644 --- a/meteor/profiler.py +++ b/meteor/profiler.py @@ -155,7 +155,15 @@ def __post_init__(self): # Get functional db filenames if self.database_type == "complete": self.db_filenames = {} - for db in ["kegg", "mustard", "dbcan", "eggnog", "tigrfam"]: + for db in [ + "kegg", + "mustard", + "dbcan", + "eggnog", + "tigrfam", + "resfinder", + "resfinderfg", + ]: self.db_filenames[db] = ( self.meteor.ref_dir / self.ref_config["reference_file"]["database_dir"] @@ -646,8 +654,14 @@ def execute(self) -> None: ) # Part 3: FUNCTIONAL PROFILING if self.database_type == "complete": - single_fun_db = ["mustard", "kegg", "dbcan"] - single_fun_by_msp_db = ["mustard", "kegg", "dbcan"] + single_fun_db = ["mustard", "kegg", "dbcan", "resfinder", "resfinderfg"] + single_fun_by_msp_db = [ + "mustard", + "kegg", + "dbcan", + "resfinder", + "resfinderfg", + ] for db, db_filename in self.db_filenames.items(): # By sum of genes if db in single_fun_db: diff --git a/meteor/tests/test_merging/profiles/sample1/sample1_resfinder_as_genes_sum.tsv.xz b/meteor/tests/test_merging/profiles/sample1/sample1_resfinder_as_genes_sum.tsv.xz new file mode 100644 index 0000000..63a66de Binary files /dev/null and b/meteor/tests/test_merging/profiles/sample1/sample1_resfinder_as_genes_sum.tsv.xz differ diff --git a/meteor/tests/test_merging/profiles/sample1/sample1_resfinder_as_msp_sum.tsv.xz b/meteor/tests/test_merging/profiles/sample1/sample1_resfinder_as_msp_sum.tsv.xz new file mode 100644 index 0000000..218f164 Binary files /dev/null and b/meteor/tests/test_merging/profiles/sample1/sample1_resfinder_as_msp_sum.tsv.xz differ diff --git a/meteor/tests/test_merging/profiles/sample1/sample1_resfinderfg_as_genes_sum.tsv.xz b/meteor/tests/test_merging/profiles/sample1/sample1_resfinderfg_as_genes_sum.tsv.xz new file mode 100644 index 0000000..63a66de Binary files /dev/null and b/meteor/tests/test_merging/profiles/sample1/sample1_resfinderfg_as_genes_sum.tsv.xz differ diff --git a/meteor/tests/test_merging/profiles/sample1/sample1_resfinderfg_as_msp_sum.tsv.xz b/meteor/tests/test_merging/profiles/sample1/sample1_resfinderfg_as_msp_sum.tsv.xz new file mode 100644 index 0000000..218f164 Binary files /dev/null and b/meteor/tests/test_merging/profiles/sample1/sample1_resfinderfg_as_msp_sum.tsv.xz differ diff --git a/meteor/tests/test_merging/profiles/sample2/sample2_resfinder_as_genes_sum.tsv.xz b/meteor/tests/test_merging/profiles/sample2/sample2_resfinder_as_genes_sum.tsv.xz new file mode 100644 index 0000000..2155eee Binary files /dev/null and b/meteor/tests/test_merging/profiles/sample2/sample2_resfinder_as_genes_sum.tsv.xz differ diff --git a/meteor/tests/test_merging/profiles/sample2/sample2_resfinder_as_msp_sum.tsv.xz b/meteor/tests/test_merging/profiles/sample2/sample2_resfinder_as_msp_sum.tsv.xz new file mode 100644 index 0000000..218f164 Binary files /dev/null and b/meteor/tests/test_merging/profiles/sample2/sample2_resfinder_as_msp_sum.tsv.xz differ diff --git a/meteor/tests/test_merging/profiles/sample2/sample2_resfinderfg_as_genes_sum.tsv.xz b/meteor/tests/test_merging/profiles/sample2/sample2_resfinderfg_as_genes_sum.tsv.xz new file mode 100644 index 0000000..2155eee Binary files /dev/null and b/meteor/tests/test_merging/profiles/sample2/sample2_resfinderfg_as_genes_sum.tsv.xz differ diff --git a/meteor/tests/test_merging/profiles/sample2/sample2_resfinderfg_as_msp_sum.tsv.xz b/meteor/tests/test_merging/profiles/sample2/sample2_resfinderfg_as_msp_sum.tsv.xz new file mode 100644 index 0000000..218f164 Binary files /dev/null and b/meteor/tests/test_merging/profiles/sample2/sample2_resfinderfg_as_msp_sum.tsv.xz differ diff --git a/meteor/tests/test_merging/profiles/sample3/sample3_resfinder_as_genes_sum.tsv.xz b/meteor/tests/test_merging/profiles/sample3/sample3_resfinder_as_genes_sum.tsv.xz new file mode 100644 index 0000000..b788af9 Binary files /dev/null and b/meteor/tests/test_merging/profiles/sample3/sample3_resfinder_as_genes_sum.tsv.xz differ diff --git a/meteor/tests/test_merging/profiles/sample3/sample3_resfinder_as_msp_sum.tsv.xz b/meteor/tests/test_merging/profiles/sample3/sample3_resfinder_as_msp_sum.tsv.xz new file mode 100644 index 0000000..218f164 Binary files /dev/null and b/meteor/tests/test_merging/profiles/sample3/sample3_resfinder_as_msp_sum.tsv.xz differ diff --git a/meteor/tests/test_merging/profiles/sample3/sample3_resfinderfg_as_genes_sum.tsv.xz b/meteor/tests/test_merging/profiles/sample3/sample3_resfinderfg_as_genes_sum.tsv.xz new file mode 100644 index 0000000..b788af9 Binary files /dev/null and b/meteor/tests/test_merging/profiles/sample3/sample3_resfinderfg_as_genes_sum.tsv.xz differ diff --git a/meteor/tests/test_merging/profiles/sample3/sample3_resfinderfg_as_msp_sum.tsv b/meteor/tests/test_merging/profiles/sample3/sample3_resfinderfg_as_msp_sum.tsv new file mode 100644 index 0000000..1f4e042 --- /dev/null +++ b/meteor/tests/test_merging/profiles/sample3/sample3_resfinderfg_as_msp_sum.tsv @@ -0,0 +1,24 @@ +annotation value +annotation value +aph 0 +dfra 0 +ldt 0 +tetM 0 +aac3_1 0 +aac6 0 +van 0 +ant 0 +erm 0 +blaa 0 +fos 0 +sul 0 +blac 0 +mcr 0 +tetX 0 +blab1 0 +blab3 0 +qnr 0 +blad 0 +aac3_2 0 +aac2 0 +arnm 0 diff --git a/meteor/tests/test_merging/profiles/sample3/sample3_resfinderfg_as_msp_sum.tsv.xz b/meteor/tests/test_merging/profiles/sample3/sample3_resfinderfg_as_msp_sum.tsv.xz new file mode 100644 index 0000000..218f164 Binary files /dev/null and b/meteor/tests/test_merging/profiles/sample3/sample3_resfinderfg_as_msp_sum.tsv.xz differ diff --git a/meteor/tests/test_profiler/catalogue/catalogue_reference.json b/meteor/tests/test_profiler/catalogue/catalogue_reference.json index fde2aeb..5c97c91 100644 --- a/meteor/tests/test_profiler/catalogue/catalogue_reference.json +++ b/meteor/tests/test_profiler/catalogue/catalogue_reference.json @@ -30,6 +30,14 @@ "tigrfam": { "filename": "catalogue_tigrfam.tsv", "version": "15.0" + }, + "resfinder": { + "filename": "catalogue_resfinder.tsv", + "version": "2.4.0" + }, + "resfinderfg": { + "filename": "catalogue_resfinderfg.tsv", + "version": "2.0" } } } \ No newline at end of file diff --git a/meteor/tests/test_profiler/catalogue/database/catalogue_resfinder.tsv b/meteor/tests/test_profiler/catalogue/database/catalogue_resfinder.tsv new file mode 100644 index 0000000..6a8c003 --- /dev/null +++ b/meteor/tests/test_profiler/catalogue/database/catalogue_resfinder.tsv @@ -0,0 +1,4 @@ +gene_id gene_name annotation +3 gene_3 ARD1 +4 gene_4 ARD2 +8 gene_8 ARD2 diff --git a/meteor/tests/test_profiler/catalogue/database/catalogue_resfinderfg.tsv b/meteor/tests/test_profiler/catalogue/database/catalogue_resfinderfg.tsv new file mode 100644 index 0000000..6a8c003 --- /dev/null +++ b/meteor/tests/test_profiler/catalogue/database/catalogue_resfinderfg.tsv @@ -0,0 +1,4 @@ +gene_id gene_name annotation +3 gene_3 ARD1 +4 gene_4 ARD2 +8 gene_8 ARD2