All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.opencb.biodata.models.variant.metadata.VariantSetStats Maven / Gradle / Ivy

The newest version!
/**
 * Autogenerated by Avro
 * 
 * DO NOT EDIT DIRECTLY
 */
package org.opencb.biodata.models.variant.metadata;  
@SuppressWarnings("all")
/** Variant statistics for a set of variants.
     The variants set can be contain a whole study, a cohort, a sample, a region, ... */
@org.apache.avro.specific.AvroGenerated
public class VariantSetStats extends org.apache.avro.specific.SpecificRecordBase implements org.apache.avro.specific.SpecificRecord {
  public static final org.apache.avro.Schema SCHEMA$ = new org.apache.avro.Schema.Parser().parse("{\"type\":\"record\",\"name\":\"VariantSetStats\",\"namespace\":\"org.opencb.biodata.models.variant.metadata\",\"doc\":\"Variant statistics for a set of variants.\\n     The variants set can be contain a whole study, a cohort, a sample, a region, ...\",\"fields\":[{\"name\":\"variantCount\",\"type\":\"long\",\"doc\":\"Number of variants in the variant set\"},{\"name\":\"sampleCount\",\"type\":\"long\",\"doc\":\"Number of samples in the variant set\"},{\"name\":\"filterCount\",\"type\":{\"type\":\"map\",\"values\":\"long\",\"avro.java.string\":\"String\"},\"doc\":\"* The number of occurrences for each FILTER value in files from this set.\\n         * Each file can contain more than one filter value (usually separated by ';').\\n         *\"},{\"name\":\"genotypeCount\",\"type\":{\"type\":\"map\",\"values\":\"long\",\"avro.java.string\":\"String\"},\"doc\":\"Number of genotypes found for all samples in variants set\",\"default\":{}},{\"name\":\"filesCount\",\"type\":\"long\",\"doc\":\"Number of files in the variant set\"},{\"name\":\"tiTvRatio\",\"type\":\"float\",\"doc\":\"TiTvRatio = num. transitions / num. transversions\"},{\"name\":\"qualityAvg\",\"type\":\"float\",\"doc\":\"Mean Quality for all the variants with quality\"},{\"name\":\"qualityStdDev\",\"type\":\"float\",\"doc\":\"Standard Deviation of the quality\"},{\"name\":\"typeCount\",\"type\":{\"type\":\"map\",\"values\":\"long\",\"avro.java.string\":\"String\"},\"doc\":\"Variants count group by type. e.g. SNP, INDEL, MNP, SNV, ...\",\"default\":{}},{\"name\":\"biotypeCount\",\"type\":{\"type\":\"map\",\"values\":\"long\",\"avro.java.string\":\"String\"},\"doc\":\"Variants count group by biotype. e.g. protein-coding, miRNA, lncRNA, ...\",\"default\":{}},{\"name\":\"consequenceTypeCount\",\"type\":{\"type\":\"map\",\"values\":\"long\",\"avro.java.string\":\"String\"},\"doc\":\"Variants count group by consequence type. e.g. synonymous_variant, missense_variant, stop_lost, ...\",\"default\":{}},{\"name\":\"chromosomeCount\",\"type\":{\"type\":\"map\",\"values\":\"long\",\"avro.java.string\":\"String\"},\"doc\":\"Number of variants per chromosome\",\"default\":{}},{\"name\":\"chromosomeDensity\",\"type\":{\"type\":\"map\",\"values\":\"float\",\"avro.java.string\":\"String\"},\"doc\":\"Total density of variants within the chromosome. counts / chromosome.length\",\"default\":{}}]}");
  public static org.apache.avro.Schema getClassSchema() { return SCHEMA$; }
  /** Number of variants in the variant set */
   private long variantCount;
  /** Number of samples in the variant set */
   private long sampleCount;
  /** * The number of occurrences for each FILTER value in files from this set.
         * Each file can contain more than one filter value (usually separated by ';').
         * */
   private java.util.Map filterCount;
  /** Number of genotypes found for all samples in variants set */
   private java.util.Map genotypeCount;
  /** Number of files in the variant set */
   private long filesCount;
  /** TiTvRatio = num. transitions / num. transversions */
   private float tiTvRatio;
  /** Mean Quality for all the variants with quality */
   private float qualityAvg;
  /** Standard Deviation of the quality */
   private float qualityStdDev;
  /** Variants count group by type. e.g. SNP, INDEL, MNP, SNV, ... */
   private java.util.Map typeCount;
  /** Variants count group by biotype. e.g. protein-coding, miRNA, lncRNA, ... */
   private java.util.Map biotypeCount;
  /** Variants count group by consequence type. e.g. synonymous_variant, missense_variant, stop_lost, ... */
   private java.util.Map consequenceTypeCount;
  /** Number of variants per chromosome */
   private java.util.Map chromosomeCount;
  /** Total density of variants within the chromosome. counts / chromosome.length */
   private java.util.Map chromosomeDensity;

