Skip to content

Commit

Permalink
Merge pull request #539 from nuno-agostinho/fix/vcf-only-proteinfunct…
Browse files Browse the repository at this point in the history
…ionpredictions

Skip ProteinFunctionPredictions tests for VCF-only species
  • Loading branch information
marcoooo committed Mar 21, 2023
2 parents 5a6db36 + ead3ae1 commit bba58dc
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,17 @@ use constant {
TABLES => ['attrib', 'protein_function_predictions', 'protein_function_predictions_attrib']
};

sub skip_tests {
my ($self) = @_;

my $mca = $self->dba->get_adaptor('MetaContainer');
my $vcf = $mca->list_value_by_key('variation_source.vcf')->[0] || 0;

if ($vcf) {
return( 1, "Protein function predictions are not expected for species whose variation source is VCF." );
}
}

sub tests {
my ($self) = @_;

Expand Down
13 changes: 12 additions & 1 deletion lib/Bio/EnsEMBL/DataCheck/Checks/ProteinFunctionPredictions.pm
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,23 @@ extends 'Bio::EnsEMBL::DataCheck::DbCheck';

use constant {
NAME => 'ProteinFunctionPredictions',
DESCRIPTION => 'prediction_matrix is not NULL or empty',
DESCRIPTION => 'Protein function predictions are present and correct',
GROUPS => ['variation'],
DB_TYPES => ['variation'],
TABLES => ['protein_function_predictions']
};

sub skip_tests {
my ($self) = @_;

my $mca = $self->dba->get_adaptor('MetaContainer');
my $vcf = $mca->list_value_by_key('variation_source.vcf')->[0] || 0;

if ($vcf) {
return( 1, "Protein function predictions are not expected for species whose variation source is VCF." );
}
}

sub tests {
my ($self) = @_;

Expand Down
2 changes: 1 addition & 1 deletion lib/Bio/EnsEMBL/DataCheck/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -2174,7 +2174,7 @@
},
"ProteinFunctionPredictions" : {
"datacheck_type" : "critical",
"description" : "prediction_matrix is not NULL or empty",
"description" : "Protein function predictions are present and correct",
"groups" : [
"variation"
],
Expand Down

0 comments on commit bba58dc

Please sign in to comment.