/** * Configure the feature mapper for a specific set of sbi files. This method accesses the properties of the reader. * * @param sbiProperties properties from an sbi reader. */ public void configure(Properties sbiProperties) { delegate = new NamingConcatFeatureMapper<>(new SimpleFeatureCalculator(true), new IndelFeatures(), new GenomicContextMapper(sbiProperties), new ReadIndexFeaturesFix(), new FractionDifferences4(), new MagnitudeFeatures2(), new DensityMapper("numVariationsInRead", 10, sbiProperties, baseInformationOrBuilder -> TraversalHelper.forAllSampleCounts(baseInformationOrBuilder, BaseInformationRecords.CountInfo::getNumVariationsInReadsList)), new DensityMapper("readMappingQuality.forward", 10, sbiProperties, baseInformationOrBuilder -> TraversalHelper.forAllSampleCounts(baseInformationOrBuilder, BaseInformationRecords.CountInfo::getReadMappingQualityForwardStrandList)), new DensityMapper("readMappingQuality.reverse", 10, sbiProperties, baseInformationOrBuilder -> TraversalHelper.forAllSampleCounts(baseInformationOrBuilder, BaseInformationRecords.CountInfo::getReadMappingQualityReverseStrandList)), new DensityMapper("baseQuality.forward", 10, sbiProperties, baseInformationOrBuilder -> TraversalHelper.forAllSampleCounts(baseInformationOrBuilder, BaseInformationRecords.CountInfo::getQualityScoresForwardStrandList)), new DensityMapper("baseQuality.reverse", 10, sbiProperties, baseInformationOrBuilder -> TraversalHelper.forAllSampleCounts(baseInformationOrBuilder, BaseInformationRecords.CountInfo::getQualityScoresReverseStrandList)) ); }
/** * @param name * @param numBins number of bins to represent this density with. If -1, use a bin for every increment between minValue and maxValue. * @param sbiProperties * @param recordToValues * @param valueFunction */ public DensityMapper(String name, int numBins, Properties sbiProperties, Function<BaseInformationRecords.BaseInformationOrBuilder, List<BaseInformationRecords.NumberWithFrequency>> recordToValues, Function<Integer, Float> valueFunction) { if (!propertiesPresent(sbiProperties, "stats." + name)) { throw new UnsupportedOperationException("The sbip file does not contain the statistics for " + name + " (stats." + name + ".min and stats." + name + ".max)"); } this.minValue = (int)getMin(sbiProperties, "stats." + name); this.maxValue = (int)getMax(sbiProperties, "stats." + name); constructorHelper(name,numBins,recordToValues,valueFunction); }
@Override public void mapFeatures(BaseInformationRecords.BaseInformationOrBuilder record, INDArray inputs, int indexOfRecord) { mapFeatures(record, bins, 0, indexOfRecord); for (int featureIndex = 0; featureIndex < numberOfFeatures(); featureIndex++) { indices[1] = featureIndex; inputs.putScalar(indices, bins[featureIndex]); } }
/** * Configure the feature mapper for a specific set of sbi files. This method accesses the properties of the reader. * * @param sbiProperties properties from an sbi reader. */ public void configure(Properties sbiProperties) { delegate = new NamingConcatFeatureMapper<BaseInformationRecords.BaseInformationOrBuilder>( new SimpleFeatureCalculator(true), new IndelFeatures(), new GenomicContextMapper(sbiProperties), new ReadIndexFeaturesFix(), new FractionDifferences4(), new MagnitudeFeatures2(), new DensityMapper("numVariationsInRead", 20, sbiProperties, baseInformationOrBuilder -> TraversalHelper.forSampleCounts(sampleIndex,baseInformationOrBuilder, BaseInformationRecords.CountInfo::getNumVariationsInReadsList)), new DensityMapper("readMappingQuality.forward", 10, sbiProperties, baseInformationOrBuilder -> TraversalHelper.forSampleCounts(sampleIndex,baseInformationOrBuilder, BaseInformationRecords.CountInfo::getReadMappingQualityForwardStrandList)), new DensityMapper("readMappingQuality.reverse", 10, sbiProperties, baseInformationOrBuilder -> TraversalHelper.forSampleCounts(sampleIndex,baseInformationOrBuilder, BaseInformationRecords.CountInfo::getReadMappingQualityReverseStrandList)), new DensityMapper("baseQuality.forward", 10, sbiProperties, baseInformationOrBuilder -> TraversalHelper.forSampleCounts(sampleIndex,baseInformationOrBuilder, BaseInformationRecords.CountInfo::getQualityScoresForwardStrandList)), new DensityMapper("baseQuality.reverse", 10, sbiProperties, baseInformationOrBuilder -> TraversalHelper.forSampleCounts(sampleIndex,baseInformationOrBuilder, BaseInformationRecords.CountInfo::getQualityScoresReverseStrandList)) ); }
public DensityMapper(String name1, String name2, int numBins, Properties sbiProperties, Function<BaseInformationRecords.BaseInformationOrBuilder, List<BaseInformationRecords.NumberWithFrequency>> recordToValues, Function<Integer, Float> valueFunction ) { if (!propertiesPresent(sbiProperties, "stats." + name1)) { throw new UnsupportedOperationException("The sbip file does not contain the statistics for " + name1 + " (stats." + name1 + ".min and stats." + name1 + ".max)"); } if (!propertiesPresent(sbiProperties, "stats." + name2)) { throw new UnsupportedOperationException("The sbip file does not contain the statistics for " + name2 + " (stats." + name2 + ".min and stats." + name2 + ".max)"); } //extend range to handle two fields this.minValue = Math.min((int)getMin(sbiProperties, "stats." + name1),(int)getMin(sbiProperties, "stats." + name2)); this.maxValue = Math.max((int)getMax(sbiProperties, "stats." + name1),(int)getMax(sbiProperties, "stats." + name2)); StringBuffer common = new StringBuffer(name1); int i = 0; for (i = 0; i < Math.min(name1.length(),name2.length()); i++){ if (!(name1.charAt(i) == name2.charAt(i))){ break; } } common.append("+" + name2.substring(i)); constructorHelper(common.toString(),numBins,recordToValues,valueFunction); }
new NamingConcatFeatureMapper<BaseInformationRecords.BaseInformationOrBuilder>(firstBaseMappers), new DensityMapper("numVariationsInRead", 10, sbiProperties, record -> TraversalHelper.forAllSampleCounts(record, BaseInformationRecords.CountInfoOrBuilder::getNumVariationsInReadsList)), new DensityMapper("readMappingQuality.forward", 10, sbiProperties, baseInformationOrBuilder -> TraversalHelper.forNSampleCounts(sampleIndices, baseInformationOrBuilder, BaseInformationRecords.CountInfo::getReadMappingQualityForwardStrandList)), new DensityMapper("readMappingQuality.reverse", 10, sbiProperties, baseInformationOrBuilder -> TraversalHelper.forNSampleCounts(sampleIndices, baseInformationOrBuilder, BaseInformationRecords.CountInfo::getReadMappingQualityReverseStrandList)), new DensityMapper("baseQuality.forward", 10, sbiProperties, baseInformationOrBuilder -> TraversalHelper.forNSampleCounts(sampleIndices, baseInformationOrBuilder, BaseInformationRecords.CountInfo::getQualityScoresForwardStrandList)), new DensityMapper("baseQuality.reverse", 10, sbiProperties, baseInformationOrBuilder -> TraversalHelper.forNSampleCounts(sampleIndices, baseInformationOrBuilder, BaseInformationRecords.CountInfo::getQualityScoresReverseStrandList)), new DensityMapper("insertSizes", 10, sbiProperties, (BaseInformationRecords.BaseInformationOrBuilder baseInformationOrBuilder) -> { return TraversalHelper.forNSampleCounts(sampleIndices, baseInformationOrBuilder, BaseInformationRecords.CountInfo::getInsertSizesList); },
new FractionDifferences4(), new MagnitudeFeatures2(), new DensityMapper("numVariationsInRead", 20, sbiProperties, baseInformationOrBuilder -> TraversalHelper.forAllSampleCounts(baseInformationOrBuilder, BaseInformationRecords.CountInfo::getNumVariationsInReadsList)), new DensityMapper("readMappingQuality.forward", 10, sbiProperties, baseInformationOrBuilder -> TraversalHelper.forAllSampleCounts(baseInformationOrBuilder, BaseInformationRecords.CountInfo::getReadMappingQualityForwardStrandList)), new DensityMapper("readMappingQuality.reverse", 10, sbiProperties, baseInformationOrBuilder -> TraversalHelper.forAllSampleCounts(baseInformationOrBuilder, BaseInformationRecords.CountInfo::getReadMappingQualityReverseStrandList)), new DensityMapper("baseQuality.forward", 10, sbiProperties, baseInformationOrBuilder -> TraversalHelper.forAllSampleCounts(baseInformationOrBuilder, BaseInformationRecords.CountInfo::getQualityScoresForwardStrandList)), new DensityMapper("baseQuality.reverse", 10, sbiProperties, baseInformationOrBuilder -> TraversalHelper.forAllSampleCounts(baseInformationOrBuilder, BaseInformationRecords.CountInfo::getQualityScoresReverseStrandList)), new DensityMapper("insertSizes", 10, sbiProperties, (BaseInformationRecords.BaseInformationOrBuilder baseInformationOrBuilder) -> { return TraversalHelper.forAllSampleCounts(baseInformationOrBuilder, BaseInformationRecords.CountInfo::getInsertSizesList); },
new NamingConcatFeatureMapper<BaseInformationRecords.BaseInformationOrBuilder>(readIndexMappers)), new GenomicContextMapper(sbiProperties), new DensityMapper("numVariationsInRead", 20, sbiProperties, baseInformationOrBuilder -> TraversalHelper.forSampleCounts(sampleIndex, baseInformationOrBuilder, BaseInformationRecords.CountInfo::getNumVariationsInReadsList)), new DensityMapper("readMappingQuality.forward", 10, sbiProperties, baseInformationOrBuilder -> TraversalHelper.forSampleCounts(sampleIndex, baseInformationOrBuilder, BaseInformationRecords.CountInfo::getReadMappingQualityForwardStrandList)), new DensityMapper("readMappingQuality.reverse", 10, sbiProperties, baseInformationOrBuilder -> TraversalHelper.forSampleCounts(sampleIndex, baseInformationOrBuilder, BaseInformationRecords.CountInfo::getReadMappingQualityReverseStrandList)), new DensityMapper("baseQuality.forward", 10, sbiProperties, baseInformationOrBuilder -> TraversalHelper.forSampleCounts(sampleIndex, baseInformationOrBuilder, BaseInformationRecords.CountInfo::getQualityScoresForwardStrandList)), new DensityMapper("baseQuality.reverse", 10, sbiProperties, baseInformationOrBuilder -> TraversalHelper.forSampleCounts(sampleIndex, baseInformationOrBuilder, BaseInformationRecords.CountInfo::getQualityScoresReverseStrandList)) ));
new NamingConcatFeatureMapper<BaseInformationRecords.BaseInformationOrBuilder>(readIndexMappers)), new GenomicContextMapper(sbiProperties), new DensityMapper("numVariationsInRead", 20, sbiProperties, baseInformationOrBuilder -> TraversalHelper.forSampleCounts(sampleIndex, baseInformationOrBuilder, BaseInformationRecords.CountInfo::getNumVariationsInReadsList)), new DensityMapper("readMappingQuality.forward", 10, sbiProperties, baseInformationOrBuilder -> TraversalHelper.forSampleCounts(sampleIndex, baseInformationOrBuilder, BaseInformationRecords.CountInfo::getReadMappingQualityForwardStrandList)), new DensityMapper("readMappingQuality.reverse", 10, sbiProperties, baseInformationOrBuilder -> TraversalHelper.forSampleCounts(sampleIndex, baseInformationOrBuilder, BaseInformationRecords.CountInfo::getReadMappingQualityReverseStrandList)), new DensityMapper("baseQuality.forward", 10, sbiProperties, baseInformationOrBuilder -> TraversalHelper.forSampleCounts(sampleIndex, baseInformationOrBuilder, BaseInformationRecords.CountInfo::getQualityScoresForwardStrandList)), new DensityMapper("baseQuality.reverse", 10, sbiProperties, baseInformationOrBuilder -> TraversalHelper.forSampleCounts(sampleIndex, baseInformationOrBuilder, BaseInformationRecords.CountInfo::getQualityScoresReverseStrandList))
new NamingConcatFeatureMapper<BaseInformationRecords.BaseInformationOrBuilder>(firstBaseMappers), new DensityMapper("numVariationsInRead", 10, sbiProperties, record -> TraversalHelper.forAllSampleCounts(record, BaseInformationRecords.CountInfoOrBuilder::getNumVariationsInReadsList)), new DensityMapper("readMappingQuality.forward", 10, sbiProperties, baseInformationOrBuilder -> TraversalHelper.forNSampleCounts(sampleIndices, baseInformationOrBuilder, BaseInformationRecords.CountInfo::getReadMappingQualityForwardStrandList)), new DensityMapper("readMappingQuality.reverse", 10, sbiProperties, baseInformationOrBuilder -> TraversalHelper.forNSampleCounts(sampleIndices, baseInformationOrBuilder, BaseInformationRecords.CountInfo::getReadMappingQualityReverseStrandList)), new DensityMapper("baseQuality.forward", 10, sbiProperties, baseInformationOrBuilder -> TraversalHelper.forNSampleCounts(sampleIndices, baseInformationOrBuilder, BaseInformationRecords.CountInfo::getQualityScoresForwardStrandList)), new DensityMapper("baseQuality.reverse", 10, sbiProperties, baseInformationOrBuilder -> TraversalHelper.forNSampleCounts(sampleIndices, baseInformationOrBuilder, BaseInformationRecords.CountInfo::getQualityScoresReverseStrandList)), new DensityMapper("insertSizes", 10, sbiProperties, (BaseInformationRecords.BaseInformationOrBuilder baseInformationOrBuilder) -> { return TraversalHelper.forNSampleCounts(sampleIndices, baseInformationOrBuilder, BaseInformationRecords.CountInfo::getInsertSizesList); },
new FractionDifferences4(), new MagnitudeFeatures2(), new DensityMapper("numVariationsInRead", 20, sbiProperties, baseInformationOrBuilder -> TraversalHelper.forAllSampleCounts(baseInformationOrBuilder, BaseInformationRecords.CountInfo::getNumVariationsInReadsList)), new DensityMapper("readMappingQuality.forward", 10, sbiProperties, baseInformationOrBuilder -> TraversalHelper.forAllSampleCounts(baseInformationOrBuilder, BaseInformationRecords.CountInfo::getReadMappingQualityForwardStrandList)), new DensityMapper("readMappingQuality.reverse", 10, sbiProperties, baseInformationOrBuilder -> TraversalHelper.forAllSampleCounts(baseInformationOrBuilder, BaseInformationRecords.CountInfo::getReadMappingQualityReverseStrandList)), new DensityMapper("baseQuality.forward", 10, sbiProperties, baseInformationOrBuilder -> TraversalHelper.forAllSampleCounts(baseInformationOrBuilder, BaseInformationRecords.CountInfo::getQualityScoresForwardStrandList)), new DensityMapper("baseQuality.reverse", 10, sbiProperties, baseInformationOrBuilder -> TraversalHelper.forAllSampleCounts(baseInformationOrBuilder, BaseInformationRecords.CountInfo::getQualityScoresReverseStrandList)), new DensityMapper("insertSizes", 10, sbiProperties, (BaseInformationRecords.BaseInformationOrBuilder baseInformationOrBuilder) -> { return TraversalHelper.forAllSampleCounts(baseInformationOrBuilder, BaseInformationRecords.CountInfo::getInsertSizesList); },
new FractionDifferences4(), new MagnitudeFeatures2(), new DensityMapper("numVariationsInRead", 20, sbiProperties, baseInformationOrBuilder -> TraversalHelper.forAllSampleCounts(baseInformationOrBuilder, BaseInformationRecords.CountInfo::getNumVariationsInReadsList)), new DensityMapper("readMappingQuality.forward", 10, sbiProperties, baseInformationOrBuilder -> TraversalHelper.forAllSampleCounts(baseInformationOrBuilder, BaseInformationRecords.CountInfo::getReadMappingQualityForwardStrandList)), new DensityMapper("readMappingQuality.reverse", 10, sbiProperties, baseInformationOrBuilder -> TraversalHelper.forAllSampleCounts(baseInformationOrBuilder, BaseInformationRecords.CountInfo::getReadMappingQualityReverseStrandList)), new DensityMapper("baseQuality.forward", 10, sbiProperties, baseInformationOrBuilder -> TraversalHelper.forAllSampleCounts(baseInformationOrBuilder, BaseInformationRecords.CountInfo::getQualityScoresForwardStrandList)), new DensityMapper("baseQuality.reverse", 10, sbiProperties, baseInformationOrBuilder -> TraversalHelper.forAllSampleCounts(baseInformationOrBuilder, BaseInformationRecords.CountInfo::getQualityScoresReverseStrandList)), new DensityMapper("insertSizes", 10, sbiProperties, (BaseInformationRecords.BaseInformationOrBuilder baseInformationOrBuilder) -> { return TraversalHelper.forAllSampleCounts(baseInformationOrBuilder, BaseInformationRecords.CountInfo::getInsertSizesList); },
new FractionDifferences4Trio(1), new MagnitudeFeatures2Trio(), new DensityMapper("numVariationsInRead", 20, sbiProperties, baseInformationOrBuilder -> TraversalHelper.forAllSampleCounts(baseInformationOrBuilder, BaseInformationRecords.CountInfo::getNumVariationsInReadsList)), new DensityMapper("readMappingQuality.forward", 10, sbiProperties, baseInformationOrBuilder -> TraversalHelper.forAllSampleCounts(baseInformationOrBuilder, BaseInformationRecords.CountInfo::getReadMappingQualityForwardStrandList)), new DensityMapper("readMappingQuality.reverse", 10, sbiProperties, baseInformationOrBuilder -> TraversalHelper.forAllSampleCounts(baseInformationOrBuilder, BaseInformationRecords.CountInfo::getReadMappingQualityReverseStrandList)), new DensityMapper("baseQuality.forward", 10, sbiProperties, baseInformationOrBuilder -> TraversalHelper.forAllSampleCounts(baseInformationOrBuilder, BaseInformationRecords.CountInfo::getQualityScoresForwardStrandList)), new DensityMapper("baseQuality.reverse", 10, sbiProperties, baseInformationOrBuilder -> TraversalHelper.forAllSampleCounts(baseInformationOrBuilder, BaseInformationRecords.CountInfo::getQualityScoresReverseStrandList)), new DensityMapper("insertSizes", 10, sbiProperties, (BaseInformationRecords.BaseInformationOrBuilder baseInformationOrBuilder) -> { return TraversalHelper.forAllSampleCounts(baseInformationOrBuilder, BaseInformationRecords.CountInfo::getInsertSizesList); },
new NamingConcatFeatureMapper<BaseInformationRecords.BaseInformationOrBuilder>(readIndexMappers)), new GenomicContextMapper(sbiProperties), new DensityMapper("numVariationsInRead", 20, sbiProperties, baseInformationOrBuilder -> TraversalHelper.forSampleCounts(sampleIndex, baseInformationOrBuilder, BaseInformationRecords.CountInfo::getNumVariationsInReadsList)), new DensityMapper("readMappingQuality.forward", 10, sbiProperties, baseInformationOrBuilder -> TraversalHelper.forSampleCounts(sampleIndex, baseInformationOrBuilder, BaseInformationRecords.CountInfo::getReadMappingQualityForwardStrandList)), new DensityMapper("readMappingQuality.reverse", 10, sbiProperties, baseInformationOrBuilder -> TraversalHelper.forSampleCounts(sampleIndex, baseInformationOrBuilder, BaseInformationRecords.CountInfo::getReadMappingQualityReverseStrandList)), new DensityMapper("baseQuality.forward", 10, sbiProperties, baseInformationOrBuilder -> TraversalHelper.forSampleCounts(sampleIndex, baseInformationOrBuilder, BaseInformationRecords.CountInfo::getQualityScoresForwardStrandList)), new DensityMapper("baseQuality.reverse", 10, sbiProperties, baseInformationOrBuilder -> TraversalHelper.forSampleCounts(sampleIndex, baseInformationOrBuilder, BaseInformationRecords.CountInfo::getQualityScoresReverseStrandList))
new NamingConcatFeatureMapper<BaseInformationRecords.BaseInformationOrBuilder>(readIndexMappers)), new GenomicContextMapper(sbiProperties), new DensityMapper("numVariationsInRead", 20, sbiProperties, baseInformationOrBuilder -> TraversalHelper.forSampleCounts(sampleIndex, baseInformationOrBuilder, BaseInformationRecords.CountInfo::getNumVariationsInReadsList)), new DensityMapper("readMappingQuality.forward", 10, sbiProperties, baseInformationOrBuilder -> TraversalHelper.forSampleCounts(sampleIndex, baseInformationOrBuilder, BaseInformationRecords.CountInfo::getReadMappingQualityForwardStrandList)), new DensityMapper("readMappingQuality.reverse", 10, sbiProperties, baseInformationOrBuilder -> TraversalHelper.forSampleCounts(sampleIndex, baseInformationOrBuilder, BaseInformationRecords.CountInfo::getReadMappingQualityReverseStrandList)), new DensityMapper("baseQuality.forward", 10, sbiProperties, baseInformationOrBuilder -> TraversalHelper.forSampleCounts(sampleIndex, baseInformationOrBuilder, BaseInformationRecords.CountInfo::getQualityScoresForwardStrandList)), new DensityMapper("baseQuality.reverse", 10, sbiProperties, baseInformationOrBuilder -> TraversalHelper.forSampleCounts(sampleIndex, baseInformationOrBuilder, BaseInformationRecords.CountInfo::getQualityScoresReverseStrandList)) ));
new NamingConcatFeatureMapper<BaseInformationRecords.BaseInformationOrBuilder>(readIndexMappers)), new GenomicContextMapper(sbiProperties), new DensityMapper("numVariationsInRead", 20, sbiProperties, baseInformationOrBuilder -> TraversalHelper.forSampleCounts(sampleIndex, baseInformationOrBuilder, BaseInformationRecords.CountInfo::getNumVariationsInReadsList)), new DensityMapper("readMappingQuality.forward", 10, sbiProperties, baseInformationOrBuilder -> TraversalHelper.forSampleCounts(sampleIndex, baseInformationOrBuilder, BaseInformationRecords.CountInfo::getReadMappingQualityForwardStrandList)), new DensityMapper("readMappingQuality.reverse", 10, sbiProperties, baseInformationOrBuilder -> TraversalHelper.forSampleCounts(sampleIndex, baseInformationOrBuilder, BaseInformationRecords.CountInfo::getReadMappingQualityReverseStrandList)), new DensityMapper("baseQuality.forward", 10, sbiProperties, baseInformationOrBuilder -> TraversalHelper.forSampleCounts(sampleIndex, baseInformationOrBuilder, BaseInformationRecords.CountInfo::getQualityScoresForwardStrandList)), new DensityMapper("baseQuality.reverse", 10, sbiProperties, baseInformationOrBuilder -> TraversalHelper.forSampleCounts(sampleIndex, baseInformationOrBuilder, BaseInformationRecords.CountInfo::getQualityScoresReverseStrandList)) ));
new FractionDifferences4(), new MagnitudeFeatures2(), new DensityMapper("numVariationsInRead", 20, sbiProperties, baseInformationOrBuilder -> TraversalHelper.forAllSampleCounts(baseInformationOrBuilder, BaseInformationRecords.CountInfo::getNumVariationsInReadsList)), new DensityMapper("readMappingQuality.forward", 10, sbiProperties, baseInformationOrBuilder -> TraversalHelper.forAllSampleCounts(baseInformationOrBuilder, BaseInformationRecords.CountInfo::getReadMappingQualityForwardStrandList)), new DensityMapper("readMappingQuality.reverse", 10, sbiProperties, baseInformationOrBuilder -> TraversalHelper.forAllSampleCounts(baseInformationOrBuilder, BaseInformationRecords.CountInfo::getReadMappingQualityReverseStrandList)), new DensityMapper("baseQuality.forward", 10, sbiProperties, baseInformationOrBuilder -> TraversalHelper.forAllSampleCounts(baseInformationOrBuilder, BaseInformationRecords.CountInfo::getQualityScoresForwardStrandList)), new DensityMapper("baseQuality.reverse", 10, sbiProperties, baseInformationOrBuilder -> TraversalHelper.forAllSampleCounts(baseInformationOrBuilder, BaseInformationRecords.CountInfo::getQualityScoresReverseStrandList)) );
new FractionDifferences4(), new MagnitudeFeatures2(), new DensityMapper("numVariationsInRead", 20, sbiProperties, baseInformationOrBuilder -> TraversalHelper.forAllSampleCounts(baseInformationOrBuilder, BaseInformationRecords.CountInfo::getNumVariationsInReadsList)), new DensityMapper("readMappingQuality.forward", 10, sbiProperties, baseInformationOrBuilder -> TraversalHelper.forAllSampleCounts(baseInformationOrBuilder, BaseInformationRecords.CountInfo::getReadMappingQualityForwardStrandList)), new DensityMapper("readMappingQuality.reverse", 10, sbiProperties, baseInformationOrBuilder -> TraversalHelper.forAllSampleCounts(baseInformationOrBuilder, BaseInformationRecords.CountInfo::getReadMappingQualityReverseStrandList)), new DensityMapper("baseQuality.forward", 10, sbiProperties, baseInformationOrBuilder -> TraversalHelper.forAllSampleCounts(baseInformationOrBuilder, BaseInformationRecords.CountInfo::getQualityScoresForwardStrandList)), new DensityMapper("baseQuality.reverse", 10, sbiProperties, baseInformationOrBuilder -> TraversalHelper.forAllSampleCounts(baseInformationOrBuilder, BaseInformationRecords.CountInfo::getQualityScoresReverseStrandList)) );
new NamingConcatFeatureMapper<BaseInformationRecords.BaseInformationOrBuilder>(readIndexMappers)), new GenomicContextMapper(sbiProperties), new DensityMapper("numVariationsInRead", 20, sbiProperties, baseInformationOrBuilder -> TraversalHelper.forSampleCounts(sampleIndex, baseInformationOrBuilder, BaseInformationRecords.CountInfo::getNumVariationsInReadsList)), new DensityMapper("readMappingQuality.forward", 10, sbiProperties, baseInformationOrBuilder -> TraversalHelper.forSampleCounts(sampleIndex, baseInformationOrBuilder, BaseInformationRecords.CountInfo::getReadMappingQualityForwardStrandList)), new DensityMapper("readMappingQuality.reverse", 10, sbiProperties, baseInformationOrBuilder -> TraversalHelper.forSampleCounts(sampleIndex, baseInformationOrBuilder, BaseInformationRecords.CountInfo::getReadMappingQualityReverseStrandList)), new DensityMapper("baseQuality.forward", 10, sbiProperties, baseInformationOrBuilder -> TraversalHelper.forSampleCounts(sampleIndex, baseInformationOrBuilder, BaseInformationRecords.CountInfo::getQualityScoresForwardStrandList)), new DensityMapper("baseQuality.reverse", 10, sbiProperties, baseInformationOrBuilder -> TraversalHelper.forSampleCounts(sampleIndex, baseInformationOrBuilder, BaseInformationRecords.CountInfo::getQualityScoresReverseStrandList))
firstBaseMappers[i] = new GenomicContextMapper(1, record -> record.getSamples(this.sampleIndex).getCounts(constantGenotypeIndex).getToSequence().substring(0, 1)); numVariationsInReadMappers[i] = new DensityMapper("numVariationsInRead", 10, sbiProperties, baseInformationOrBuilder -> TraversalHelper.forOneSampleGenotype(sampleIndex, constantGenotypeIndex, baseInformationOrBuilder, BaseInformationRecords.CountInfo::getNumVariationsInReadsList)); distancesToReadVariations[i] = new DensityMapper("distancesToReadVariations.forward","distancesToReadVariations.reverse", 10, sbiProperties, baseInformationOrBuilder -> readMappingQualityMappers[i] = new DensityMapper("readMappingQuality.forward", 10, sbiProperties, baseInformationOrBuilder -> TraversalHelper.forOneSampleGenotype(sampleIndex, constantGenotypeIndex, baseInformationOrBuilder, BaseInformationRecords.CountInfo::getReadMappingQualityForwardStrandList)); baseQualityMappers[i] = new DensityMapper("baseQuality.forward", 10, sbiProperties, baseInformationOrBuilder -> TraversalHelper.forOneSampleGenotype(sampleIndex, constantGenotypeIndex, baseInformationOrBuilder, BaseInformationRecords.CountInfo::getQualityScoresForwardStrandList)); targetAlignedLengthMappers[i] = new DensityMapper("targetAlignedLength", 10, sbiProperties, baseInformationOrBuilder -> TraversalHelper.forOneSampleGenotype(sampleIndex, constantGenotypeIndex, baseInformationOrBuilder, BaseInformationRecords.CountInfo::getTargetAlignedLengthsList)); queryAlignedLengthMappers[i] = new DensityMapper("queryAlignedLength", 10, sbiProperties, baseInformationOrBuilder ->