Skip to content

Commit

Permalink
Merge e75d913 into a9a58c6
Browse files Browse the repository at this point in the history
  • Loading branch information
james-monkeyshines committed Apr 28, 2021
2 parents a9a58c6 + e75d913 commit 8872e8d
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 15 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::AttribValuesExist;
package Bio::EnsEMBL::DataCheck::Checks::TranscriptSupport;

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

use constant {
NAME => 'AttribValuesExist',
DESCRIPTION => 'Check that TSL and GENCODE attributes exist',
NAME => 'TranscriptSupport',
DESCRIPTION => 'Check for presence of TSL and GENCODE attributes, and CCDS xrefs',
GROUPS => ['core', 'geneset_support_level'],
DATACHECK_TYPE => 'critical',
DB_TYPES => ['core'],
TABLES => ['attrib_type', 'transcript', 'transcript_attrib']
TABLES => ['attrib_type', 'external_db', 'object_xref', 'transcript', 'transcript_attrib', 'xref']
};

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

if ( $self->species !~ /^(homo_sapiens|mus_musculus)$/ ) {
return (1, 'GENCODE/TSL attribs are only required for human and mouse');
return (1, 'GENCODE/TSL/CCDS are only required for human and mouse');
}
}

Expand Down Expand Up @@ -76,6 +76,16 @@ sub tests {
WHERE code like 'tsl%'
/;
is_rows_nonzero($self->dba, $sql_2, $desc_2);

my $desc_3 = 'CCDS xrefs exist';
my $sql_3 = q/
SELECT COUNT(*) FROM
object_xref INNER JOIN
xref USING (xref_id) INNER JOIN
external_db USING (external_db_id)
WHERE db_name = 'CCDS';
/;
is_rows_nonzero($self->dba, $sql_3, $desc_3);
}

1;
20 changes: 10 additions & 10 deletions lib/Bio/EnsEMBL/DataCheck/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -151,16 +151,6 @@
"name" : "AssemblySeqregion",
"package_name" : "Bio::EnsEMBL::DataCheck::Checks::AssemblySeqregion"
},
"AttribValuesExist" : {
"datacheck_type" : "critical",
"description" : "Check that TSL and GENCODE attributes exist",
"groups" : [
"core",
"geneset_support_level"
],
"name" : "AttribValuesExist",
"package_name" : "Bio::EnsEMBL::DataCheck::Checks::AttribValuesExist"
},
"BlankEnums" : {
"datacheck_type" : "critical",
"description" : "Enum columns do not have empty string values",
Expand Down Expand Up @@ -2363,6 +2353,16 @@
"name" : "TranscriptDisplayXrefSuffix",
"package_name" : "Bio::EnsEMBL::DataCheck::Checks::TranscriptDisplayXrefSuffix"
},
"TranscriptSupport" : {
"datacheck_type" : "critical",
"description" : "Check for presence of TSL and GENCODE attributes, and CCDS xrefs",
"groups" : [
"core",
"geneset_support_level"
],
"name" : "TranscriptSupport",
"package_name" : "Bio::EnsEMBL::DataCheck::Checks::TranscriptSupport"
},
"TranscriptVariation" : {
"datacheck_type" : "critical",
"description" : "TranscriptVariation data is present and correct",
Expand Down

0 comments on commit 8872e8d

Please sign in to comment.