@@ -0,0 +1,1993 @@
+package function.test;%0A%0Aimport global.Data;%0Aimport java.sql.SQLException;%0Aimport utils.DBManager;%0Aimport utils.LogManager;%0A%0A/**%0A *%0A * @author nick%0A */%0Apublic class OutputSubsetSample %7B%0A%0A    public static final String OUTPUT_PATH = %22/nfs/seqscratch10/ANNOTATION/tmp/annodb_pgm/%22;%0A%0A    public static void run() throws SQLException %7B%0A        outputCarrierData();%0A%0A        outputNonCarrierData();%0A    %7D%0A%0A    public static void outputCarrierData() throws SQLException %7B%0A        String snvCarrierSql = %22SELECT * %22%0A                + %22FROM called_snv va,%22%0A                + Data.ALL_SAMPLE_ID_TABLE + %22 t %22%0A                + %22WHERE va.sample_id = t.id %22%0A                + %22INTO OUTFILE '%22 + OUTPUT_PATH + %22called_snv.txt'%22;%0A%0A        LogManager.writeAndPrint(snvCarrierSql);%0A        DBManager.executeQuery(snvCarrierSql);%0A%0A        String indelCarrierSql = %22SELECT * %22%0A                + %22FROM called_indel va,%22%0A                + Data.ALL_SAMPLE_ID_TABLE + %22 t %22%0A                + %22WHERE va.sample_id = t.id %22%0A                + %22INTO OUTFILE '%22 + OUTPUT_PATH + %22called_indel.txt'%22;%0A%0A        LogManager.writeAndPrint(indelCarrierSql);%0A        DBManager.executeQuery(indelCarrierSql);%0A    %7D%0A%0A    public static void outputNonCarrierData() throws SQLException %7B%0A        for (int i = 0; i %3C Data.SAMPLE_TYPE.length; i++) %7B%0A            for (String chr : Data.ALL_CHR) %7B%0A                String nonCarrierSql = %22SELECT * %22%0A                        + %22FROM %22 + Data.SAMPLE_TYPE%5Bi%5D%0A                        + %22_read_coverage_%22 + Data.COVERAGE_BLOCK_SIZE + %22_chr%22 + chr + %22 c,%22%0A                        + Data.SAMPLE_TYPE%5Bi%5D + %22_sample_id t %22%0A                        + %22WHERE c.sample_id = t.id %22%0A                        + %22INTO OUTFILE '%22 + OUTPUT_PATH + Data.SAMPLE_TYPE%5Bi%5D%0A                        + %22_read_coverage_%22 + Data.COVERAGE_BLOCK_SIZE + %22_chr%22 + chr + %22.txt'%22;%0A%0A                LogManager.writeAndPrint(nonCarrierSql);%0A                DBManager.executeQuery(nonCarrierSql);%0A            %7D%0A        %7D%0A    %7D%0A%7D%0A

support to output subset of annodb - carrier & non-carrier data