new SimpleFeatureCalculator(true), new IndelFeatures(), new GenomicContextMapper(sbiProperties), new GenomicContextMapper(1, record -> recordTo(1, record, 0)), new GenomicContextMapper(1, record -> recordTo(1, record, 1)), new GenomicContextMapper(1, record -> recordTo(1, record, 2)), new GenomicContextMapper(1, record -> recordTo(1, record, 3)), new ReadIndexFeaturesFix(), new FractionDifferences4(),
public GenomicContextMapper(int contextSize) { OneHotBaseFeatureMapper<BaseInformationRecords.BaseInformationOrBuilder>[] refContext = new OneHotBaseFeatureMapper[contextSize]; for (int i = 0; i < contextSize; i++) { refContext[i] = new OneHotBaseFeatureMapper<>(i, record -> trim(contextSize, record.getGenomicSequenceContext())); } delegate = new ConcatFeatureMapper<>(refContext); }
new SimpleFeatureCalculator(true), new IndelFeatures(), new GenomicContextMapper(sbiProperties), new GenomicContextMapper(1, record -> recordTo(1, record, 0)), new GenomicContextMapper(1, record -> recordTo(1, record, 1)), new GenomicContextMapper(1, record -> recordTo(1, record, 2)), new GenomicContextMapper(1, record -> recordTo(1, record, 3)), new ReadIndexFeaturesFix(), new FractionDifferences4(),
new SimpleFeatureCalculator(true), new IndelFeatures(), new GenomicContextMapper(sbiProperties), new GenomicContextMapper(1, record -> recordTo(1, record, 0)), new GenomicContextMapper(1, record -> recordTo(1, record, 1)), new GenomicContextMapper(1, record -> recordTo(1, record, 2)), new GenomicContextMapper(1, record -> recordTo(1, record, 3)), new ReadIndexFeaturesFix(), new FractionDifferences4(),
new SimpleFeatureCalculator(true), new IndelFeatures(), new GenomicContextMapper(sbiProperties), new GenomicContextMapper(1, record -> recordTo(1, record, 0)), new GenomicContextMapper(1, record -> recordTo(1, record, 1)), new GenomicContextMapper(1, record -> recordTo(1, record, 2)), new GenomicContextMapper(1, record -> recordTo(1, record, 3)), new ReadIndexFeaturesFix(), new FractionDifferences4(),
new SimpleFeatureCalculator(true), new IndelFeatures(), new GenomicContextMapper(sbiProperties), new GenomicContextMapper(1, record -> recordTo(1, record, 0)), new GenomicContextMapper(1, record -> recordTo(1, record, 1)), new GenomicContextMapper(1, record -> recordTo(1, record, 2)), new GenomicContextMapper(1, record -> recordTo(1, record, 3)), new ReadIndexFeaturesFix(), new FractionDifferences4(),
new SimpleFeatureCalculatorTrio(true), new IndelFeaturesTrio(), new GenomicContextMapper(sbiProperties), new GenomicContextMapper(1, record -> recordTo(1, record, 0)), new GenomicContextMapper(1, record -> recordTo(1, record, 1)), new GenomicContextMapper(1, record -> recordTo(1, record, 2)), new GenomicContextMapper(1, record -> recordTo(1, record, 3)), new ReadIndexFeaturesTrio(), new FractionDifferences4Trio(0),
firstBaseMappers[i] = new GenomicContextMapper(indelMappedLength, record -> { final String toSequence = record.getSamples(this.germlineIndex).getCounts(constantGenotypeIndex).getToSequence(); b, new GenomicContextMapper(indelMappedLength, record -> { final String fromSequence = record.getSamples(this.germlineIndex).getCounts(0).getFromSequence();
firstBaseMappers[i] = new GenomicContextMapper(indelMappedLength, record -> { final String toSequence = record.getSamples(this.somaticIndex).getCounts(constantGenotypeIndex).getToSequence(); a, b, new GenomicContextMapper(sbiProperties), new NamingConcatFeatureMapper<BaseInformationRecords.BaseInformationOrBuilder>(matchesRefMappers), new NamingConcatFeatureMapper<BaseInformationRecords.BaseInformationOrBuilder>(originalGobyCountIndexMappers),
/** * 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)) ); }
/** * 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)) ); }
readIndexMappers[i] = (new SingleReadIndexCountMapper(sampleIndex, i, true)); matchesRefMappers[i] = (new MatchesReferenceMapper(sampleIndex, i)); firstBaseMappers[i] = new GenomicContextMapper(1, record -> record.getSamples(this.sampleIndex).getCounts(constantGenotypeIndex).getToSequence().substring(0,1)); genotypeIndex++; new MaxNormalizationMapper<BaseInformationRecords.BaseInformationOrBuilder>( new NamingConcatFeatureMapper<BaseInformationRecords.BaseInformationOrBuilder>(readIndexMappers)), new GenomicContextMapper(sbiProperties), new DensityMapper("numVariationsInRead", 20, sbiProperties, baseInformationOrBuilder -> TraversalHelper.forSampleCounts(sampleIndex, baseInformationOrBuilder, BaseInformationRecords.CountInfo::getNumVariationsInReadsList)),
readIndexMappers[i] = (new SingleReadIndexCountMapper(sampleIndex, i, true)); matchesRefMappers[i] = (new MatchesReferenceMapper(sampleIndex, i)); firstBaseMappers[i] = new GenomicContextMapper(1, record -> record.getSamples(this.sampleIndex).getCounts(constantGenotypeIndex).getToSequence().substring(0,1)); genotypeIndex++; new MaxNormalizationMapper<BaseInformationRecords.BaseInformationOrBuilder>( new NamingConcatFeatureMapper<BaseInformationRecords.BaseInformationOrBuilder>(readIndexMappers)), new GenomicContextMapper(sbiProperties), new DensityMapper("numVariationsInRead", 20, sbiProperties, baseInformationOrBuilder -> TraversalHelper.forSampleCounts(sampleIndex, baseInformationOrBuilder, BaseInformationRecords.CountInfo::getNumVariationsInReadsList)),
readIndexMappers[i] = (new SingleReadIndexCountMapper(sampleIndex, i, true)); matchesRefMappers[i] = (new MatchesReferenceMapper(sampleIndex, i)); firstBaseMappers[i] = new GenomicContextMapper(1, record -> record.getSamples(this.sampleIndex).getCounts(constantGenotypeIndex).getToSequence().substring(0, 1)); numVariationsInReadMappers[i] = new DensityMapper("numVariationsInRead", new InverseNormalizationMapper<BaseInformationRecords.BaseInformationOrBuilder>( new NamingConcatFeatureMapper<BaseInformationRecords.BaseInformationOrBuilder>(readIndexMappers)), new GenomicContextMapper(sbiProperties), new NamingConcatFeatureMapper<BaseInformationRecords.BaseInformationOrBuilder>(matchesRefMappers), new NamingConcatFeatureMapper<BaseInformationRecords.BaseInformationOrBuilder>(numVariationsInReadMappers),
readIndexMappers[i] = (new SingleReadIndexCountMapper(sampleIndex, i, true)); matchesRefMappers[i] = (new MatchesReferenceMapper(sampleIndex, i)); firstBaseMappers[i] = new GenomicContextMapper(1, record -> record.getSamples(this.sampleIndex).getCounts(constantGenotypeIndex).getToSequence().substring(0, 1)); numVariationsInReadMappers[i] = new DensityMapper("numVariationsInRead", new MaxNormalizationMapper<BaseInformationRecords.BaseInformationOrBuilder>( new NamingConcatFeatureMapper<BaseInformationRecords.BaseInformationOrBuilder>(readIndexMappers)), new GenomicContextMapper(sbiProperties), new NamingConcatFeatureMapper<BaseInformationRecords.BaseInformationOrBuilder>(matchesRefMappers), new NamingConcatFeatureMapper<BaseInformationRecords.BaseInformationOrBuilder>(numVariationsInReadMappers),
matchesRefMappers[i] = (new MatchesReferenceMapper(sampleIndex, i)); firstBaseMappers[i] = new GenomicContextMapper(indelMappedLength, record -> { final String toSequence = record.getSamples(this.sampleIndex).getCounts(constantGenotypeIndex).getToSequence(); new CountReorderingMapper(sampleIndex, new NamingConcatFeatureMapper<>( new GenomicContextMapper(indelMappedLength, record -> { final String fromSequence = record.getSamples(this.sampleIndex).getCounts(0).getFromSequence();
new MeanNormalizationMapper<BaseInformationRecords.BaseInformationOrBuilder>( new NamingConcatFeatureMapper<BaseInformationRecords.BaseInformationOrBuilder>(readIndexMappers)), new GenomicContextMapper(sbiProperties), new DensityMapper("numVariationsInRead", 20, sbiProperties, baseInformationOrBuilder -> TraversalHelper.forSampleCounts(sampleIndex, baseInformationOrBuilder, BaseInformationRecords.CountInfo::getNumVariationsInReadsList)),
firstBaseMappers[i] = new GenomicContextMapper(indelMappedLength, record -> { final String toSequence = record.getSamples(sampleIndex).getCounts(constantGenotypeIndex).getToSequence(); new GenomicContextMapper(indelMappedLength, record -> { final String fromSequence = record.getSamples(this.sampleIndex).getCounts(0).getFromSequence();
new MaxNormalizationMapper<BaseInformationRecords.BaseInformationOrBuilder>( new NamingConcatFeatureMapper<BaseInformationRecords.BaseInformationOrBuilder>(readIndexMappers)), new GenomicContextMapper(sbiProperties), new DensityMapper("numVariationsInRead", 20, sbiProperties, baseInformationOrBuilder -> TraversalHelper.forSampleCounts(sampleIndex, baseInformationOrBuilder, BaseInformationRecords.CountInfo::getNumVariationsInReadsList)),
readIndexMappers[i] = (new SingleReadIndexCountMapper(sampleIndex, i, true)); firstBaseMappers[i] = new GenomicContextMapper(indelMappedLength, record -> { final String toSequence = record.getSamples(this.sampleIndex).getCounts(constantGenotypeIndex).getToSequence(); new CountReorderingMapper(sampleIndex, new NamingConcatFeatureMapper<>( new GenomicContextMapper(indelMappedLength, record -> { final String fromSequence = record.getSamples(this.sampleIndex).getCounts(0).getFromSequence();