public void check(String gt, String ad, String aq, Double expQad) {
   final VcfRecord rec = new VcfRecord("seq", 0, "A");
   rec.addFormatAndSample("GT", gt);
   rec.addFormatAndSample("AD", ad);
   rec.addFormatAndSample("AQ", aq);
   assertEquals(expQad, new MeanQualityDifferenceAnnotation().getValue(rec, 0));
 }
Exemplo n.º 2
0
 public void testAnnotate() {
   final NullModelBuilder amb =
       getModelBuilder(new String[] {"GQ"}, new String[] {}, new String[] {});
   assertNotNull(amb);
   amb.setModelParameters(new Properties());
   amb.build();
   final AbstractPredictModel apm = amb.getModel();
   assertNotNull(apm);
   final VcfRecord record =
       VcfReader.vcfLineToRecord(
           "chr5\t12041\trs55926606\tA\tT\t100\tPASS\tXRX\tGT:GQ\t0|1:12.3\t.\t1|1:99.9");
   final String s = record.toString();
   apm.annotate(record);
   assertEquals(s, record.toString());
 }
Exemplo n.º 3
0
 @Override
 public void annotateSample(VcfRecord record, int sampleNo) {
   record.setFormatAndSample(getField(), mData, sampleNo);
 }
Exemplo n.º 4
0
 @Override
 public void annotate(VcfRecord record) {
   for (int s = 0; s < record.getNumberOfSamples(); s++) {
     annotateSample(record, s);
   }
 }