Skip to content

Commit

Permalink
Merge pull request #498 from Ensembl/release/107
Browse files Browse the repository at this point in the history
Merged RR updates to 108
  • Loading branch information
marcoooo committed Sep 28, 2022
2 parents 16ba0b2 + afc3e55 commit e4ef765
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 9 deletions.
11 changes: 9 additions & 2 deletions lib/Bio/EnsEMBL/DataCheck/Checks/CanonicalTranscripts.pm
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ sub tests {
/;
is_rows_zero($self->dba, $sql_2, $desc_2);

my $desc_3 = 'Canonical transcripts with translations belong to protein-coding genes';
my $sql_3 = qq/
SELECT g.stable_id FROM
gene g INNER JOIN
Expand All @@ -81,7 +80,15 @@ sub tests {
b.biotype_group <> 'coding' AND
cs.species_id = $species_id
/;
is_rows_zero($self->dba, $sql_3, $desc_3);
my $mca = $self->dba->get_adaptor('MetaContainer');
if($mca->single_value_by_key('genebuild.method') eq 'projection_build'){
skip "Canonical transcript checks are not mandatory for projection builds", 1;
}
else{
my $desc_3 = 'Canonical transcripts with translations belong to protein-coding genes';
is_rows_zero($self->dba, $sql_3, $desc_3);
}


my $desc_4 = 'Canonical transcripts with translations are protein-coding';
my $sql_4 = qq/
Expand Down
35 changes: 28 additions & 7 deletions lib/Bio/EnsEMBL/DataCheck/Checks/GeneBiotypes.pm
Original file line number Diff line number Diff line change
Expand Up @@ -136,14 +136,35 @@ sub biotype_groups {
}
}

my $desc_1 = 'genes have at least one transcript with a matching biotype group';
is(scalar(@group_mismatch), 0, $desc_1);
my $mca = $self->dba->get_adaptor('MetaContainer');
if($mca->single_value_by_key('genebuild.method') eq 'projection_build'){
if (scalar(@group_mismatch) > 100){
my $desc_proj_1 = 'found no more that 100 genes with mismatched transcript biotype groups';
is(scalar(@group_mismatch), 100, $desc_proj_1);
}

my $desc_2 = '"pseudogene" genes do not have coding transcripts';
is(scalar(@pseudogene_mismatch), 0, $desc_2);
if (scalar(@pseudogene_mismatch) > 5){
my $desc_proj_2 = 'found no more that 5 pseudogenes that have coding transcripts';
is(scalar(@polymorphic_mismatch), 5, $desc_proj_2);
}

if (scalar(@polymorphic_mismatch) > 5){
my $desc_proj_3 = 'found no more that 5 polymorphic_pseudogene with mismatched transcript biotype groups';
is(scalar(@polymorphic_mismatch), 5, $desc_proj_3);
}
}
else{

my $desc_3 = '"polymorphic_pseudogene" genes have at least one polymorphic_pseudogene transcript';
is(scalar(@polymorphic_mismatch), 0, $desc_3);
}
my $desc_1 = 'genes have at least one transcript with a matching biotype group';
is(scalar(@group_mismatch), 0, $desc_1);

my $desc_2 = '"pseudogene" genes do not have coding transcripts';
is(scalar(@pseudogene_mismatch), 0, $desc_2);

my $desc_3 = '"polymorphic_pseudogene" genes have at least one polymorphic_pseudogene transcript';
is(scalar(@polymorphic_mismatch), 0, $desc_3);
}


}
1;
5 changes: 5 additions & 0 deletions lib/Bio/EnsEMBL/DataCheck/Checks/RepeatFeatures.pm
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,11 @@ sub tests {
skip "Repeat features not mandatory for viruses", 1;
}

if($mca->single_value_by_key('genebuild.method') eq 'projection_build') {
skip "Repeat features not mandatory for projection builds", 1;
}


# Don't need to worry about species_id, because we don't do this
# query for collection dbs...
my @logic_names = ('dust', 'trf');
Expand Down

0 comments on commit e4ef765

Please sign in to comment.