Examples of GATKReport


Examples of org.broadinstitute.gatk.engine.report.GATKReport

        try {
            outputFile = new PrintStream(output);
        } catch(FileNotFoundException e) {
            throw new UserException.MissingArgument("output", MISSING_OUTPUT_FILE);
        }
        final GATKReport report = gatherReport(inputs);
        report.print(outputFile);
    }
View Full Code Here

Examples of org.broadinstitute.gatk.engine.report.GATKReport

                    }
                }
            }
        }

        final GATKReport report = new GATKReport();
        for ( final Analysis analysis : analyzes )
            report.addTable(analysis.getTable());
        report.print(out);
        out.close();
    }
View Full Code Here

Examples of org.broadinstitute.gatk.engine.report.GATKReport

     * @param quantizationTable Quantization Table
     * @param recalTables Other recal tables
     * @return GATK report
     */
    private static GATKReport createRecalibrationGATKReport(final GATKReportTable argumentTable, final GATKReportTable quantizationTable, final List<GATKReportTable> recalTables) {
        final GATKReport report = new GATKReport();
        report.addTable(argumentTable);
        report.addTable(quantizationTable);
        report.addTables(recalTables);
        return report;
    }
View Full Code Here

Examples of org.broadinstitute.gatk.engine.report.GATKReport

    public RecalibrationReport(final File recalFile) {
        this(recalFile, getReadGroups(recalFile));
    }

    public RecalibrationReport(final File recalFile, final SortedSet<String> allReadGroups) {
        final GATKReport report = new GATKReport(recalFile);

        argumentTable = report.getTable(RecalUtils.ARGUMENT_REPORT_TABLE_TITLE);
        RAC = initializeArgumentCollectionTable(argumentTable);

        GATKReportTable quantizedTable = report.getTable(RecalUtils.QUANTIZED_REPORT_TABLE_TITLE);
        quantizationInfo = initializeQuantizationTable(quantizedTable);

        Pair<ArrayList<Covariate>, ArrayList<Covariate>> covariates = RecalUtils.initializeCovariates(RAC); // initialize the required and optional covariates
        ArrayList<Covariate> requiredCovariates = covariates.getFirst();
        ArrayList<Covariate> optionalCovariates = covariates.getSecond();
        requestedCovariates = new Covariate[requiredCovariates.size() + optionalCovariates.size()];
        optionalCovariateIndexes = new HashMap<String, Integer>(optionalCovariates.size());
        int covariateIndex = 0;
        for (final Covariate covariate : requiredCovariates)
            requestedCovariates[covariateIndex++] = covariate;
        for (final Covariate covariate : optionalCovariates) {
            requestedCovariates[covariateIndex] = covariate;
            final String covariateName = covariate.getClass().getSimpleName().split("Covariate")[0]; // get the name of the covariate (without the "covariate" part of it) so we can match with the GATKReport
            optionalCovariateIndexes.put(covariateName, covariateIndex-2);
            covariateIndex++;
        }

        for (Covariate cov : requestedCovariates)
            cov.initialize(RAC); // initialize any covariate member variables using the shared argument collection

        recalibrationTables = new RecalibrationTables(requestedCovariates, allReadGroups.size());

        initializeReadGroupCovariates(allReadGroups);

        parseReadGroupTable(report.getTable(RecalUtils.READGROUP_REPORT_TABLE_TITLE), recalibrationTables.getReadGroupTable());

        parseQualityScoreTable(report.getTable(RecalUtils.QUALITY_SCORE_REPORT_TABLE_TITLE), recalibrationTables.getQualityScoreTable());

        parseAllCovariatesTable(report.getTable(RecalUtils.ALL_COVARIATES_REPORT_TABLE_TITLE), recalibrationTables);

    }
View Full Code Here

Examples of org.broadinstitute.gatk.engine.report.GATKReport

     *
     * @param recalFile the recal file as a GATK Report
     * @return the unique read groups
     */
    public static SortedSet<String> getReadGroups(final File recalFile) {
        return getReadGroups(new GATKReport(recalFile));
    }
View Full Code Here

Examples of org.broadinstitute.gatk.engine.report.GATKReport

            recalFiles.add(recal);

        BQSRGatherer gatherer = new BQSRGatherer();
        gatherer.gather(recalFiles, output);

        GATKReport originalReport = new GATKReport(new File(privateTestDir + "bqsr.manyObservations.full.table"));
        GATKReport calculatedReport = new GATKReport(output);

        testReports(originalReport, calculatedReport);
    }
View Full Code Here

Examples of org.broadinstitute.gatk.engine.report.GATKReport

        recalFiles.add(recal3);
        recalFiles.add(recal4);
        recalFiles.add(recal5);
        gatherer.gather(recalFiles, output);

        GATKReport originalReport = new GATKReport(recal_original);
        GATKReport calculatedReport = new GATKReport(output);

        testReports(originalReport, calculatedReport);
    }
View Full Code Here

Examples of org.broadinstitute.gatk.engine.report.GATKReport

        recalFiles.add(recal4);
        recalFiles.add(recal5);
        recalFiles.add(recalEmpty);
        gatherer.gather(recalFiles, output);

        GATKReport originalReport = new GATKReport(recal_original);
        GATKReport calculatedReport = new GATKReport(output);

        testReports(originalReport, calculatedReport);
    }
View Full Code Here

Examples of org.broadinstitute.gatk.engine.report.GATKReport

        // TODO:   - IS otherwise available for local debugging unlike /humgen NFS mounts
        // Hand modified subset of problematic gather inputs submitted by George Grant
        File input1 = new File(privateTestDir + "NA12878.rg_subset.chr1.recal_data.table");
        File input2 = new File(privateTestDir + "NA12878.rg_subset.chrY_Plus.recal_data.table");

        GATKReport report12 = BQSRGatherer.gatherReport(Arrays.asList(input1, input2));
        GATKReport report21 = BQSRGatherer.gatherReport(Arrays.asList(input2, input1));

        Assert.assertTrue(report12.equals(report21), "GATK reports are different when gathered in a different order.");
    }
View Full Code Here

Examples of org.broadinstitute.gatk.engine.report.GATKReport

     * @param recalibrationTables Recalibration tables
     * @param requestedCovariates The list of requested covariates
     * @param sortByCols True to use GATKReportTable.TableSortingWay.SORT_BY_COLUMN, false to use GATKReportTable.TableSortingWay.DO_NOT_SORT
     */
    public static void outputRecalibrationReport(final RecalibrationArgumentCollection RAC, final QuantizationInfo quantizationInfo, final RecalibrationTables recalibrationTables, final Covariate[] requestedCovariates, boolean sortByCols) {
        final GATKReport report = createRecalibrationGATKReport(RAC.generateReportTable(covariateNames(requestedCovariates)), quantizationInfo.generateReportTable(sortByCols), generateReportTables(recalibrationTables, requestedCovariates, sortByCols));
        report.print(RAC.RECAL_TABLE);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.