Пример #1
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);
            }