Exemplo n.º 1
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: public void addGenotype(final BCF2Encoder encoder, final org.broadinstitute.variant.variantcontext.VariantContext vc, final org.broadinstitute.variant.variantcontext.Genotype g) throws java.io.IOException
//JAVA TO C# CONVERTER WARNING: 'final' parameters are not allowed in .NET:
            public override void addGenotype(BCF2Encoder encoder, VariantContext vc, Genotype g)
            {
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final int samplePloidy = g.getPloidy();
                int samplePloidy = g.Ploidy;

                for (int i = 0; i < nValuesPerGenotype; i++)
                {
                    if (i < samplePloidy)
                    {
                        // we encode the actual allele
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final org.broadinstitute.variant.variantcontext.Allele a = g.getAllele(i);
                        Allele a = g.getAllele(i);
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final int offset = getAlleleOffset(a);
                        int offset = getAlleleOffset(a);
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final int encoded = ((offset+1) << 1) | (g.isPhased() ? 0x01 : 0x00);
                        int encoded = ((offset + 1) << 1) | (g.Phased ? 0x01 : 0x00);
                        encoder.encodeRawBytes(encoded, encodingType);
                    }
                    else
                    {
                        // we need to pad with missing as we have ploidy < max for this sample
                        encoder.encodeRawBytes(encodingType.MissingBytes, encodingType);
                    }
                }
            }
Exemplo n.º 2
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: public void encodeValue(final BCF2Encoder encoder, final Object value, final org.broadinstitute.variant.bcf2.BCF2Type type, final int minValues) throws java.io.IOException
//JAVA TO C# CONVERTER WARNING: 'final' parameters are not allowed in .NET:
            public override void encodeValue(BCF2Encoder encoder, object value, BCF2Type type, int minValues)
            {
                int count = 0;

                // TODO -- can be restructured to avoid toList operation
                if (isAtomic)
                {
                    // fast path for fields with 1 fixed float value
                    if (value != null)
                    {
                        encoder.encodeRawFloat((double?)value);
                        count++;
                    }
                }
                else
                {
                    // handle generic case
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final java.util.List<Double> doubles = toList(Double.class, value);
                    IList <double?> doubles = toList(typeof(double?), value);
                    foreach (Double d in doubles)
                    {
                        if (d != null)                         // necessary because .,. => [null, null] in VC
                        {
                            encoder.encodeRawFloat(d);
                            count++;
                        }
                    }
                }
                for (; count < minValues; count++)
                {
                    encoder.encodeRawMissingValue(type);
                }
            }
Exemplo n.º 3
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Requires({"encodingType != null", "nValuesPerGenotype >= 0"}) public void addGenotype(final BCF2Encoder encoder, final org.broadinstitute.variant.variantcontext.VariantContext vc, final org.broadinstitute.variant.variantcontext.Genotype g) 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 virtual void addGenotype(BCF2Encoder encoder, VariantContext vc, Genotype g)
            {
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final Object fieldValue = g.getExtendedAttribute(getField(), null);
                object fieldValue = g.getExtendedAttribute(Field, null);

                FieldEncoder.encodeValue(encoder, fieldValue, encodingType, nValuesPerGenotype);
            }
Exemplo n.º 4
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: public void encodeValue(final BCF2Encoder encoder, final Object value, final org.broadinstitute.variant.bcf2.BCF2Type type, final int minValues) throws java.io.IOException
//JAVA TO C# CONVERTER WARNING: 'final' parameters are not allowed in .NET:
            public override void encodeValue(BCF2Encoder encoder, object value, BCF2Type type, int minValues)
            {
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final String s = javaStringToBCF2String(value);
                string s = javaStringToBCF2String(value);

                encoder.encodeRawString(s, Math.Max(s.Length, minValues));
            }
Exemplo n.º 5
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: public void addGenotype(final BCF2Encoder encoder, final org.broadinstitute.variant.variantcontext.VariantContext vc, final org.broadinstitute.variant.variantcontext.Genotype g) throws java.io.IOException
//JAVA TO C# CONVERTER WARNING: 'final' parameters are not allowed in .NET:
            public override void addGenotype(BCF2Encoder encoder, VariantContext vc, Genotype g)
            {
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final String fieldValue = g.getFilters();
                string fieldValue = g.Filters;

                FieldEncoder.encodeValue(encoder, fieldValue, encodingType, nValuesPerGenotype);
            }
