@Override public void start(final BCF2Encoder encoder, final VariantContext vc) throws IOException { // TODO // TODO this piece of code consumes like 10% of the runtime alone because fo the vc.getGenotypes() iteration // TODO encodingType = BCF2Type.INT8; for ( final Genotype g : vc.getGenotypes() ) { final int[] pls = ige.getValues(g); final BCF2Type plsType = getFieldEncoder().getType(pls); encodingType = BCF2Utils.maxIntegerType(encodingType, plsType); if ( encodingType == BCF2Type.INT32 ) break; // stop early } super.start(encoder, vc); }
@Override public void start(final BCF2Encoder encoder, final VariantContext vc) throws IOException { // TODO // TODO this piece of code consumes like 10% of the runtime alone because fo the vc.getGenotypes() iteration // TODO encodingType = BCF2Type.INT8; for ( final Genotype g : vc.getGenotypes() ) { final int[] pls = ige.getValues(g); final BCF2Type plsType = getFieldEncoder().getType(pls); encodingType = BCF2Utils.maxIntegerType(encodingType, plsType); if ( encodingType == BCF2Type.INT32 ) break; // stop early } super.start(encoder, vc); }
@Override public void addGenotype(final BCF2Encoder encoder, final VariantContext vc, final Genotype g) throws IOException { getFieldEncoder().encodeValue(encoder, ige.getValues(g), encodingType, nValuesPerGenotype); }
@Override public void addGenotype(final BCF2Encoder encoder, final VariantContext vc, final Genotype g) throws IOException { getFieldEncoder().encodeValue(encoder, ige.getValues(g), encodingType, nValuesPerGenotype); }
@Override public void start(final BCF2Encoder encoder, final VariantContext vc) throws IOException { // TODO // TODO this piece of code consumes like 10% of the runtime alone because fo the vc.getGenotypes() iteration // TODO encodingType = BCF2Type.INT8; for ( final Genotype g : vc.getGenotypes() ) { final int[] pls = ige.getValues(g); final BCF2Type plsType = getFieldEncoder().getType(pls); encodingType = BCF2Utils.maxIntegerType(encodingType, plsType); if ( encodingType == BCF2Type.INT32 ) break; // stop early } super.start(encoder, vc); }
@Override public void addGenotype(final BCF2Encoder encoder, final VariantContext vc, final Genotype g) throws IOException { getFieldEncoder().encodeValue(encoder, ige.getValues(g), encodingType, nValuesPerGenotype); }