diff --git a/src/phold/io/handle_genbank.py b/src/phold/io/handle_genbank.py index e4b5892..3088dee 100644 --- a/src/phold/io/handle_genbank.py +++ b/src/phold/io/handle_genbank.py @@ -140,9 +140,9 @@ def run_pool(pool, records): feature.qualifiers["function"] = "unknown function" feature.qualifiers["product"] = "hypothetical protein" feature.qualifiers["phrog"] = "No_PHROG" - feature.qualifiers[ - "source" - ] = f"Pyrodigal-gv_{pyrodigal_gv.__version__}" + feature.qualifiers["source"] = ( + f"Pyrodigal-gv_{pyrodigal_gv.__version__}" + ) feature.qualifiers["transl_table"] = gene.translation_table # from the API # translation_table (int, optional) – An alternative translation table to use to translate the gene. diff --git a/src/phold/results/topfunction.py b/src/phold/results/topfunction.py index 7c07975..018f6ab 100644 --- a/src/phold/results/topfunction.py +++ b/src/phold/results/topfunction.py @@ -346,12 +346,12 @@ def calculate_topfunctions_results( if foldseek_phrog != cds_feature.qualifiers["phrog"][0]: # where there was no phrog in pharokka if cds_feature.qualifiers["phrog"][0] == "No_PHROG": - updated_cds_dict[record_id][cds_id].qualifiers["phrog"][ - 0 - ] = result_dict[record_id][cds_id]["phrog"] - updated_cds_dict[record_id][cds_id].qualifiers["product"][ - 0 - ] = result_dict[record_id][cds_id]["product"] + updated_cds_dict[record_id][cds_id].qualifiers["phrog"][0] = ( + result_dict[record_id][cds_id]["phrog"] + ) + updated_cds_dict[record_id][cds_id].qualifiers["product"][0] = ( + result_dict[record_id][cds_id]["product"] + ) updated_cds_dict[record_id][cds_id].qualifiers["function"][ 0 ] = result_dict[record_id][cds_id]["function"] diff --git a/tests/test_integration.py b/tests/test_integration.py index 303396b..fb46406 100755 --- a/tests/test_integration.py +++ b/tests/test_integration.py @@ -114,7 +114,9 @@ def test_compare_pdb(): def test_predict_fasta(): """test phold predict with fasta input""" input_fasta: Path = f"{test_data}/combined_truncated_acr_defense_vfdb_card.gbk" - cmd = f"phold predict -i {input_fasta} -o {predict_fasta_dir} -t {threads} --cpu -f" + cmd = ( + f"phold predict -i {input_fasta} -o {predict_fasta_dir} -t {threads} --cpu -f" + ) exec_command(cmd)