Exemplo n.º 6
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: public void start(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 start(BCF2Encoder encoder, VariantContext vc)
            {
                if (vc.NAlleles > BCF2Utils.MAX_ALLELES_IN_GENOTYPES)
                {
                    throw new IllegalStateException("Current BCF2 encoder cannot handle sites " + "with > " + BCF2Utils.MAX_ALLELES_IN_GENOTYPES + " alleles, but you have " + vc.NAlleles + " at " + vc.Chr + ":" + vc.Start);
                }

                encodingType = BCF2Type.INT8;
                buildAlleleMap(vc);
                nValuesPerGenotype = vc.getMaxPloidy(2);

                base.start(encoder, vc);
            }
Exemplo n.º 7
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: public void encodeValue(final BCF2Encoder encoder, final Object value, final org.broadinstitute.variant.bcf2.BCF2Type type, final int minValues) throws java.io.IOException
//JAVA TO C# CONVERTER WARNING: 'final' parameters are not allowed in .NET:
            public override void encodeValue(BCF2Encoder encoder, object value, BCF2Type type, int minValues)
            {
                int count = 0;

                if (value != null)
                {
                    encoder.encodeRawInt((int?)value, type);
                    count++;
                }
                for (; count < minValues; count++)
                {
                    encoder.encodeRawMissingValue(type);
                }
            }
Exemplo n.º 8
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: public void encodeValue(final BCF2Encoder encoder, final Object value, final org.broadinstitute.variant.bcf2.BCF2Type type, final int minValues) throws java.io.IOException
//JAVA TO C# CONVERTER WARNING: 'final' parameters are not allowed in .NET:
            public override void encodeValue(BCF2Encoder encoder, object value, BCF2Type type, int minValues)
            {
                int count = 0;

                foreach (Integer i in toList(typeof(Integer), value))
                {
                    if (i != null)                     // necessary because .,. => [null, null] in VC
                    {
                        encoder.encodeRawInt(i, type);
                        count++;
                    }
                }
                for (; count < minValues; count++)
                {
                    encoder.encodeRawMissingValue(type);
                }
            }
Exemplo n.º 9
0
//JAVA TO C# CONVERTER WARNING: 'final' parameters are not allowed in .NET:
//ORIGINAL LINE: private BCF2FieldEncoder createFieldEncoder(final VCFCompoundHeaderLine line, final BCF2Encoder encoder, final java.util.Map<String, Integer> dict, final boolean createGenotypesEncoders)
        private BCF2FieldEncoder createFieldEncoder(VCFCompoundHeaderLine line, BCF2Encoder encoder, IDictionary <string, int?> dict, bool createGenotypesEncoders)
        {
            if (createGenotypesEncoders && intGenotypeFieldAccessors.getAccessor(line.ID) != null)
            {
                if (GeneralUtils.DEBUG_MODE_ENABLED && line.Type != VCFHeaderLineType.Integer)
                {
                    Console.Error.WriteLine("Warning: field " + line.ID + " expected to encode an integer but saw " + line.Type + " for record " + line);
                }
                return(new BCF2FieldEncoder.IntArray(line, dict));
            }
            else if (createGenotypesEncoders && line.ID.Equals(VCFConstants.GENOTYPE_KEY))
            {
                return(new BCF2FieldEncoder.GenericInts(line, dict));
            }
            else
            {
                switch (line.Type)
                {
                case char?:
                case string:
                    return(new BCF2FieldEncoder.StringOrCharacter(line, dict));

                case Flag:
                    return(new BCF2FieldEncoder.Flag(line, dict));

                case float?:
                    return(new BCF2FieldEncoder.Float(line, dict));

                case int?:
                    if (line.FixedCount && line.Count == 1)
                    {
                        return(new BCF2FieldEncoder.AtomicInt(line, dict));
                    }
                    else
                    {
                        return(new BCF2FieldEncoder.GenericInts(line, dict));
                    }

                default:
                    throw new System.ArgumentException("Unexpected type for field " + line.ID);
                }
            }
        }
Exemplo n.º 10
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: public void start(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 start(BCF2Encoder encoder, VariantContext vc)
            {
                // the only value that is dynamic are integers
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final java.util.List<Integer> values = new java.util.ArrayList<Integer>(vc.getNSamples());
                IList <int?> values = new List <int?>(vc.NSamples);

                foreach (Genotype g in vc.Genotypes)
                {
                    foreach (Object i in BCF2Utils.toList(g.getExtendedAttribute(Field, null)))
                    {
                        if (i != null)                         // we know they are all integers
                        {
                            values.Add((int?)i);
                        }
                    }
                }

                encodingType = BCF2Utils.determineIntegerType(values);
                base.start(encoder, vc);
            }
Exemplo n.º 11
0
//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);
            }
Exemplo n.º 12
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: public void start(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 start(BCF2Encoder encoder, VariantContext vc)
            {
                // TODO
                // TODO this piece of code consumes like 10% of the runtime alone because fo the vc.getGenotypes() iteration
                // TODO
                encodingType = BCF2Type.INT8;
                foreach (Genotype g in vc.Genotypes)
                {
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final int[] pls = ige.getValues(g);
                    int[] pls = ige.getValues(g);
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final org.broadinstitute.variant.bcf2.BCF2Type plsType = getFieldEncoder().getType(pls);
                    BCF2Type plsType = FieldEncoder.getType(pls);
                    encodingType = BCF2Utils.maxIntegerType(encodingType, plsType);
                    if (encodingType == BCF2Type.INT32)
                    {
                        break;                         // stop early
                    }
                }

                base.start(encoder, vc);
            }
Exemplo n.º 13
0
//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);
                }
            }
