public FeatureMapperV3SOld() { super( new SimpleFeatureCalculator(true), new SimpleFeatureCalculator(false) ); } }
public float produceFeatureInternal(BaseInformationRecords.BaseInformationOrBuilder record, int featureIndex) { assert (featureIndex >= 0 && featureIndex < AbstractFeatureMapper.MAX_GENOTYPES * 2 * 2) : "Only MAX_GENOTYPES*2*2 features"; if (featureIndex < AbstractFeatureMapper.MAX_GENOTYPES * 2) { // germline counts written first: if ((featureIndex % 2) == 1) { // odd featureIndices are forward strand: return getAllCounts(record, false, sort).get(featureIndex / 2).forwardCount; } else { return getAllCounts(record, false, sort).get(featureIndex / 2).reverseCount; } } else { // tumor counts written next: featureIndex -= AbstractFeatureMapper.MAX_GENOTYPES * 2; if ((featureIndex % 2) == 1) { // odd featureIndices are forward strand: return getAllCounts(record, true, sort).get(featureIndex / 2).forwardCount; } else { return getAllCounts(record, true, sort).get(featureIndex / 2).reverseCount; } } }
@Override public void mapFeatures(BaseInformationRecords.BaseInformationOrBuilder record, INDArray inputs, int indexOfRecord) { assert normalized : "prepareToNormalize must be called before mapFeatures."; indices[0] = indexOfRecord; final float[] buffer = getBuffer(); mapFeatures(record, buffer, 0, indexOfRecord); for (int featureIndex = 0; featureIndex < numberOfFeatures(); featureIndex++) { indices[1] = featureIndex; inputs.putScalar(indices, buffer[featureIndex]); } }
public void prepareToNormalize(BaseInformationRecords.BaseInformationOrBuilder record, int indexOfRecord) { indices[0] = indexOfRecord; sumCounts = 0; for (int featureIndex = 0; featureIndex < numberOfFeatures(); featureIndex++) { sumCounts += produceFeatureInternal(record, featureIndex); } normalized = true; }
public void mapFeatures(BaseInformationRecords.BaseInformationOrBuilder record, float[] inputs, int offset, int indexOfRecord) { assert normalized : "prepareToNormalize must be called before mapFeatures."; for (int featureIndex = 0; featureIndex < numberOfFeatures(); featureIndex++) { inputs[featureIndex + offset] = produceFeature(record, featureIndex); } }
public float produceFeature(BaseInformationRecords.BaseInformationOrBuilder record, int featureIndex) { return normalize(produceFeatureInternal(record, featureIndex), sumCounts); }
@Override public void mapLabels(BaseInformationRecords.BaseInformationOrBuilder record, INDArray labels, int indexOfRecord) { indices[0] = indexOfRecord; for (int labelIndex = 0; labelIndex < numberOfLabels(); labelIndex++) { indices[1] = labelIndex; labels.putScalar(indices, produceLabel(record, labelIndex)); } }
public FeatureMapperV2() { super(new SimpleFeatureCalculator(true), new MagnitudeFeatures()); } }
public FeatureMapperV9_2() { super(new SimpleFeatureCalculator(true), new SimpleFeatureCalculator(false), new SortedGenotypeAgreementMapper(), //new MagnitudeFeatures(), // new QualityFeatures(), new ReadIndexFeatures(), new FractionDifferences4() ); } }
public FeatureMapperV9() { super(new SimpleFeatureCalculator(true), new SimpleFeatureCalculator(false), new SortedGenotypeAgreementMapper(), //new MagnitudeFeatures(), // new QualityFeatures(), new ReadIndexFeatures(), new FractionDifferences2() ); } }
public FeatureMapperVT() { super(new SimpleFeatureCalculator(false), new SimpleFeatureCalculator(true), new MagnitudeFeatures(), new QualityFeatures(), new ReadIndexFeatures() ); } }
public FeatureMapperV3S() { super( new MagnitudeFeatures(), new SimpleFeatureCalculator(false),new MagnitudeFeatures(), new SimpleFeatureCalculator(true),new QualityFeatures() ); } }
public FeatureMapperV11() { super(new SimpleFeatureCalculator(false), new SimpleFeatureCalculator(true), new MagnitudeFeatures(), new QualityFeatures(), new ReadIndexFeatures(), new FractionDifferences2() ); } }
public FeatureMapperV10() { super(new SimpleFeatureCalculator(true), new SimpleFeatureCalculator(false), new SortedGenotypeAgreementMapper(), //new MagnitudeFeatures(), new QualityFeatures(), new ReadIndexFeatures(), new FractionDifferences2() ); } }
public FeatureMapperV3() { super(new SimpleFeatureCalculator(), new MagnitudeFeatures(), new QualityFeatures()); } }
public FeatureMapperV8() { super(new SimpleFeatureCalculator(true), new SortedGenotypeAgreementMapper(), //new MagnitudeFeatures(), // new QualityFeatures(), new ReadIndexFeatures(), new FractionDifferences2() ); } }
public FeatureMapperV12() { super(new SimpleFeatureCalculator(true), new IndelFeatures(), new ReadIndexFeatures(), new FractionDifferences2() ); } }
public FeatureMapperV5() { super(new MagnitudeFeatures(), new SimpleFeatureCalculator(false), new QualityFeatures(), new ReadIndexFeatures()); } }
public FeatureMapperV13() { super(new SimpleFeatureCalculator(true), new IndelFeatures(), new ReadIndexFeatures(), new FractionDifferences3(), new MagnitudeFeatures2() ); } }
public FeatureMapperV16() { super(new SimpleFeatureCalculator(true), new IndelFeatures(), new ReadIndexFeatures(), new FractionDifferences4(), new MagnitudeFeatures2() ); } }