  /**
   * Default constructor.  Note that this does not initialize fields
   * to their default values from the schema.  If that is desired then
   * one should use newBuilder(). 
   */
  public VariantSetStats() {}

  /**
   * All-args constructor.
   */
  public VariantSetStats(java.lang.Long variantCount, java.lang.Long sampleCount, java.util.Map filterCount, java.util.Map genotypeCount, java.lang.Long filesCount, java.lang.Float tiTvRatio, java.lang.Float qualityAvg, java.lang.Float qualityStdDev, java.util.Map typeCount, java.util.Map biotypeCount, java.util.Map consequenceTypeCount, java.util.Map chromosomeCount, java.util.Map chromosomeDensity) {
    this.variantCount = variantCount;
    this.sampleCount = sampleCount;
    this.filterCount = filterCount;
    this.genotypeCount = genotypeCount;
    this.filesCount = filesCount;
    this.tiTvRatio = tiTvRatio;
    this.qualityAvg = qualityAvg;
    this.qualityStdDev = qualityStdDev;
    this.typeCount = typeCount;
    this.biotypeCount = biotypeCount;
    this.consequenceTypeCount = consequenceTypeCount;
    this.chromosomeCount = chromosomeCount;
    this.chromosomeDensity = chromosomeDensity;
  }

  public org.apache.avro.Schema getSchema() { return SCHEMA$; }
  // Used by DatumWriter.  Applications should not call. 
  public java.lang.Object get(int field$) {
    switch (field$) {
    case 0: return variantCount;
    case 1: return sampleCount;
    case 2: return filterCount;
    case 3: return genotypeCount;
    case 4: return filesCount;
    case 5: return tiTvRatio;
    case 6: return qualityAvg;
    case 7: return qualityStdDev;
    case 8: return typeCount;
    case 9: return biotypeCount;
    case 10: return consequenceTypeCount;
    case 11: return chromosomeCount;
    case 12: return chromosomeDensity;
    default: throw new org.apache.avro.AvroRuntimeException("Bad index");
    }
  }
  // Used by DatumReader.  Applications should not call. 
  @SuppressWarnings(value="unchecked")
  public void put(int field$, java.lang.Object value$) {
    switch (field$) {
    case 0: variantCount = (java.lang.Long)value$; break;
    case 1: sampleCount = (java.lang.Long)value$; break;
    case 2: filterCount = (java.util.Map)value$; break;
    case 3: genotypeCount = (java.util.Map)value$; break;
    case 4: filesCount = (java.lang.Long)value$; break;
    case 5: tiTvRatio = (java.lang.Float)value$; break;
    case 6: qualityAvg = (java.lang.Float)value$; break;
    case 7: qualityStdDev = (java.lang.Float)value$; break;
    case 8: typeCount = (java.util.Map)value$; break;
    case 9: biotypeCount = (java.util.Map)value$; break;
    case 10: consequenceTypeCount = (java.util.Map)value$; break;
    case 11: chromosomeCount = (java.util.Map)value$; break;
    case 12: chromosomeDensity = (java.util.Map)value$; break;
    default: throw new org.apache.avro.AvroRuntimeException("Bad index");
    }
  }

  /**
   * Gets the value of the 'variantCount' field.
   * Number of variants in the variant set   */
  public java.lang.Long getVariantCount() {
    return variantCount;
  }

  /**
   * Sets the value of the 'variantCount' field.
   * Number of variants in the variant set   * @param value the value to set.
   */
  public void setVariantCount(java.lang.Long value) {
    this.variantCount = value;
  }

  /**
   * Gets the value of the 'sampleCount' field.
   * Number of samples in the variant set   */
  public java.lang.Long getSampleCount() {
    return sampleCount;
  }

