Skip to content

Commit

Permalink
Extended DC to add extra check to make sure dbprimary_acc and display…
Browse files Browse the repository at this point in the history
…_label does not have empty rows
  • Loading branch information
Thomas Maurel committed Aug 29, 2019
1 parent be29aa1 commit 9e7b196
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ limitations under the License.
=cut

package Bio::EnsEMBL::DataCheck::Checks::XrefHTML;
package Bio::EnsEMBL::DataCheck::Checks::XrefHTMLBlank;

use warnings;
use strict;
Expand All @@ -28,8 +28,8 @@ use Bio::EnsEMBL::DataCheck::Test::DataCheck;
extends 'Bio::EnsEMBL::DataCheck::DbCheck';

use constant {
NAME => 'XrefHTML',
DESCRIPTION => 'Xrefs dont have HTML markups',
NAME => 'XrefHTMLBlank',
DESCRIPTION => 'Xrefs dont have HTML markups nor blank rows',
GROUPS => ['xref'],
DB_TYPES => ['core'],
TABLES => ['xref'],
Expand All @@ -46,6 +46,15 @@ sub tests {
WHERE display_label LIKE '%<%>%<\/%>%'/;

is_rows_zero($self->dba, $sql, $desc, $diag);

foreach my $column ('dbprimary_acc','display_label'){
my $desc = "$column has no empty string values";
my $sql = qq/
SELECT COUNT(*) FROM xref
WHERE $column = ''
/;
is_rows_zero($self->dba, $sql, $desc);
}
}

1;
8 changes: 4 additions & 4 deletions lib/Bio/EnsEMBL/DataCheck/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -1369,14 +1369,14 @@
"name" : "VariationSubset",
"package_name" : "Bio::EnsEMBL::DataCheck::Checks::VariationSubset"
},
"XrefHTML" : {
"XrefHTMLBlank" : {
"datacheck_type" : "critical",
"description" : "Xrefs dont have HTML markups",
"description" : "Xrefs dont have HTML markups nor blank rows",
"groups" : [
"xref"
],
"name" : "XrefHTML",
"package_name" : "Bio::EnsEMBL::DataCheck::Checks::XrefHTML"
"name" : "XrefHTMLBlank",
"package_name" : "Bio::EnsEMBL::DataCheck::Checks::XrefHTMLBlank"
},
"XrefTypes" : {
"datacheck_type" : "advisory",
Expand Down

0 comments on commit 9e7b196

Please sign in to comment.