Source:
private static void writeLogNormalsReducedPanel(final File outFile, final ReadCountCollection readCounts, final ReductionResult reduction, final JavaSparkContext ctx) { try (final HDF5File file = new HDF5File(outFile, HDF5File.OpenMode.READ_WRITE)) { final HDF5PoN pon = new HDF5PoN(file); logger.info("Setting reduced sample names ..."); pon.setPanelSampleNames(readCounts.columnNames()); logger.info("Setting reduced target names ..."); pon.setPanelTargetNames(readCounts.targets().stream() .map(Target::getName) .collect(Collectors.toList())); logger.info("Setting log-normal counts (" + readCounts.counts().getRowDimension() + " x " + readCounts.counts().getColumnDimension() + ") (T) ..."); pon.setLogNormalCounts(readCounts.counts()); logger.info("Setting log-normal pinv (" + reduction.getPseudoInverse().getRowDimension() + " x " + reduction.getPseudoInverse().getColumnDimension() + ") ..."); pon.setLogNormalPInverseCounts(reduction.getPseudoInverse()); logger.info("Setting reduced panel (" + reduction.getReducedCounts().getRowDimension() + " x " + reduction.getReducedCounts().getColumnDimension() + ") (T) ..."); pon.setReducedPanelCounts(reduction.getReducedCounts()); logger.info("Setting reduced panel pinv (" + reduction.getReducedInverse().getRowDimension() + " x " + reduction.getReducedInverse().getColumnDimension() + ") ..."); pon.setReducedPanelPInverseCounts(reduction.getReducedInverse()); logger.info("Setting reduced targets ..."); pon.setPanelTargets(readCounts.targets()); logger.info("Setting version number (" + CURRENT_PON_VERSION + ")..."); pon.setVersion(CURRENT_PON_VERSION); logger.info("Calculating and writing the target variances..."); final double[] targetVariances = createTargetVariance(pon, ctx); pon.setTargetVariances(targetVariances); } }

Target:
private static void writeLogNormalsReducedPanel(final File outFile, final ReadCountCollection readCounts, final ReductionResult reduction, final JavaSparkContext ctx) { try (final HDF5File file = new HDF5File(outFile, HDF5File.OpenMode.READ_WRITE)) { final HDF5PoN pon = new HDF5PoN(file); logger.info("Setting reduced sample names ..."); pon.setPanelSampleNames(readCounts.columnNames()); logger.info("Setting reduced target names ..."); pon.setPanelTargetNames(readCounts.targets().stream() .map(Target::getName) .collect(Collectors.toList())); logger.info("Setting log-normal counts (" + readCounts.counts().getRowDimension() + " x " + readCounts.counts().getColumnDimension() + ") (T) ..."); pon.setLogNormalCounts(readCounts.counts()); logger.info("Setting log-normal pinv (" + reduction.getPseudoInverse().getRowDimension() + " x " + reduction.getPseudoInverse().getColumnDimension() + ") ..."); pon.setLogNormalPInverseCounts(reduction.getPseudoInverse()); logger.info("Setting reduced panel counts (" + reduction.getReducedCounts().getRowDimension() + " x " + reduction.getReducedCounts().getColumnDimension() + ") (T) ..."); pon.setReducedPanelCounts(reduction.getReducedCounts()); logger.info("Setting reduced panel pinv (" + reduction.getReducedInverse().getRowDimension() + " x " + reduction.getReducedInverse().getColumnDimension() + ") ..."); pon.setReducedPanelPInverseCounts(reduction.getReducedInverse()); logger.info("Setting reduced panel targets ..."); pon.setPanelTargets(readCounts.targets()); logger.info("Setting version number (" + CURRENT_PON_VERSION + ")..."); pon.setVersion(CURRENT_PON_VERSION); logger.info("Calculating and writing the target variances..."); final double[] targetVariances = createTargetVariance(pon, ctx); pon.setTargetVariances(targetVariances); } }