  /**
   * Sets the value of the 'sampleCount' field.
   * Number of samples in the variant set   * @param value the value to set.
   */
  public void setSampleCount(java.lang.Long value) {
    this.sampleCount = value;
  }

  /**
   * Gets the value of the 'filterCount' field.
   * * The number of occurrences for each FILTER value in files from this set.
         * Each file can contain more than one filter value (usually separated by ';').
         *   */
  public java.util.Map getFilterCount() {
    return filterCount;
  }

  /**
   * Sets the value of the 'filterCount' field.
   * * The number of occurrences for each FILTER value in files from this set.
         * Each file can contain more than one filter value (usually separated by ';').
         *   * @param value the value to set.
   */
  public void setFilterCount(java.util.Map value) {
    this.filterCount = value;
  }

  /**
   * Gets the value of the 'genotypeCount' field.
   * Number of genotypes found for all samples in variants set   */
  public java.util.Map getGenotypeCount() {
    return genotypeCount;
  }

  /**
   * Sets the value of the 'genotypeCount' field.
   * Number of genotypes found for all samples in variants set   * @param value the value to set.
   */
  public void setGenotypeCount(java.util.Map value) {
    this.genotypeCount = value;
  }

  /**
   * Gets the value of the 'filesCount' field.
   * Number of files in the variant set   */
  public java.lang.Long getFilesCount() {
    return filesCount;
  }

  /**
   * Sets the value of the 'filesCount' field.
   * Number of files in the variant set   * @param value the value to set.
   */
  public void setFilesCount(java.lang.Long value) {
    this.filesCount = value;
  }

  /**
   * Gets the value of the 'tiTvRatio' field.
   * TiTvRatio = num. transitions / num. transversions   */
  public java.lang.Float getTiTvRatio() {
    return tiTvRatio;
  }

  /**
   * Sets the value of the 'tiTvRatio' field.
   * TiTvRatio = num. transitions / num. transversions   * @param value the value to set.
   */
  public void setTiTvRatio(java.lang.Float value) {
    this.tiTvRatio = value;
  }

  /**
   * Gets the value of the 'qualityAvg' field.
   * Mean Quality for all the variants with quality   */
  public java.lang.Float getQualityAvg() {
    return qualityAvg;
  }

  /**
   * Sets the value of the 'qualityAvg' field.
   * Mean Quality for all the variants with quality   * @param value the value to set.
   */
  public void setQualityAvg(java.lang.Float value) {
    this.qualityAvg = value;
  }

  /**
   * Gets the value of the 'qualityStdDev' field.
   * Standard Deviation of the quality   */
  public java.lang.Float getQualityStdDev() {
    return qualityStdDev;
  }

  /**
   * Sets the value of the 'qualityStdDev' field.
   * Standard Deviation of the quality   * @param value the value to set.
   */
  public void setQualityStdDev(java.lang.Float value) {
    this.qualityStdDev = value;
  }

  /**
   * Gets the value of the 'typeCount' field.
   * Variants count group by type. e.g. SNP, INDEL, MNP, SNV, ...   */
  public java.util.Map getTypeCount() {
    return typeCount;
  }

  /**
   * Sets the value of the 'typeCount' field.
   * Variants count group by type. e.g. SNP, INDEL, MNP, SNV, ...   * @param value the value to set.
   */
  public void setTypeCount(java.util.Map value) {
    this.typeCount = value;
  }

  /**
   * Gets the value of the 'biotypeCount' field.
   * Variants count group by biotype. e.g. protein-coding, miRNA, lncRNA, ...   */
  public java.util.Map getBiotypeCount() {
    return biotypeCount;
  }

  /**
   * Sets the value of the 'biotypeCount' field.
   * Variants count group by biotype. e.g. protein-coding, miRNA, lncRNA, ...   * @param value the value to set.
   */
  public void setBiotypeCount(java.util.Map value) {
    this.biotypeCount = value;
  }

  /**
   * Gets the value of the 'consequenceTypeCount' field.
   * Variants count group by consequence type. e.g. synonymous_variant, missense_variant, stop_lost, ...   */
  public java.util.Map getConsequenceTypeCount() {
    return consequenceTypeCount;
  }

  /**
   * Sets the value of the 'consequenceTypeCount' field.
   * Variants count group by consequence type. e.g. synonymous_variant, missense_variant, stop_lost, ...   * @param value the value to set.
   */
  public void setConsequenceTypeCount(java.util.Map value) {
    this.consequenceTypeCount = value;
  }

