@@ -0,0 +1,2800 @@
+/*%0A * Copyright (C) 2004 EBI, GRL%0A * %0A * This library is free software; you can redistribute it and/or modify it under the%0A * terms of the GNU Lesser General Public License as published by the Free Software%0A * 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%0A * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A%0A * 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%0A * this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place,%0A * Suite 330, Boston, MA 02111-1307 USA%0A */%0A%0Apackage org.ensembl.healthcheck.testcase.variation;%0A%0Aimport java.sql.Connection;%0A%0Aimport org.ensembl.healthcheck.DatabaseRegistryEntry;%0A//import org.ensembl.healthcheck.DatabaseType;%0Aimport org.ensembl.healthcheck.ReportManager;%0Aimport org.ensembl.healthcheck.testcase.SingleDatabaseTestCase;%0A%0A/**%0A * Check that if the peptide_allele_string of transcript_variation is not %3E1. %0A * It should out %3E1, unless it filled with numbers%0A */%0Apublic class VariationSynonym extends SingleDatabaseTestCase %7B%0A%0A    /**%0A     * Creates a new instance of Check Variation Synonym%0A     */%0A    public VariationSynonym() %7B%0A        addToGroup(%22variation%22);%0A%09addToGroup(%22variation-release%22);%0A        setDescription(%22Check that Venter and Watson should have 3 million variations%22);%0A    %7D%0A%0A    /**%0A     * Run the test%0A     * @param dbre%0A     *          The database to use.%0A     * @return Result.%0A     */%0A    public boolean run(DatabaseRegistryEntry dbre) %7B%0A%0A        boolean result = true;%0A%09String%5B%5D individualNames = %7B%22Venter%22,%22Watson%22%7D;%0A%09String individualName;%0A%09// Check that Venter and Watson should have 3 million variations%0A%0A        Connection con = dbre.getConnection();%0A%09for (int i = 0; i %3C individualNames.length; i++) %7B%0A%09    individualName = individualNames%5Bi%5D;%0A%09    int rows = getRowCount(con, %22SELECT COUNT(*) FROM variation v, source s WHERE v.source_id=s.source_id and s.name like '%25%22 + individualName + %22'%22);%0A%09    int rows1 = getRowCount(con, %22SELECT COUNT(*) FROM variation_synonym vs, source s WHERE vs.source_id=s.source_id and s.name like '%25%22 + individualName + %22'%22);%0A%09    int tot_rows = rows + rows1;%0A%09    if (tot_rows %3C 3000000) %7B%0A%09%09result = false;%0A%09%09ReportManager.problem(this, con, tot_rows + %22 with variations for %22 + individualName);%0A%09    %7D else %7B%0A%09%09//ReportManager.info(this, con, tot_rows + %22 with variation for %22 + individualName);%0A%09    %7D%0A%09%7D%0A%0A        if (result)%7B%0A        %09ReportManager.correct(this,con,%22Venter/Watson has more then 3 million variations%22);%0A        %7D%0A        return result;%0A%0A    %7D // run%0A%0A%7D // VariationSynonym%0A

check number of variations for individual