Package org.bioinfo.ngs.qc.qualimap.common

Examples of org.bioinfo.ngs.qc.qualimap.common.TranscriptDataHandler


    }

    private void createCharts(StatsReporter reporter) throws IOException {

        TranscriptDataHandler th = computeCountsTask.getTranscriptDataHandler();

        loggerThread.logLine("Creating plots");
        th.setNumTotalReads(computeCountsTask.getTotalReadCounts() + computeCountsTask.getNoFeatureNumber());
        List<QChart> plots = th.createPlots(computeCountsTask.getSampleName());

        reporter.setChartList(plots);

    }
View Full Code Here


    private void prepareHtmlSummary(StatsReporter reporter) {


        StatsKeeper summaryKeeper = reporter.getSummaryStatsKeeper();
        StringUtilsSwing sdf = new StringUtilsSwing();
        TranscriptDataHandler th = computeCountsTask.getTranscriptDataHandler();

        StatsKeeper.Section readsAlignment = new StatsKeeper.Section("Reads alignment");

        readsAlignment.addRow("Aligned to genes:", sdf.formatLong(computeCountsTask.getTotalReadCounts()));
        readsAlignment.addRow("No feature assigned:", sdf.formatLong(computeCountsTask.getNoFeatureNumber()));
        readsAlignment.addRow("Non-unique alignment:", sdf.formatLong(computeCountsTask.getAlignmentNotUniqueNumber()));
        readsAlignment.addRow("Ambiguous alignment:", sdf.formatLong(computeCountsTask.getAmbiguousNumber()));
        readsAlignment.addRow("Not aligned:", sdf.formatLong(computeCountsTask.getNotAlignedNumber()));

        summaryKeeper.addSection(readsAlignment);

        StatsKeeper.Section readsOrigin = new StatsKeeper.Section("Reads genomic origin");
        long totalReadCount = computeCountsTask.getTotalReadCounts() + computeCountsTask.getNoFeatureNumber();
        long exonicReadCount = totalReadCount - computeCountsTask.getNoFeatureNumber();
        long intronicReadCount = th.getNumIntronicReads();
        long intergenicReadCount = th.getNumIntergenicReads();
        readsOrigin.addRow("Exonic: ", sdf.formatLong(exonicReadCount) + " / " +
                sdf.formatPercentage( (100.*exonicReadCount) /  totalReadCount ));
        readsOrigin.addRow("Intronic: ", sdf.formatLong(intronicReadCount) + " / " +
                sdf.formatPercentage( (100.*intronicReadCount) /  totalReadCount ));
        readsOrigin.addRow("Intergenic: ", sdf.formatLong(intergenicReadCount) + " / " +
                sdf.formatPercentage( (100.*intergenicReadCount) /  totalReadCount ));
        summaryKeeper.addSection(readsOrigin);

        //TODO: fix this in case of SE reads
        /*if (computeCountsTask.getLibraryProtocol() != LibraryProtocol.NON_STRAND_SPECIFIC) {
            StatsKeeper.Section libraryProtocol = new StatsKeeper.Section("Library protocol");
            double correctlyMappedPercentage =
                    (100.*computeCountsTask.getProtocolCorrectlyMapped()) / computeCountsTask.getTotalFragmentCount() ;
            libraryProtocol.addRow("Concordant fragments: ",
                    sdf.formatLong(computeCountsTask.getProtocolCorrectlyMapped()) + " / " +
                    sdf.formatPercentage(correctlyMappedPercentage));
        }*/


        TranscriptDataHandler transcriptDataHandler = computeCountsTask.getTranscriptDataHandler();
        StatsKeeper.Section transcriptCoverage = new StatsKeeper.Section("Transcript coverage profile");
        transcriptCoverage.addRow("5' bias:", sdf.formatDecimal(transcriptDataHandler.getMedianFivePrimeBias()));
        transcriptCoverage.addRow("3' bias:", sdf.formatDecimal(transcriptDataHandler.getMedianThreePrimeBias()));
        transcriptCoverage.addRow("5'-3' bias:", sdf.formatDecimal(transcriptDataHandler.getMedianFiveToThreeBias()));

        summaryKeeper.addSection(transcriptCoverage);

        StatsKeeper.Section junctionAnalysisSection = new StatsKeeper.Section("Junction analysis");
        long numReadsWithJunctions = th.getNumReadsWithJunctions();
View Full Code Here

TOP

Related Classes of org.bioinfo.ngs.qc.qualimap.common.TranscriptDataHandler

Copyright © 2018 www.massapicom. 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.