/** * Project all of the normals used to create the PoN into the reduced panel. * * @param pon Not {@code null}. * @param ctx Spark context, {@code null} indicates no spark context available, which is * supported. * @return never {@code null}. Result will contain multiple columns in each of the * ReadCountCollection attributes. */ public static TangentNormalizationResult tangentNormalizeNormalsInPoN( final PoN pon, final JavaSparkContext ctx) { // Get the list of sample names in a modifiable List final List<String> sampleNamesCopy = new ArrayList<>(pon.getSampleNames()); logger.info("Loading normalized counts..."); final ReadCountCollection coverageProfile = new ReadCountCollection( SetUniqueList.setUniqueList(pon.getTargets()), SetUniqueList.setUniqueList(sampleNamesCopy), pon.getNormalizedCounts()); logger.info("Tangent normalizing the normals (normalized by target factors) ..."); // For each sample in the PoN, tangent normalize against the qc reduced PoN. return TangentNormalizer.tangentNormalize(pon, coverageProfile, ctx); }