diff --git a/immuneML/api/galaxy/build_dataset_overview_yaml.py b/immuneML/api/galaxy/build_dataset_overview_yaml.py index 3a9223e28..8a706aa90 100644 --- a/immuneML/api/galaxy/build_dataset_overview_yaml.py +++ b/immuneML/api/galaxy/build_dataset_overview_yaml.py @@ -27,10 +27,7 @@ def build_specs(args): "instructions": { "my_dataset_generation_instruction": { "type": "ExploratoryAnalysis", - "analyses":{ - "dataset_overview":{ - "dataset": args.dataset_name, - "report": None}} + "analyses": dict() } } } @@ -53,6 +50,9 @@ def build_specs(args): if args.amino_acid_report == "True": add_report_with_label(specs, args, report_name="AminoAcidFrequencyDistribution", report_key="amino_acid") + if len(specs["instructions"]["my_dataset_generation_instruction"]["analyses"]) == 0: + specs["instructions"]["my_dataset_generation_instruction"]["analyses"] = {"dataset_overview":{"dataset": args.dataset_name, "report": None}} + return specs diff --git a/test/api/galaxy/test_build_dataset_overview_yaml.py b/test/api/galaxy/test_build_dataset_overview_yaml.py index 63f7333cb..8d4678155 100644 --- a/test/api/galaxy/test_build_dataset_overview_yaml.py +++ b/test/api/galaxy/test_build_dataset_overview_yaml.py @@ -67,9 +67,6 @@ def test_sequencedataset(self): self.assertDictEqual(loaded_specs["instructions"], {"my_dataset_generation_instruction": { "type":"ExploratoryAnalysis", "analyses":{ - "dataset_overview": - {"dataset": "dataset", - "report": None}, "sequence_length_analysis": {"dataset": "dataset", "report": "sequence_length_report"}, @@ -126,7 +123,7 @@ def test_repertoiredataset(self): os.chdir(path) - yamlbuilder_main(["-r", "VDJdb", "-o", str(path), "-f", "repertoire.yaml", "-m", "metadata.csv", "-i", "True"]) + yamlbuilder_main(["-r", "VDJdb", "-o", str(path), "-f", "repertoire.yaml", "-m", "metadata.csv", "-i", "True", "-q", "True"]) with open(path / "repertoire.yaml", "r") as file: loaded_specs = yaml.load(file, Loader=yaml.FullLoader) @@ -135,12 +132,14 @@ def test_repertoiredataset(self): {"path": "./", "metadata_file": "metadata.csv", "is_repertoire": True, "region_type": RegionType.IMGT_CDR3.name, "result_path": "./"}}}) + self.assertDictEqual(loaded_specs["definitions"]["reports"], {"amino_acid_report": "AminoAcidFrequencyDistribution"}) + self.assertDictEqual(loaded_specs["instructions"], {"my_dataset_generation_instruction": {"type": "ExploratoryAnalysis", "analyses": - {"dataset_overview": + {"amino_acid_analysis": {"dataset": "dataset", - "report": None}}}}) + "report": "amino_acid_report"}}}}) ImmuneMLParser.parse_yaml_file(path / "repertoire.yaml")