  /**
   * Gets the value of the 'chromosomeCount' field.
   * Number of variants per chromosome   */
  public java.util.Map getChromosomeCount() {
    return chromosomeCount;
  }

  /**
   * Sets the value of the 'chromosomeCount' field.
   * Number of variants per chromosome   * @param value the value to set.
   */
  public void setChromosomeCount(java.util.Map value) {
    this.chromosomeCount = value;
  }

  /**
   * Gets the value of the 'chromosomeDensity' field.
   * Total density of variants within the chromosome. counts / chromosome.length   */
  public java.util.Map getChromosomeDensity() {
    return chromosomeDensity;
  }

  /**
   * Sets the value of the 'chromosomeDensity' field.
   * Total density of variants within the chromosome. counts / chromosome.length   * @param value the value to set.
   */
  public void setChromosomeDensity(java.util.Map value) {
    this.chromosomeDensity = value;
  }

  /** Creates a new VariantSetStats RecordBuilder */
  public static org.opencb.biodata.models.variant.metadata.VariantSetStats.Builder newBuilder() {
    return new org.opencb.biodata.models.variant.metadata.VariantSetStats.Builder();
  }
  
  /** Creates a new VariantSetStats RecordBuilder by copying an existing Builder */
  public static org.opencb.biodata.models.variant.metadata.VariantSetStats.Builder newBuilder(org.opencb.biodata.models.variant.metadata.VariantSetStats.Builder other) {
    return new org.opencb.biodata.models.variant.metadata.VariantSetStats.Builder(other);
  }
  
  /** Creates a new VariantSetStats RecordBuilder by copying an existing VariantSetStats instance */
  public static org.opencb.biodata.models.variant.metadata.VariantSetStats.Builder newBuilder(org.opencb.biodata.models.variant.metadata.VariantSetStats other) {
    return new org.opencb.biodata.models.variant.metadata.VariantSetStats.Builder(other);
  }
  
