From 7f786ecb475bc3e4193dadc08cf694a4ac76623d Mon Sep 17 00:00:00 2001 From: Kim Rutherford Date: Wed, 30 Aug 2023 11:57:50 +1200 Subject: [PATCH 1/4] Require names for all allele types Refs pombase/canto#2757 --- canto.yaml | 24 ++++++++++++------------ t/50_config.t | 8 ++++---- t/80_web_service.t | 4 ++-- 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/canto.yaml b/canto.yaml index 25a1d836e..b4c4c48cb 100644 --- a/canto.yaml +++ b/canto.yaml @@ -1488,7 +1488,7 @@ allele_type_list: export_type: amino_acid_insertion show_description: true description_required: true - allele_name_required: false + allele_name_required: true allow_expression_change: true expression_required: true placeholder: e.g. A858AMKGYP (insertion of MKGYP after A858, note A before and after number) @@ -1496,7 +1496,7 @@ allele_type_list: export_type: amino_acid_mutation show_description: true description_required: true - allele_name_required: false + allele_name_required: true allow_expression_change: true expression_required: true placeholder: eg. K132A or F256A,F310A @@ -1504,7 +1504,7 @@ allele_type_list: export_type: amino_acid_insertion_and_mutation show_description: true description_required: true - allele_name_required: false + allele_name_required: true allow_expression_change: true expression_required: true placeholder: e.g. A858AMKGYP,F124D @@ -1512,7 +1512,7 @@ allele_type_list: export_type: amino_acid_insertion_and_deletion show_description: true description_required: true - allele_name_required: false + allele_name_required: true allow_expression_change: true expression_required: true placeholder: e.g. A858AMKGYP,100-200,P500* @@ -1520,7 +1520,7 @@ allele_type_list: export_type: amino_acid_deletion_and_mutation show_description: true description_required: true - allele_name_required: false + allele_name_required: true allow_expression_change: true expression_required: true placeholder: e.g. 100-200,F124D,P500* @@ -1528,7 +1528,7 @@ allele_type_list: export_type: partial_amino_acid_deletion show_description: true description_required: true - allele_name_required: false + allele_name_required: true allow_expression_change: true expression_required: true placeholder: "Specify deleted residues - eg. 100-200 OR 10-20,40-50. Use P500* for nonsense mutation" @@ -1536,7 +1536,7 @@ allele_type_list: export_type: nucleotide_insertion show_description: true description_required: true - allele_name_required: false + allele_name_required: true allow_expression_change: true expression_required: true placeholder: e.g. C132CAATTT (insertion of AATTT after C132, note C before and after number)) @@ -1544,7 +1544,7 @@ allele_type_list: export_type: nucleotide_mutation show_description: true description_required: true - allele_name_required: false + allele_name_required: true allow_expression_change: true expression_required: true placeholder: eg. A25G, OR A(-25)G (for residues upstream of ATG -protein coding- or transcription start -RNA genes-) @@ -1552,7 +1552,7 @@ allele_type_list: export_type: partial_nucleotide_deletion show_description: true description_required: true - allele_name_required: false + allele_name_required: true allow_expression_change: true expression_required: true placeholder: "Specify deleted residues - eg. 100-200 OR (-20)-(-30) (for residues upstream of ATG -protein coding- or transcription start -RNA genes-)" @@ -1560,7 +1560,7 @@ allele_type_list: export_type: nucleotide_deletion_and_mutation show_description: true description_required: true - allele_name_required: false + allele_name_required: true allow_expression_change: true expression_required: true placeholder: e.g. 100-200,A124T,C128G (for residues upstream of ATG -protein coding- or transcription start -RNA genes- use negative numbers in parenthesis) @@ -1568,7 +1568,7 @@ allele_type_list: export_type: nucleotide_insertion_and_mutation show_description: true description_required: true - allele_name_required: false + allele_name_required: true allow_expression_change: true expression_required: true placeholder: e.g. T858TAAGA,T(-124)A (for residues upstream of ATG -protein coding- or transcription start -RNA genes- use negative numbers in parenthesis) @@ -1593,7 +1593,7 @@ allele_type_list: export_type: other show_description: true description_required: true - allele_name_required: false + allele_name_required: true allow_expression_change: true expression_required: true placeholder: Please provide a description diff --git a/t/50_config.t b/t/50_config.t index ea8564ed8..92825a17f 100644 --- a/t/50_config.t +++ b/t/50_config.t @@ -240,14 +240,14 @@ my $config_for_json = $config_with_suffix->for_json('allele_types'); my $description_required = $config_for_json->{'nucleotide substitution(s)'}->{description_required}; -my $allele_name_required = - $config_for_json->{'nucleotide substitution(s)'}->{allele_name_required}; +my $show_description = + $config_for_json->{'deletion'}->{show_description}; ok ($description_required); -ok (!$allele_name_required); +ok (!$show_description); ok ($description_required == JSON::true); -ok ($allele_name_required == JSON::false); +ok ($show_description == JSON::false); # species taxon ID lookup is ($config_single->get_species_taxon_of_strain_taxon(1238467), 168172); diff --git a/t/80_web_service.t b/t/80_web_service.t index 7a42972f8..70a56ae2a 100644 --- a/t/80_web_service.t +++ b/t/80_web_service.t @@ -230,11 +230,11 @@ test_psgi $app, sub { die "$@\n", $res->content(); } - like($res->content(), qr/"allele_name_required"\s*:\s*false/); + like($res->content(), qr/"description_required"\s*:\s*false/); like($res->content(), qr/"allele_name_required"\s*:\s*true/); ok ($obj->{'partial deletion, nucleotide'}->{allow_expression_change}); - ok (!$obj->{'partial deletion, nucleotide'}->{allele_name_required}); + ok (!$obj->{'unknown'}->{description_required}); } { From e13194c33754a92b107195fd8b3a3060347d7b85 Mon Sep 17 00:00:00 2001 From: Kim Rutherford Date: Wed, 30 Aug 2023 11:58:32 +1200 Subject: [PATCH 2/4] Update to version v1761 --- canto.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/canto.yaml b/canto.yaml index b4c4c48cb..b3f328da1 100644 --- a/canto.yaml +++ b/canto.yaml @@ -25,7 +25,7 @@ header_image: logos/curation_tool.png canto_url: https://curation.pombase.org/ -app_version: v1760 +app_version: v1761 schema_version: 34 From db1af7b165ae6dd586cb48044eac0e076695484a Mon Sep 17 00:00:00 2001 From: Kim Rutherford Date: Wed, 30 Aug 2023 13:07:45 +1200 Subject: [PATCH 3/4] Fix GenotypeInteractionLookup for missing pubs. We were getting exceptions for publications that aren't in Chado. Refs pombase/canto#2760 --- lib/Canto/Chado/GenotypeInteractionLookup.pm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/Canto/Chado/GenotypeInteractionLookup.pm b/lib/Canto/Chado/GenotypeInteractionLookup.pm index 0c6b06174..8c42d10de 100644 --- a/lib/Canto/Chado/GenotypeInteractionLookup.pm +++ b/lib/Canto/Chado/GenotypeInteractionLookup.pm @@ -133,8 +133,13 @@ sub lookup $ua->default_header('Accept', 'text/plain'); my $res = $ua->get($url); + if ($res->status_line() =~ /^404\s.*/) { + return (0, []); + } + if (!$res->is_success && $res->status_line() !~ /^404\s.*/) { warn $res->status_line(); + return (0, []); } my $content = $res->decoded_content(); From 42fd96cf541f30b70da373d2a39bf179e2ed14b7 Mon Sep 17 00:00:00 2001 From: Kim Rutherford Date: Wed, 30 Aug 2023 13:08:50 +1200 Subject: [PATCH 4/4] Update to version v1762 --- canto.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/canto.yaml b/canto.yaml index b3f328da1..a30b081ff 100644 --- a/canto.yaml +++ b/canto.yaml @@ -25,7 +25,7 @@ header_image: logos/curation_tool.png canto_url: https://curation.pombase.org/ -app_version: v1761 +app_version: v1762 schema_version: 34