Skip to content

Commit

Permalink
Merge branch 'master' into issue-2758-disable-edits-for-existing-alleles
Browse files Browse the repository at this point in the history
  • Loading branch information
kimrutherford committed Aug 30, 2023
2 parents d88f23b + 42fd96c commit c8b4e3c
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 19 deletions.
26 changes: 13 additions & 13 deletions canto.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ header_image: logos/curation_tool.png

canto_url: https://curation.pombase.org/

app_version: v1760
app_version: v1762

schema_version: 35

Expand Down Expand Up @@ -1488,87 +1488,87 @@ 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)
- name: "amino acid substitution(s)"
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
- name: amino acid insertion and substitution
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
- name: amino acid insertion and deletion
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*
- name: partial deletion and amino acid change
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*
- name: partial deletion, amino acid
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"
- name: nucleotide insertion
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))
- name: "nucleotide substitution(s)"
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-)
- name: partial deletion, nucleotide
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-)"
- name: partial deletion and nucleotide change
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)
- name: nucleotide insertion and substitution
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)
Expand All @@ -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
Expand Down
5 changes: 5 additions & 0 deletions lib/Canto/Chado/GenotypeInteractionLookup.pm
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
8 changes: 4 additions & 4 deletions t/50_config.t
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions t/80_web_service.t
Original file line number Diff line number Diff line change
Expand Up @@ -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});
}

{
Expand Down

0 comments on commit c8b4e3c

Please sign in to comment.