  /**
   * RecordBuilder for VariantSetStats instances.
   */
  public static class Builder extends org.apache.avro.specific.SpecificRecordBuilderBase
    implements org.apache.avro.data.RecordBuilder {

    private long variantCount;
    private long sampleCount;
    private java.util.Map filterCount;
    private java.util.Map genotypeCount;
    private long filesCount;
    private float tiTvRatio;
    private float qualityAvg;
    private float qualityStdDev;
    private java.util.Map typeCount;
    private java.util.Map biotypeCount;
    private java.util.Map consequenceTypeCount;
    private java.util.Map chromosomeCount;
    private java.util.Map chromosomeDensity;

    /** Creates a new Builder */
    private Builder() {
      super(org.opencb.biodata.models.variant.metadata.VariantSetStats.SCHEMA$);
    }
    
    /** Creates a Builder by copying an existing Builder */
    private Builder(org.opencb.biodata.models.variant.metadata.VariantSetStats.Builder other) {
      super(other);
      if (isValidValue(fields()[0], other.variantCount)) {
        this.variantCount = data().deepCopy(fields()[0].schema(), other.variantCount);
        fieldSetFlags()[0] = true;
      }
      if (isValidValue(fields()[1], other.sampleCount)) {
        this.sampleCount = data().deepCopy(fields()[1].schema(), other.sampleCount);
        fieldSetFlags()[1] = true;
      }
      if (isValidValue(fields()[2], other.filterCount)) {
        this.filterCount = data().deepCopy(fields()[2].schema(), other.filterCount);
        fieldSetFlags()[2] = true;
      }
      if (isValidValue(fields()[3], other.genotypeCount)) {
        this.genotypeCount = data().deepCopy(fields()[3].schema(), other.genotypeCount);
        fieldSetFlags()[3] = true;
      }
      if (isValidValue(fields()[4], other.filesCount)) {
        this.filesCount = data().deepCopy(fields()[4].schema(), other.filesCount);
        fieldSetFlags()[4] = true;
      }
      if (isValidValue(fields()[5], other.tiTvRatio)) {
        this.tiTvRatio = data().deepCopy(fields()[5].schema(), other.tiTvRatio);
        fieldSetFlags()[5] = true;
      }
      if (isValidValue(fields()[6], other.qualityAvg)) {
        this.qualityAvg = data().deepCopy(fields()[6].schema(), other.qualityAvg);
        fieldSetFlags()[6] = true;
      }
      if (isValidValue(fields()[7], other.qualityStdDev)) {
        this.qualityStdDev = data().deepCopy(fields()[7].schema(), other.qualityStdDev);
        fieldSetFlags()[7] = true;
      }
      if (isValidValue(fields()[8], other.typeCount)) {
        this.typeCount = data().deepCopy(fields()[8].schema(), other.typeCount);
        fieldSetFlags()[8] = true;
      }
      if (isValidValue(fields()[9], other.biotypeCount)) {
        this.biotypeCount = data().deepCopy(fields()[9].schema(), other.biotypeCount);
        fieldSetFlags()[9] = true;
      }
      if (isValidValue(fields()[10], other.consequenceTypeCount)) {
        this.consequenceTypeCount = data().deepCopy(fields()[10].schema(), other.consequenceTypeCount);
        fieldSetFlags()[10] = true;
      }
      if (isValidValue(fields()[11], other.chromosomeCount)) {
        this.chromosomeCount = data().deepCopy(fields()[11].schema(), other.chromosomeCount);
        fieldSetFlags()[11] = true;
      }
      if (isValidValue(fields()[12], other.chromosomeDensity)) {
        this.chromosomeDensity = data().deepCopy(fields()[12].schema(), other.chromosomeDensity);
        fieldSetFlags()[12] = true;
      }
    }
    
    /** Creates a Builder by copying an existing VariantSetStats instance */
    private Builder(org.opencb.biodata.models.variant.metadata.VariantSetStats other) {
            super(org.opencb.biodata.models.variant.metadata.VariantSetStats.SCHEMA$);
      if (isValidValue(fields()[0], other.variantCount)) {
        this.variantCount = data().deepCopy(fields()[0].schema(), other.variantCount);
        fieldSetFlags()[0] = true;
      }
      if (isValidValue(fields()[1], other.sampleCount)) {
        this.sampleCount = data().deepCopy(fields()[1].schema(), other.sampleCount);
        fieldSetFlags()[1] = true;
      }
      if (isValidValue(fields()[2], other.filterCount)) {
        this.filterCount = data().deepCopy(fields()[2].schema(), other.filterCount);
        fieldSetFlags()[2] = true;
      }
      if (isValidValue(fields()[3], other.genotypeCount)) {
        this.genotypeCount = data().deepCopy(fields()[3].schema(), other.genotypeCount);
        fieldSetFlags()[3] = true;
      }
      if (isValidValue(fields()[4], other.filesCount)) {
        this.filesCount = data().deepCopy(fields()[4].schema(), other.filesCount);
        fieldSetFlags()[4] = true;
      }
      if (isValidValue(fields()[5], other.tiTvRatio)) {
        this.tiTvRatio = data().deepCopy(fields()[5].schema(), other.tiTvRatio);
        fieldSetFlags()[5] = true;
      }
      if (isValidValue(fields()[6], other.qualityAvg)) {
        this.qualityAvg = data().deepCopy(fields()[6].schema(), other.qualityAvg);
        fieldSetFlags()[6] = true;
      }
      if (isValidValue(fields()[7], other.qualityStdDev)) {
        this.qualityStdDev = data().deepCopy(fields()[7].schema(), other.qualityStdDev);
        fieldSetFlags()[7] = true;
      }
      if (isValidValue(fields()[8], other.typeCount)) {
        this.typeCount = data().deepCopy(fields()[8].schema(), other.typeCount);
        fieldSetFlags()[8] = true;
      }
      if (isValidValue(fields()[9], other.biotypeCount)) {
        this.biotypeCount = data().deepCopy(fields()[9].schema(), other.biotypeCount);
        fieldSetFlags()[9] = true;
      }
      if (isValidValue(fields()[10], other.consequenceTypeCount)) {
        this.consequenceTypeCount = data().deepCopy(fields()[10].schema(), other.consequenceTypeCount);
        fieldSetFlags()[10] = true;
      }
      if (isValidValue(fields()[11], other.chromosomeCount)) {
        this.chromosomeCount = data().deepCopy(fields()[11].schema(), other.chromosomeCount);
        fieldSetFlags()[11] = true;
      }
      if (isValidValue(fields()[12], other.chromosomeDensity)) {
        this.chromosomeDensity = data().deepCopy(fields()[12].schema(), other.chromosomeDensity);
        fieldSetFlags()[12] = true;
      }
    }

    /** Gets the value of the 'variantCount' field */
    public java.lang.Long getVariantCount() {
      return variantCount;
    }
    
    /** Sets the value of the 'variantCount' field */
    public org.opencb.biodata.models.variant.metadata.VariantSetStats.Builder setVariantCount(long value) {
      validate(fields()[0], value);
      this.variantCount = value;
      fieldSetFlags()[0] = true;
      return this; 
    }
    
    /** Checks whether the 'variantCount' field has been set */
    public boolean hasVariantCount() {
      return fieldSetFlags()[0];
    }
    
    /** Clears the value of the 'variantCount' field */
    public org.opencb.biodata.models.variant.metadata.VariantSetStats.Builder clearVariantCount() {
      fieldSetFlags()[0] = false;
      return this;
    }

    /** Gets the value of the 'sampleCount' field */
    public java.lang.Long getSampleCount() {
      return sampleCount;
    }
    
    /** Sets the value of the 'sampleCount' field */
    public org.opencb.biodata.models.variant.metadata.VariantSetStats.Builder setSampleCount(long value) {
      validate(fields()[1], value);
      this.sampleCount = value;
      fieldSetFlags()[1] = true;
      return this; 
    }
    
    /** Checks whether the 'sampleCount' field has been set */
    public boolean hasSampleCount() {
      return fieldSetFlags()[1];
    }
    
    /** Clears the value of the 'sampleCount' field */
    public org.opencb.biodata.models.variant.metadata.VariantSetStats.Builder clearSampleCount() {
      fieldSetFlags()[1] = false;
      return this;
    }

    /** Gets the value of the 'filterCount' field */
    public java.util.Map getFilterCount() {
      return filterCount;
    }
    
    /** Sets the value of the 'filterCount' field */
    public org.opencb.biodata.models.variant.metadata.VariantSetStats.Builder setFilterCount(java.util.Map value) {
      validate(fields()[2], value);
      this.filterCount = value;
      fieldSetFlags()[2] = true;
      return this; 
    }
    
    /** Checks whether the 'filterCount' field has been set */
    public boolean hasFilterCount() {
      return fieldSetFlags()[2];
    }
    
    /** Clears the value of the 'filterCount' field */
    public org.opencb.biodata.models.variant.metadata.VariantSetStats.Builder clearFilterCount() {
      filterCount = null;
      fieldSetFlags()[2] = false;
      return this;
    }

    /** Gets the value of the 'genotypeCount' field */
    public java.util.Map getGenotypeCount() {
      return genotypeCount;
    }
    
    /** Sets the value of the 'genotypeCount' field */
    public org.opencb.biodata.models.variant.metadata.VariantSetStats.Builder setGenotypeCount(java.util.Map value) {
      validate(fields()[3], value);
      this.genotypeCount = value;
      fieldSetFlags()[3] = true;
      return this; 
    }
    
    /** Checks whether the 'genotypeCount' field has been set */
    public boolean hasGenotypeCount() {
      return fieldSetFlags()[3];
    }
    
    /** Clears the value of the 'genotypeCount' field */
    public org.opencb.biodata.models.variant.metadata.VariantSetStats.Builder clearGenotypeCount() {
      genotypeCount = null;
      fieldSetFlags()[3] = false;
      return this;
    }

    /** Gets the value of the 'filesCount' field */
    public java.lang.Long getFilesCount() {
      return filesCount;
    }
    
    /** Sets the value of the 'filesCount' field */
    public org.opencb.biodata.models.variant.metadata.VariantSetStats.Builder setFilesCount(long value) {
      validate(fields()[4], value);
      this.filesCount = value;
      fieldSetFlags()[4] = true;
      return this; 
    }
    
    /** Checks whether the 'filesCount' field has been set */
    public boolean hasFilesCount() {
      return fieldSetFlags()[4];
    }
    
    /** Clears the value of the 'filesCount' field */
    public org.opencb.biodata.models.variant.metadata.VariantSetStats.Builder clearFilesCount() {
      fieldSetFlags()[4] = false;
      return this;
    }

    /** Gets the value of the 'tiTvRatio' field */
    public java.lang.Float getTiTvRatio() {
      return tiTvRatio;
    }
    
    /** Sets the value of the 'tiTvRatio' field */
    public org.opencb.biodata.models.variant.metadata.VariantSetStats.Builder setTiTvRatio(float value) {
      validate(fields()[5], value);
      this.tiTvRatio = value;
      fieldSetFlags()[5] = true;
      return this; 
    }
    
    /** Checks whether the 'tiTvRatio' field has been set */
    public boolean hasTiTvRatio() {
      return fieldSetFlags()[5];
    }
    
    /** Clears the value of the 'tiTvRatio' field */
    public org.opencb.biodata.models.variant.metadata.VariantSetStats.Builder clearTiTvRatio() {
      fieldSetFlags()[5] = false;
      return this;
    }

    /** Gets the value of the 'qualityAvg' field */
    public java.lang.Float getQualityAvg() {
      return qualityAvg;
    }
    
    /** Sets the value of the 'qualityAvg' field */
    public org.opencb.biodata.models.variant.metadata.VariantSetStats.Builder setQualityAvg(float value) {
      validate(fields()[6], value);
      this.qualityAvg = value;
      fieldSetFlags()[6] = true;
      return this; 
    }
    
    /** Checks whether the 'qualityAvg' field has been set */
    public boolean hasQualityAvg() {
      return fieldSetFlags()[6];
    }
    
    /** Clears the value of the 'qualityAvg' field */
    public org.opencb.biodata.models.variant.metadata.VariantSetStats.Builder clearQualityAvg() {
      fieldSetFlags()[6] = false;
      return this;
    }

    /** Gets the value of the 'qualityStdDev' field */
    public java.lang.Float getQualityStdDev() {
      return qualityStdDev;
    }
    
    /** Sets the value of the 'qualityStdDev' field */
    public org.opencb.biodata.models.variant.metadata.VariantSetStats.Builder setQualityStdDev(float value) {
      validate(fields()[7], value);
      this.qualityStdDev = value;
      fieldSetFlags()[7] = true;
      return this; 
    }
    
    /** Checks whether the 'qualityStdDev' field has been set */
    public boolean hasQualityStdDev() {
      return fieldSetFlags()[7];
    }
    
    /** Clears the value of the 'qualityStdDev' field */
    public org.opencb.biodata.models.variant.metadata.VariantSetStats.Builder clearQualityStdDev() {
      fieldSetFlags()[7] = false;
      return this;
    }

    /** Gets the value of the 'typeCount' field */
    public java.util.Map getTypeCount() {
      return typeCount;
    }
    
    /** Sets the value of the 'typeCount' field */
    public org.opencb.biodata.models.variant.metadata.VariantSetStats.Builder setTypeCount(java.util.Map value) {
      validate(fields()[8], value);
      this.typeCount = value;
      fieldSetFlags()[8] = true;
      return this; 
    }
    
    /** Checks whether the 'typeCount' field has been set */
    public boolean hasTypeCount() {
      return fieldSetFlags()[8];
    }
    
    /** Clears the value of the 'typeCount' field */
    public org.opencb.biodata.models.variant.metadata.VariantSetStats.Builder clearTypeCount() {
      typeCount = null;
      fieldSetFlags()[8] = false;
      return this;
    }

    /** Gets the value of the 'biotypeCount' field */
    public java.util.Map getBiotypeCount() {
      return biotypeCount;
    }
    
    /** Sets the value of the 'biotypeCount' field */
    public org.opencb.biodata.models.variant.metadata.VariantSetStats.Builder setBiotypeCount(java.util.Map value) {
      validate(fields()[9], value);
      this.biotypeCount = value;
      fieldSetFlags()[9] = true;
      return this; 
    }
    
    /** Checks whether the 'biotypeCount' field has been set */
    public boolean hasBiotypeCount() {
      return fieldSetFlags()[9];
    }
    
    /** Clears the value of the 'biotypeCount' field */
    public org.opencb.biodata.models.variant.metadata.VariantSetStats.Builder clearBiotypeCount() {
      biotypeCount = null;
      fieldSetFlags()[9] = false;
      return this;
    }

    /** Gets the value of the 'consequenceTypeCount' field */
    public java.util.Map getConsequenceTypeCount() {
      return consequenceTypeCount;
    }
    
    /** Sets the value of the 'consequenceTypeCount' field */
    public org.opencb.biodata.models.variant.metadata.VariantSetStats.Builder setConsequenceTypeCount(java.util.Map value) {
      validate(fields()[10], value);
      this.consequenceTypeCount = value;
      fieldSetFlags()[10] = true;
      return this; 
    }
    
    /** Checks whether the 'consequenceTypeCount' field has been set */
    public boolean hasConsequenceTypeCount() {
      return fieldSetFlags()[10];
    }
    
    /** Clears the value of the 'consequenceTypeCount' field */
    public org.opencb.biodata.models.variant.metadata.VariantSetStats.Builder clearConsequenceTypeCount() {
      consequenceTypeCount = null;
      fieldSetFlags()[10] = false;
      return this;
    }

    /** Gets the value of the 'chromosomeCount' field */
    public java.util.Map getChromosomeCount() {
      return chromosomeCount;
    }
    
    /** Sets the value of the 'chromosomeCount' field */
    public org.opencb.biodata.models.variant.metadata.VariantSetStats.Builder setChromosomeCount(java.util.Map value) {
      validate(fields()[11], value);
      this.chromosomeCount = value;
      fieldSetFlags()[11] = true;
      return this; 
    }
    
    /** Checks whether the 'chromosomeCount' field has been set */
    public boolean hasChromosomeCount() {
      return fieldSetFlags()[11];
    }
    
    /** Clears the value of the 'chromosomeCount' field */
    public org.opencb.biodata.models.variant.metadata.VariantSetStats.Builder clearChromosomeCount() {
      chromosomeCount = null;
      fieldSetFlags()[11] = false;
      return this;
    }

    /** Gets the value of the 'chromosomeDensity' field */
    public java.util.Map getChromosomeDensity() {
      return chromosomeDensity;
    }
    
    /** Sets the value of the 'chromosomeDensity' field */
    public org.opencb.biodata.models.variant.metadata.VariantSetStats.Builder setChromosomeDensity(java.util.Map value) {
      validate(fields()[12], value);
      this.chromosomeDensity = value;
      fieldSetFlags()[12] = true;
      return this; 
    }
    
    /** Checks whether the 'chromosomeDensity' field has been set */
    public boolean hasChromosomeDensity() {
      return fieldSetFlags()[12];
    }
    
    /** Clears the value of the 'chromosomeDensity' field */
    public org.opencb.biodata.models.variant.metadata.VariantSetStats.Builder clearChromosomeDensity() {
      chromosomeDensity = null;
      fieldSetFlags()[12] = false;
      return this;
    }

    @Override
    public VariantSetStats build() {
      try {
        VariantSetStats record = new VariantSetStats();
        record.variantCount = fieldSetFlags()[0] ? this.variantCount : (java.lang.Long) defaultValue(fields()[0]);
        record.sampleCount = fieldSetFlags()[1] ? this.sampleCount : (java.lang.Long) defaultValue(fields()[1]);
        record.filterCount = fieldSetFlags()[2] ? this.filterCount : (java.util.Map) defaultValue(fields()[2]);
        record.genotypeCount = fieldSetFlags()[3] ? this.genotypeCount : (java.util.Map) defaultValue(fields()[3]);
        record.filesCount = fieldSetFlags()[4] ? this.filesCount : (java.lang.Long) defaultValue(fields()[4]);
        record.tiTvRatio = fieldSetFlags()[5] ? this.tiTvRatio : (java.lang.Float) defaultValue(fields()[5]);
        record.qualityAvg = fieldSetFlags()[6] ? this.qualityAvg : (java.lang.Float) defaultValue(fields()[6]);
        record.qualityStdDev = fieldSetFlags()[7] ? this.qualityStdDev : (java.lang.Float) defaultValue(fields()[7]);
        record.typeCount = fieldSetFlags()[8] ? this.typeCount : (java.util.Map) defaultValue(fields()[8]);
        record.biotypeCount = fieldSetFlags()[9] ? this.biotypeCount : (java.util.Map) defaultValue(fields()[9]);
        record.consequenceTypeCount = fieldSetFlags()[10] ? this.consequenceTypeCount : (java.util.Map) defaultValue(fields()[10]);
        record.chromosomeCount = fieldSetFlags()[11] ? this.chromosomeCount : (java.util.Map) defaultValue(fields()[11]);
        record.chromosomeDensity = fieldSetFlags()[12] ? this.chromosomeDensity : (java.util.Map) defaultValue(fields()[12]);
        return record;
      } catch (Exception e) {
        throw new org.apache.avro.AvroRuntimeException(e);
      }
    }
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy