@@ -0,0 +1,2982 @@
+/*%0A * Copyright %5B1999-2014%5D Wellcome Trust Sanger Institute and the EMBL-European Bioinformatics Institute%0A * %0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A * %0A *      http://www.apache.org/licenses/LICENSE-2.0%0A * %0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0A%0A/*%0A * Copyright (C) 2003 EBI, GRL%0A * %0A * This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by%0A * the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.%0A * %0A * This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or%0A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.%0A * %0A * You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation,%0A * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA%0A */%0Apackage org.ensembl.healthcheck.testcase.variation;%0A%0Aimport java.util.Map;%0A%0Aimport org.ensembl.healthcheck.DatabaseRegistryEntry;%0Aimport org.ensembl.healthcheck.Team;%0Aimport org.ensembl.healthcheck.testcase.generic.ComparePreviousVersionBase;%0A%0A/**%0A * Compare the number of reads per individual between the current database and the database on the secondary server.%0A */%0A%0Apublic class ComparePreviousVersionReadCoverage extends ComparePreviousVersionBase %7B%0A%0A%09/**%0A%09 * Create a new testcase.%0A%09 */%0A%09public ComparePreviousVersionReadCoverage() %7B%0A%0A%09%09addToGroup(%22variation-release%22);%0A%09%09setDescription(%22Compare the number of reads for each individual with read coverage in the current database with those from the equivalent database on the secondary server%22);%0A%09%09setTeamResponsible(Team.VARIATION);%0A%0A%09%7D%0A%0A%09protected Map getCounts(DatabaseRegistryEntry dbre) %7B%0A%09%09return getCountsBySQL(dbre, %22SELECT i.name, COUNT(*) FROM read_coverage rc JOIN individual i ON (i.individual_id = rc.individual_id) GROUP BY i.name%22);%0A%0A%09%7D%0A%0A%09// ------------------------------------------------------------------------%0A%0A%09protected String entityDescription() %7B%0A%0A%09%09return %22number of reads for individual%22;%0A%0A%09%7D%0A%0A%09// ------------------------------------------------------------------------%0A%0A%09protected double threshold() %7B%0A%0A%09%09return 1;%0A%0A%09%7D%0A%0A        // ------------------------------------------------------------------------%0A%0A        protected double minimum() %7B%0A%0A                return 0;%0A%0A        %7D%0A%0A%09// ------------------------------------------------------------------------%0A%0A%7D %0A

Add health check for read coverage data