Exemplo n.º 14
0
        /// <summary>
        /// Setup the FieldWriters appropriate to each INFO and FORMAT in the VCF header
        ///
        /// Must be called before any of the getter methods will work
        /// </summary>
        /// <param name="header"> a VCFHeader containing description for every INFO and FORMAT field we'll attempt to write out to BCF </param>
        /// <param name="encoder"> the encoder we are going to use to write out the BCF2 data </param>
        /// <param name="stringDictionary"> a map from VCFHeader strings to their offsets for encoding </param>
//JAVA TO C# CONVERTER WARNING: 'final' parameters are not allowed in .NET:
//ORIGINAL LINE: public void setup(final VCFHeader header, final BCF2Encoder encoder, final java.util.Map<String, Integer> stringDictionary)
        public virtual void setup(VCFHeader header, BCF2Encoder encoder, IDictionary <string, int?> stringDictionary)
        {
            foreach (VCFInfoHeaderLine line in header.InfoHeaderLines)
            {
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final String field = line.getID();
                string field = line.ID;
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final BCF2FieldWriter.SiteWriter writer = createInfoWriter(header, line, encoder, stringDictionary);
                BCF2FieldWriter.SiteWriter writer = createInfoWriter(header, line, encoder, stringDictionary);
                add(siteWriters, field, writer);
            }

            foreach (VCFFormatHeaderLine line in header.FormatHeaderLines)
            {
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final String field = line.getID();
                string field = line.ID;
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final BCF2FieldWriter.GenotypesWriter writer = createGenotypesWriter(header, line, encoder, stringDictionary);
                BCF2FieldWriter.GenotypesWriter writer = createGenotypesWriter(header, line, encoder, stringDictionary);
                add(genotypesWriters, field, writer);
            }
        }
Exemplo n.º 15
0
        // -----------------------------------------------------------------
        //
        // Master routine to look at the header, a specific line, and
        // build an appropriate Genotypes for that header element
        //
        // -----------------------------------------------------------------

//JAVA TO C# CONVERTER WARNING: 'final' parameters are not allowed in .NET:
//ORIGINAL LINE: private BCF2FieldWriter.GenotypesWriter createGenotypesWriter(final VCFHeader header, final VCFFormatHeaderLine line, final BCF2Encoder encoder, final java.util.Map<String, Integer> dict)
        private BCF2FieldWriter.GenotypesWriter createGenotypesWriter(VCFHeader header, VCFFormatHeaderLine line, BCF2Encoder encoder, IDictionary <string, int?> dict)
        {
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final String field = line.getID();
            string field = line.ID;
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final BCF2FieldEncoder fieldEncoder = createFieldEncoder(line, encoder, dict, true);
            BCF2FieldEncoder fieldEncoder = createFieldEncoder(line, encoder, dict, true);

            if (field.Equals(VCFConstants.GENOTYPE_KEY))
            {
                return(new BCF2FieldWriter.GTWriter(header, fieldEncoder));
            }
            else if (line.ID.Equals(VCFConstants.GENOTYPE_FILTER_KEY))
            {
                return(new BCF2FieldWriter.FTGenotypesWriter(header, fieldEncoder));
            }
            else if (intGenotypeFieldAccessors.getAccessor(field) != null)
            {
                return(new BCF2FieldWriter.IGFGenotypesWriter(header, fieldEncoder, intGenotypeFieldAccessors.getAccessor(field)));
            }
            else if (line.Type == VCFHeaderLineType.Integer)
            {
                return(new BCF2FieldWriter.IntegerTypeGenotypesWriter(header, fieldEncoder));
            }
            else
            {
                return(new BCF2FieldWriter.StaticallyTypeGenotypesWriter(header, fieldEncoder));
            }
        }
