public FeatureMapperV3() { super(new SimpleFeatureCalculator(), new MagnitudeFeatures(), new QualityFeatures()); } }
public float produceFeature(BaseInformationRecords.BaseInformationOrBuilder record, int featureIndex) { return normalize(produceFeatureInternal(record, featureIndex), QUALITY_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)); } }
@Override protected void initializeCount(BaseInformationRecords.CountInfo sampleCounts, GenotypeCount count) { QualityGenotypeCount myCount = (QualityGenotypeCount) count; myCount.set(avgQuality(ProtoPredictor.expandFreq(sampleCounts.getQualityScoresForwardStrandList())), avgQuality(ProtoPredictor.expandFreq(sampleCounts.getQualityScoresReverseStrandList()))); } }
public float produceFeatureInternal(BaseInformationRecords.BaseInformationOrBuilder record, int featureIndex) { assert featureIndex >= 0 && featureIndex < MAX_GENOTYPES * 2 * 2 * 2 : "Only MAX_GENOTYPES*2*2 features"; boolean sort = (featureIndex >= (MAX_GENOTYPES * 2 * 2)); if (sort) featureIndex = featureIndex - (MAX_GENOTYPES * 2 * 2); if (featureIndex < MAX_GENOTYPES * 2) { // germline counts written first: final QualityGenotypeCount genotypeCount = (QualityGenotypeCount) getAllCounts(record, false, sort).get(featureIndex / 2); if ((featureIndex % 2) == 1) { // odd featureIndices are forward strand: return genotypeCount.getQualityScoreForward(); } else { return genotypeCount.getQualityScoreReverse(); } } else { // tumor counts written next: featureIndex -= MAX_GENOTYPES * 2; final QualityGenotypeCount genotypeCount = (QualityGenotypeCount) getAllCounts(record, true, sort).get(featureIndex / 2); if ((featureIndex % 2) == 1) { // odd featureIndices are forward strand: return genotypeCount.getQualityScoreForward(); } else { return genotypeCount.getQualityScoreReverse(); } } }
float[] s2Scores = new float[10]; for (int i = 0; i < 5; i++) { s1Scores[i] = QualityFeatures.avgQuality(ProtoPredictor.expandFreq(pos.getSamples(0).getCounts(i).getQualityScoresForwardStrandList())); s1Scores[i + 5] = QualityFeatures.avgQuality(ProtoPredictor.expandFreq(pos.getSamples(0).getCounts(i).getQualityScoresReverseStrandList())); s2Scores[i] = QualityFeatures.avgQuality(ProtoPredictor.expandFreq(pos.getSamples(1).getCounts(i).getQualityScoresForwardStrandList())); s2Scores[i + 5] = QualityFeatures.avgQuality(ProtoPredictor.expandFreq(pos.getSamples(1).getCounts(i).getQualityScoresReverseStrandList())); s3Scores[i] = QualityFeatures.avgQuality(ProtoPredictor.expandFreq(pos.getSamples(2).getCounts(i).getQualityScoresForwardStrandList())); s3Scores[i + 5] = QualityFeatures.avgQuality(ProtoPredictor.expandFreq(pos.getSamples(2).getCounts(i).getQualityScoresReverseStrandList()));
public FeatureMapperV5() { super(new MagnitudeFeatures(), new SimpleFeatureCalculator(false), new QualityFeatures(), new ReadIndexFeatures()); } }
public FeatureMapperV6() { super(new FractionDifferences(), new MagnitudeFeatures(), new ReadIndexFeatures(), new QualityFeatures()); } }
public FeatureMapperVT() { super(new SimpleFeatureCalculator(false), new SimpleFeatureCalculator(true), new MagnitudeFeatures(), new QualityFeatures(), new ReadIndexFeatures() ); } }
public FeatureMapperV4() { super(new SimpleFeatureCalculator(true), new SortedGenotypeAgreementMapper(), 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 FeatureMapperV7() { super(new SimpleFeatureCalculator(true), new SortedGenotypeAgreementMapper(), new MagnitudeFeatures(), new QualityFeatures(), new ReadIndexFeatures(), new FractionDifferences2() ); } }