public FeatureMapperV9_2() { super(new SimpleFeatureCalculator(true), new SimpleFeatureCalculator(false), new SortedGenotypeAgreementMapper(), //new MagnitudeFeatures(), // new QualityFeatures(), new ReadIndexFeatures(), new FractionDifferences4() ); } }
public float produceFeatureInternal(BaseInformationRecords.BaseInformationOrBuilder record, int featureIndex) { assert featureIndex >= 0 && featureIndex < MAX_GENOTYPES : "Only MAX_GENOTYPES features"; ObjectArrayList<? extends GenotypeCount> germlineCounts = getAllCounts(record, false, true); ObjectArrayList<? extends GenotypeCount> somaticCounts = getAllCounts(record, true, true); // note that we normalize the counts to frequency before substracting: int germlineCount = germlineCounts.get(featureIndex).totalCount(); int somaticCount = somaticCounts.get(featureIndex).totalCount(); float germFrequency = ((float) germlineCount / (float) totalCountsGermline); float somaticFrequency = ((float) somaticCount / (float) totalCountsSomatic); // then multiply again by somatic counts to reintroduce size effect: return (float) Math.max(0f,(somaticFrequency - germFrequency)); }
public float produceFeature(BaseInformationRecords.BaseInformationOrBuilder record, int featureIndex) { float producedFeat = produceFeatureInternal(record, featureIndex); return normalize(producedFeat, FRACTION_NORM); }
public void mapFeatures(BaseInformationRecords.BaseInformationOrBuilder record, INDArray inputs, int indexOfRecord) { indices[0] = indexOfRecord; for (int featureIndex = 0; featureIndex < numberOfFeatures(); featureIndex++) { indices[1] = featureIndex; inputs.putScalar(indices, produceFeature(record, featureIndex)); } }
public FeatureMapperV18() { super(new SimpleFeatureCalculator(true), new IndelFeatures(), new ReadIndexFeaturesFix(), new FractionDifferences4(), new MagnitudeFeatures2() ); } }
public void prepareToNormalize(BaseInformationRecords.BaseInformationOrBuilder record, int indexOfRecord) { totalCountsGermline = 1; totalCountsSomatic = 1; ObjectArrayList<? extends GenotypeCount> germlineCounts = getAllCounts(record, false, true); ObjectArrayList<? extends GenotypeCount> somaticCounts = getAllCounts(record, true, true); for (int i = 0; i < germlineCounts.size(); i++) { totalCountsGermline += (germlineCounts.get(i).totalCount()); totalCountsSomatic += (somaticCounts.get(i).totalCount()); } assert(totalCountsGermline>0):"0 total"; assert(totalCountsSomatic>0):"0 total"; }
public FeatureMapperV16() { super(new SimpleFeatureCalculator(true), new IndelFeatures(), new ReadIndexFeatures(), new FractionDifferences4(), new MagnitudeFeatures2() ); } }
public FeatureMapperV17() { super(new SimpleFeatureCalculator(true), new IndelFeatures(), new ReadIndexFeatures(), new FractionDifferences4(), new MagnitudeFeatures2(), new GenomicPositionMapper() ); } }
}, insertSize -> (float) Math.log10(insertSize)), new FractionDifferences4(), new MagnitudeFeatures2() ));
}, insertSize -> (float) Math.log10(insertSize)), new FractionDifferences4(), new MagnitudeFeatures2() ));
/** * 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)) ); }
new GenomicContextMapper(1, record -> recordTo(1, record, 3)), new ReadIndexFeaturesFix(), new FractionDifferences4(), new MagnitudeFeatures2(), new DensityMapper("numVariationsInRead", 20, sbiProperties, baseInformationOrBuilder ->
new GenomicContextMapper(1, record -> recordTo(1, record, 3)), new ReadIndexFeaturesFix(), new FractionDifferences4(), new MagnitudeFeatures2(), new DensityMapper("numVariationsInRead", 20, sbiProperties, baseInformationOrBuilder ->
new GenomicContextMapper(1, record -> recordTo(1, record, 3)), new ReadIndexFeaturesFix(), new FractionDifferences4(), new MagnitudeFeatures2(), new DensityMapper("numVariationsInRead", 20, sbiProperties, baseInformationOrBuilder ->
new GenomicContextMapper(1, record -> recordTo(1, record, 3)), new ReadIndexFeaturesFix(), new FractionDifferences4(), new MagnitudeFeatures2(), new DensityMapper("numVariationsInRead", 20, sbiProperties, baseInformationOrBuilder ->
new GenomicContextMapper(1, record -> recordTo(1, record, 3)), new ReadIndexFeaturesFix(), new FractionDifferences4(), new MagnitudeFeatures2(), new DensityMapper("numVariationsInRead", 20, sbiProperties, baseInformationOrBuilder ->