Exemplo n.º 16
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Requires("encoder != null") public final void writeFieldKey(final BCF2Encoder encoder) 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 void writeFieldKey(BCF2Encoder encoder)
        {
            encoder.encodeTypedInt(dictionaryOffset, dictionaryOffsetType);
        }
Exemplo n.º 17
0
        // -----------------------------------------------------------------
        //
        // Master routine to look at the header, a specific line, and
        // build an appropriate SiteWriter for that header element
        //
        // -----------------------------------------------------------------

//JAVA TO C# CONVERTER WARNING: 'final' parameters are not allowed in .NET:
//ORIGINAL LINE: private BCF2FieldWriter.SiteWriter createInfoWriter(final VCFHeader header, final VCFInfoHeaderLine line, final BCF2Encoder encoder, final java.util.Map<String, Integer> dict)
        private BCF2FieldWriter.SiteWriter createInfoWriter(VCFHeader header, VCFInfoHeaderLine line, BCF2Encoder encoder, IDictionary <string, int?> dict)
        {
            return(new BCF2FieldWriter.GenericSiteWriter(header, createFieldEncoder(line, encoder, dict, false)));
        }
Exemplo n.º 18
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Override @Requires({"minValues <= 1", "value != null", "value instanceof Boolean", "((Boolean)value) == true"}) public void encodeValue(final BCF2Encoder encoder, final Object value, final org.broadinstitute.variant.bcf2.BCF2Type type, final int minValues) 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 encodeValue(BCF2Encoder encoder, object value, BCF2Type type, int minValues)
            {
                encoder.encodeRawBytes(1, StaticType);
            }
Exemplo n.º 19
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: public void done(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 virtual void done(BCF2Encoder encoder, VariantContext vc)         // TODO -- overload done so that we null out values and test for correctness
        {
        }
Exemplo n.º 20
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Requires("vc != null") 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 virtual void start(BCF2Encoder encoder, VariantContext vc)
        {
            fieldEncoder.writeFieldKey(encoder);
        }
Exemplo n.º 21
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: public abstract 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 abstract void site(BCF2Encoder encoder, VariantContext vc);
Exemplo n.º 22
0
        // ----------------------------------------------------------------------
        //
        // methods to encode values, including the key abstract method
        //
        // ----------------------------------------------------------------------

        /// <summary>
        /// Key abstract method that should encode a value of the given type into the encoder.
        ///
        /// Value will be of a type appropriate to the underlying encoder.  If the genotype field is represented as
        /// an int[], this will be value, and the encoder needs to handle encoding all of the values in the int[].
        ///
        /// The argument should be used, not the getType() method in the superclass as an outer loop might have
        /// decided a more general type (int16) to use, even through this encoder could have been done with int8.
        ///
        /// If minValues > 0, then encodeValue must write in at least minValues items from value.  If value is atomic,
        /// this means that minValues - 1 MISSING values should be added to the encoder.  If minValues is a collection
        /// type (int[]) then minValues - values.length should be added.  This argument is intended to handle padding
        /// of values in genotype fields.
        /// </summary>
        /// <param name="encoder"> </param>
        /// <param name="value"> </param>
        /// <param name="type"> </param>
        /// <param name="minValues"> </param>
        /// <exception cref="IOException"> </exception>
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Requires({"encoder != null", "isDynamicallyTyped() || type == getStaticType()", "minValues >= 0"}) public abstract void encodeValue(final BCF2Encoder encoder, final Object value, final org.broadinstitute.variant.bcf2.BCF2Type type, final int minValues) 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 abstract void encodeValue(BCF2Encoder encoder, object value, BCF2Type type, int minValues);
Exemplo n.º 23
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: public void addGenotype(final BCF2Encoder encoder, final org.broadinstitute.variant.variantcontext.VariantContext vc, final org.broadinstitute.variant.variantcontext.Genotype g) throws java.io.IOException
//JAVA TO C# CONVERTER WARNING: 'final' parameters are not allowed in .NET:
            public override void addGenotype(BCF2Encoder encoder, VariantContext vc, Genotype g)
            {
                FieldEncoder.encodeValue(encoder, ige.getValues(g), encodingType, nValuesPerGenotype);
            }