//JAVA TO C# CONVERTER WARNING: 'final' parameters are not allowed in .NET: //ORIGINAL LINE: protected GenotypesWriter(final Bio.VCF.VCFHeader header, final BCF2FieldEncoder fieldEncoder) protected internal GenotypesWriter(VCFHeader header, BCF2FieldEncoder fieldEncoder) : base(header, fieldEncoder) { if (fieldEncoder.hasConstantNumElements()) { nValuesPerGenotype = FieldEncoder.numElements(); } }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Override @Requires({"encodingType != null", "nValuesPerGenotype >= 0 || ! getFieldEncoder().hasConstantNumElements()"}) @Ensures("nValuesPerGenotype >= 0") public void start(final BCF2Encoder encoder, final org.broadinstitute.variant.variantcontext.VariantContext vc) throws java.io.IOException //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET: //JAVA TO C# CONVERTER WARNING: 'final' parameters are not allowed in .NET: public override void start(BCF2Encoder encoder, VariantContext vc) { // writes the key information base.start(encoder, vc); // only update if we need to if (!FieldEncoder.hasConstantNumElements()) { if (FieldEncoder.hasContextDeterminedNumElements()) // we are cheap -- just depends on genotype of allele counts { nValuesPerGenotype = FieldEncoder.numElements(vc); } else // we have to go fishing through the values themselves (expensive) { nValuesPerGenotype = computeMaxSizeOfGenotypeFieldFromValues(vc); } } encoder.encodeType(nValuesPerGenotype, encodingType); }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET: //ORIGINAL LINE: public void site(final BCF2Encoder encoder, final org.broadinstitute.variant.variantcontext.VariantContext vc) throws java.io.IOException //JAVA TO C# CONVERTER WARNING: 'final' parameters are not allowed in .NET: public override void site(BCF2Encoder encoder, VariantContext vc) { //JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final': //ORIGINAL LINE: final Object rawValue = vc.getAttribute(getField(), null); object rawValue = vc.getAttribute(Field, null); //JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final': //ORIGINAL LINE: final org.broadinstitute.variant.bcf2.BCF2Type type = getFieldEncoder().getType(rawValue); BCF2Type type = FieldEncoder.getType(rawValue); if (rawValue == null) { // the value is missing, just write in null encoder.encodeType(0, type); } else { //JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final': //ORIGINAL LINE: final int valueCount = getFieldEncoder().numElements(vc, rawValue); int valueCount = FieldEncoder.numElements(vc, rawValue); encoder.encodeType(valueCount, type); FieldEncoder.encodeValue(encoder, rawValue, type, valueCount); } }
//JAVA TO C# CONVERTER WARNING: 'final' parameters are not allowed in .NET: //ORIGINAL LINE: protected int numElements(final org.broadinstitute.variant.variantcontext.VariantContext vc, final org.broadinstitute.variant.variantcontext.Genotype g) protected internal override int numElements(VariantContext vc, Genotype g) { return(FieldEncoder.numElements(vc, g.Filters)); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Ensures({"result >= 0"}) protected int numElements(final org.broadinstitute.variant.variantcontext.VariantContext vc, final org.broadinstitute.variant.variantcontext.Genotype g) //JAVA TO C# CONVERTER WARNING: 'final' parameters are not allowed in .NET: protected internal virtual int numElements(VariantContext vc, Genotype g) { return(FieldEncoder.numElements(vc, g.getExtendedAttribute(Field))); }