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

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

The newest version!
/**
 * Autogenerated by Avro
 * 
 * DO NOT EDIT DIRECTLY
 */
package org.opencb.biodata.models.variant.metadata;  
@SuppressWarnings("all")
@org.apache.avro.specific.AvroGenerated
public class SampleVariantStats 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\":\"SampleVariantStats\",\"namespace\":\"org.opencb.biodata.models.variant.metadata\",\"fields\":[{\"name\":\"id\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"doc\":\"Sample identifier *\"},{\"name\":\"variantCount\",\"type\":\"int\",\"doc\":\"Number of variants where the sample has the main allele (i.e. 0/1, 1/1, ./1, 1/2, ...)\"},{\"name\":\"chromosomeCount\",\"type\":{\"type\":\"map\",\"values\":\"int\",\"avro.java.string\":\"String\"},\"doc\":\"Number of variants per chromosome *\",\"default\":{}},{\"name\":\"typeCount\",\"type\":{\"type\":\"map\",\"values\":\"int\",\"avro.java.string\":\"String\"},\"doc\":\"Variants count group by type. e.g. SNP, INDEL, MNP, SNV, ...\",\"default\":{}},{\"name\":\"genotypeCount\",\"type\":{\"type\":\"map\",\"values\":\"int\",\"avro.java.string\":\"String\"},\"doc\":\"Number of variants per genotype. Only counts genotypes with the main allele. Phase is ignored. *\",\"default\":{}},{\"name\":\"indelLengthCount\",\"type\":{\"type\":\"record\",\"name\":\"IndelLength\",\"fields\":[{\"name\":\"lt5\",\"type\":\"int\"},{\"name\":\"lt10\",\"type\":\"int\"},{\"name\":\"lt15\",\"type\":\"int\"},{\"name\":\"lt20\",\"type\":\"int\"},{\"name\":\"gte20\",\"type\":\"int\"}]},\"doc\":\"Indel length grouped in ranges *\"},{\"name\":\"filterCount\",\"type\":{\"type\":\"map\",\"values\":\"int\",\"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\":\"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\":\"heterozygosityRate\",\"type\":\"float\",\"doc\":\"* Heterozygosity rate as defined by PLINK: (N–O)/N\\n         *\\n         * N is the number of non-missing genotypes\\n         * O is the observed number of homozygous genotypes for a given individual\\n         *\"},{\"name\":\"mendelianErrorCount\",\"type\":{\"type\":\"map\",\"values\":{\"type\":\"map\",\"values\":\"int\",\"avro.java.string\":\"String\"},\"avro.java.string\":\"String\"},\"doc\":\"Number of mendelian errors grouped by PLINK error codes grouped by Chromosome. *\",\"default\":{}},{\"name\":\"depthCount\",\"type\":{\"type\":\"record\",\"name\":\"DepthCount\",\"fields\":[{\"name\":\"na\",\"type\":\"int\"},{\"name\":\"lt5\",\"type\":\"int\"},{\"name\":\"lt10\",\"type\":\"int\"},{\"name\":\"lt15\",\"type\":\"int\"},{\"name\":\"lt20\",\"type\":\"int\"},{\"name\":\"gte20\",\"type\":\"int\"}]}},{\"name\":\"consequenceTypeCount\",\"type\":{\"type\":\"map\",\"values\":\"int\",\"avro.java.string\":\"String\"},\"doc\":\"* Variants count group by consequence type. e.g. missense_variant, synonymous_variant, stop_lost, ...\\n         * Each counter is increased at most one per variant. If multiple overlapping transcripts have the same consequence type, it will count as one.\",\"default\":{}},{\"name\":\"biotypeCount\",\"type\":{\"type\":\"map\",\"values\":\"int\",\"avro.java.string\":\"String\"},\"doc\":\"* Variants count group by biotype. e.g. protein-coding, miRNA, lncRNA, ...\\n         * Each counter is increased at most one per variant. If multiple overlapping genes have the same biotypes, it will count as one.\",\"default\":{}},{\"name\":\"clinicalSignificanceCount\",\"type\":{\"type\":\"map\",\"values\":\"int\",\"avro.java.string\":\"String\"},\"doc\":\"* Variants count group by clinical significance. e.g. benign, likely_benign, likely_pathogenic, pathogenic, uncertain_significance  ...\\n         * Each counter is increased at most one per variant. If multiple variant traits have the same clinical significance, it will count as one.\",\"default\":{}}]}");
  public static org.apache.avro.Schema getClassSchema() { return SCHEMA$; }
  /** Sample identifier * */
   private java.lang.String id;
  /** Number of variants where the sample has the main allele (i.e. 0/1, 1/1, ./1, 1/2, ...) */
   private int variantCount;
  /** Number of variants per chromosome * */
   private java.util.Map chromosomeCount;
  /** Variants count group by type. e.g. SNP, INDEL, MNP, SNV, ... */
   private java.util.Map typeCount;
  /** Number of variants per genotype. Only counts genotypes with the main allele. Phase is ignored. * */
   private java.util.Map genotypeCount;
  /** Indel length grouped in ranges * */
   private org.opencb.biodata.models.variant.metadata.IndelLength indelLengthCount;
  /** * 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;
  /** 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;
  /** * Heterozygosity rate as defined by PLINK: (N–O)/N
         *
         * N is the number of non-missing genotypes
         * O is the observed number of homozygous genotypes for a given individual
         * */
   private float heterozygosityRate;
  /** Number of mendelian errors grouped by PLINK error codes grouped by Chromosome. * */
   private java.util.Map> mendelianErrorCount;
   private org.opencb.biodata.models.variant.metadata.DepthCount depthCount;
  /** * Variants count group by consequence type. e.g. missense_variant, synonymous_variant, stop_lost, ...
         * Each counter is increased at most one per variant. If multiple overlapping transcripts have the same consequence type, it will count as one. */
   private java.util.Map consequenceTypeCount;
  /** * Variants count group by biotype. e.g. protein-coding, miRNA, lncRNA, ...
         * Each counter is increased at most one per variant. If multiple overlapping genes have the same biotypes, it will count as one. */
   private java.util.Map biotypeCount;
  /** * Variants count group by clinical significance. e.g. benign, likely_benign, likely_pathogenic, pathogenic, uncertain_significance  ...
         * Each counter is increased at most one per variant. If multiple variant traits have the same clinical significance, it will count as one. */
   private java.util.Map clinicalSignificanceCount;

  /**
   * 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 SampleVariantStats() {}

  /**
   * All-args constructor.
   */
  public SampleVariantStats(java.lang.String id, java.lang.Integer variantCount, java.util.Map chromosomeCount, java.util.Map typeCount, java.util.Map genotypeCount, org.opencb.biodata.models.variant.metadata.IndelLength indelLengthCount, java.util.Map filterCount, java.lang.Float tiTvRatio, java.lang.Float qualityAvg, java.lang.Float qualityStdDev, java.lang.Float heterozygosityRate, java.util.Map> mendelianErrorCount, org.opencb.biodata.models.variant.metadata.DepthCount depthCount, java.util.Map consequenceTypeCount, java.util.Map biotypeCount, java.util.Map clinicalSignificanceCount) {
    this.id = id;
    this.variantCount = variantCount;
    this.chromosomeCount = chromosomeCount;
    this.typeCount = typeCount;
    this.genotypeCount = genotypeCount;
    this.indelLengthCount = indelLengthCount;
    this.filterCount = filterCount;
    this.tiTvRatio = tiTvRatio;
    this.qualityAvg = qualityAvg;
    this.qualityStdDev = qualityStdDev;
    this.heterozygosityRate = heterozygosityRate;
    this.mendelianErrorCount = mendelianErrorCount;
    this.depthCount = depthCount;
    this.consequenceTypeCount = consequenceTypeCount;
    this.biotypeCount = biotypeCount;
    this.clinicalSignificanceCount = clinicalSignificanceCount;
  }

  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 id;
    case 1: return variantCount;
    case 2: return chromosomeCount;
    case 3: return typeCount;
    case 4: return genotypeCount;
    case 5: return indelLengthCount;
    case 6: return filterCount;
    case 7: return tiTvRatio;
    case 8: return qualityAvg;
    case 9: return qualityStdDev;
    case 10: return heterozygosityRate;
    case 11: return mendelianErrorCount;
    case 12: return depthCount;
    case 13: return consequenceTypeCount;
    case 14: return biotypeCount;
    case 15: return clinicalSignificanceCount;
    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: id = (java.lang.String)value$; break;
    case 1: variantCount = (java.lang.Integer)value$; break;
    case 2: chromosomeCount = (java.util.Map)value$; break;
    case 3: typeCount = (java.util.Map)value$; break;
    case 4: genotypeCount = (java.util.Map)value$; break;
    case 5: indelLengthCount = (org.opencb.biodata.models.variant.metadata.IndelLength)value$; break;
    case 6: filterCount = (java.util.Map)value$; break;
    case 7: tiTvRatio = (java.lang.Float)value$; break;
    case 8: qualityAvg = (java.lang.Float)value$; break;
    case 9: qualityStdDev = (java.lang.Float)value$; break;
    case 10: heterozygosityRate = (java.lang.Float)value$; break;
    case 11: mendelianErrorCount = (java.util.Map>)value$; break;
    case 12: depthCount = (org.opencb.biodata.models.variant.metadata.DepthCount)value$; break;
    case 13: consequenceTypeCount = (java.util.Map)value$; break;
    case 14: biotypeCount = (java.util.Map)value$; break;
    case 15: clinicalSignificanceCount = (java.util.Map)value$; break;
    default: throw new org.apache.avro.AvroRuntimeException("Bad index");
    }
  }

  /**
   * Gets the value of the 'id' field.
   * Sample identifier *   */
  public java.lang.String getId() {
    return id;
  }

  /**
   * Sets the value of the 'id' field.
   * Sample identifier *   * @param value the value to set.
   */
  public void setId(java.lang.String value) {
    this.id = value;
  }

  /**
   * Gets the value of the 'variantCount' field.
   * Number of variants where the sample has the main allele (i.e. 0/1, 1/1, ./1, 1/2, ...)   */
  public java.lang.Integer getVariantCount() {
    return variantCount;
  }

  /**
   * Sets the value of the 'variantCount' field.
   * Number of variants where the sample has the main allele (i.e. 0/1, 1/1, ./1, 1/2, ...)   * @param value the value to set.
   */
  public void setVariantCount(java.lang.Integer value) {
    this.variantCount = 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 '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 'genotypeCount' field.
   * Number of variants per genotype. Only counts genotypes with the main allele. Phase is ignored. *   */
  public java.util.Map getGenotypeCount() {
    return genotypeCount;
  }

  /**
   * Sets the value of the 'genotypeCount' field.
   * Number of variants per genotype. Only counts genotypes with the main allele. Phase is ignored. *   * @param value the value to set.
   */
  public void setGenotypeCount(java.util.Map value) {
    this.genotypeCount = value;
  }

  /**
   * Gets the value of the 'indelLengthCount' field.
   * Indel length grouped in ranges *   */
  public org.opencb.biodata.models.variant.metadata.IndelLength getIndelLengthCount() {
    return indelLengthCount;
  }

  /**
   * Sets the value of the 'indelLengthCount' field.
   * Indel length grouped in ranges *   * @param value the value to set.
   */
  public void setIndelLengthCount(org.opencb.biodata.models.variant.metadata.IndelLength value) {
    this.indelLengthCount = 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 '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 'heterozygosityRate' field.
   * * Heterozygosity rate as defined by PLINK: (N–O)/N
         *
         * N is the number of non-missing genotypes
         * O is the observed number of homozygous genotypes for a given individual
         *   */
  public java.lang.Float getHeterozygosityRate() {
    return heterozygosityRate;
  }

  /**
   * Sets the value of the 'heterozygosityRate' field.
   * * Heterozygosity rate as defined by PLINK: (N–O)/N
         *
         * N is the number of non-missing genotypes
         * O is the observed number of homozygous genotypes for a given individual
         *   * @param value the value to set.
   */
  public void setHeterozygosityRate(java.lang.Float value) {
    this.heterozygosityRate = value;
  }

  /**
   * Gets the value of the 'mendelianErrorCount' field.
   * Number of mendelian errors grouped by PLINK error codes grouped by Chromosome. *   */
  public java.util.Map> getMendelianErrorCount() {
    return mendelianErrorCount;
  }

  /**
   * Sets the value of the 'mendelianErrorCount' field.
   * Number of mendelian errors grouped by PLINK error codes grouped by Chromosome. *   * @param value the value to set.
   */
  public void setMendelianErrorCount(java.util.Map> value) {
    this.mendelianErrorCount = value;
  }

  /**
   * Gets the value of the 'depthCount' field.
   */
  public org.opencb.biodata.models.variant.metadata.DepthCount getDepthCount() {
    return depthCount;
  }

  /**
   * Sets the value of the 'depthCount' field.
   * @param value the value to set.
   */
  public void setDepthCount(org.opencb.biodata.models.variant.metadata.DepthCount value) {
    this.depthCount = value;
  }

  /**
   * Gets the value of the 'consequenceTypeCount' field.
   * * Variants count group by consequence type. e.g. missense_variant, synonymous_variant, stop_lost, ...
         * Each counter is increased at most one per variant. If multiple overlapping transcripts have the same consequence type, it will count as one.   */
  public java.util.Map getConsequenceTypeCount() {
    return consequenceTypeCount;
  }

  /**
   * Sets the value of the 'consequenceTypeCount' field.
   * * Variants count group by consequence type. e.g. missense_variant, synonymous_variant, stop_lost, ...
         * Each counter is increased at most one per variant. If multiple overlapping transcripts have the same consequence type, it will count as one.   * @param value the value to set.
   */
  public void setConsequenceTypeCount(java.util.Map value) {
    this.consequenceTypeCount = value;
  }

  /**
   * Gets the value of the 'biotypeCount' field.
   * * Variants count group by biotype. e.g. protein-coding, miRNA, lncRNA, ...
         * Each counter is increased at most one per variant. If multiple overlapping genes have the same biotypes, it will count as one.   */
  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, ...
         * Each counter is increased at most one per variant. If multiple overlapping genes have the same biotypes, it will count as one.   * @param value the value to set.
   */
  public void setBiotypeCount(java.util.Map value) {
    this.biotypeCount = value;
  }

  /**
   * Gets the value of the 'clinicalSignificanceCount' field.
   * * Variants count group by clinical significance. e.g. benign, likely_benign, likely_pathogenic, pathogenic, uncertain_significance  ...
         * Each counter is increased at most one per variant. If multiple variant traits have the same clinical significance, it will count as one.   */
  public java.util.Map getClinicalSignificanceCount() {
    return clinicalSignificanceCount;
  }

  /**
   * Sets the value of the 'clinicalSignificanceCount' field.
   * * Variants count group by clinical significance. e.g. benign, likely_benign, likely_pathogenic, pathogenic, uncertain_significance  ...
         * Each counter is increased at most one per variant. If multiple variant traits have the same clinical significance, it will count as one.   * @param value the value to set.
   */
  public void setClinicalSignificanceCount(java.util.Map value) {
    this.clinicalSignificanceCount = value;
  }

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

    private java.lang.String id;
    private int variantCount;
    private java.util.Map chromosomeCount;
    private java.util.Map typeCount;
    private java.util.Map genotypeCount;
    private org.opencb.biodata.models.variant.metadata.IndelLength indelLengthCount;
    private java.util.Map filterCount;
    private float tiTvRatio;
    private float qualityAvg;
    private float qualityStdDev;
    private float heterozygosityRate;
    private java.util.Map> mendelianErrorCount;
    private org.opencb.biodata.models.variant.metadata.DepthCount depthCount;
    private java.util.Map consequenceTypeCount;
    private java.util.Map biotypeCount;
    private java.util.Map clinicalSignificanceCount;

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

    /** Gets the value of the 'id' field */
    public java.lang.String getId() {
      return id;
    }
    
    /** Sets the value of the 'id' field */
    public org.opencb.biodata.models.variant.metadata.SampleVariantStats.Builder setId(java.lang.String value) {
      validate(fields()[0], value);
      this.id = value;
      fieldSetFlags()[0] = true;
      return this; 
    }
    
    /** Checks whether the 'id' field has been set */
    public boolean hasId() {
      return fieldSetFlags()[0];
    }
    
    /** Clears the value of the 'id' field */
    public org.opencb.biodata.models.variant.metadata.SampleVariantStats.Builder clearId() {
      id = null;
      fieldSetFlags()[0] = false;
      return this;
    }

    /** Gets the value of the 'variantCount' field */
    public java.lang.Integer getVariantCount() {
      return variantCount;
    }
    
    /** Sets the value of the 'variantCount' field */
    public org.opencb.biodata.models.variant.metadata.SampleVariantStats.Builder setVariantCount(int value) {
      validate(fields()[1], value);
      this.variantCount = value;
      fieldSetFlags()[1] = true;
      return this; 
    }
    
    /** Checks whether the 'variantCount' field has been set */
    public boolean hasVariantCount() {
      return fieldSetFlags()[1];
    }
    
    /** Clears the value of the 'variantCount' field */
    public org.opencb.biodata.models.variant.metadata.SampleVariantStats.Builder clearVariantCount() {
      fieldSetFlags()[1] = 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.SampleVariantStats.Builder setChromosomeCount(java.util.Map value) {
      validate(fields()[2], value);
      this.chromosomeCount = value;
      fieldSetFlags()[2] = true;
      return this; 
    }
    
    /** Checks whether the 'chromosomeCount' field has been set */
    public boolean hasChromosomeCount() {
      return fieldSetFlags()[2];
    }
    
    /** Clears the value of the 'chromosomeCount' field */
    public org.opencb.biodata.models.variant.metadata.SampleVariantStats.Builder clearChromosomeCount() {
      chromosomeCount = null;
      fieldSetFlags()[2] = 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.SampleVariantStats.Builder setTypeCount(java.util.Map value) {
      validate(fields()[3], value);
      this.typeCount = value;
      fieldSetFlags()[3] = true;
      return this; 
    }
    
    /** Checks whether the 'typeCount' field has been set */
    public boolean hasTypeCount() {
      return fieldSetFlags()[3];
    }
    
    /** Clears the value of the 'typeCount' field */
    public org.opencb.biodata.models.variant.metadata.SampleVariantStats.Builder clearTypeCount() {
      typeCount = null;
      fieldSetFlags()[3] = 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.SampleVariantStats.Builder setGenotypeCount(java.util.Map value) {
      validate(fields()[4], value);
      this.genotypeCount = value;
      fieldSetFlags()[4] = true;
      return this; 
    }
    
    /** Checks whether the 'genotypeCount' field has been set */
    public boolean hasGenotypeCount() {
      return fieldSetFlags()[4];
    }
    
    /** Clears the value of the 'genotypeCount' field */
    public org.opencb.biodata.models.variant.metadata.SampleVariantStats.Builder clearGenotypeCount() {
      genotypeCount = null;
      fieldSetFlags()[4] = false;
      return this;
    }

    /** Gets the value of the 'indelLengthCount' field */
    public org.opencb.biodata.models.variant.metadata.IndelLength getIndelLengthCount() {
      return indelLengthCount;
    }
    
    /** Sets the value of the 'indelLengthCount' field */
    public org.opencb.biodata.models.variant.metadata.SampleVariantStats.Builder setIndelLengthCount(org.opencb.biodata.models.variant.metadata.IndelLength value) {
      validate(fields()[5], value);
      this.indelLengthCount = value;
      fieldSetFlags()[5] = true;
      return this; 
    }
    
    /** Checks whether the 'indelLengthCount' field has been set */
    public boolean hasIndelLengthCount() {
      return fieldSetFlags()[5];
    }
    
    /** Clears the value of the 'indelLengthCount' field */
    public org.opencb.biodata.models.variant.metadata.SampleVariantStats.Builder clearIndelLengthCount() {
      indelLengthCount = null;
      fieldSetFlags()[5] = 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.SampleVariantStats.Builder setFilterCount(java.util.Map value) {
      validate(fields()[6], value);
      this.filterCount = value;
      fieldSetFlags()[6] = true;
      return this; 
    }
    
    /** Checks whether the 'filterCount' field has been set */
    public boolean hasFilterCount() {
      return fieldSetFlags()[6];
    }
    
    /** Clears the value of the 'filterCount' field */
    public org.opencb.biodata.models.variant.metadata.SampleVariantStats.Builder clearFilterCount() {
      filterCount = null;
      fieldSetFlags()[6] = 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.SampleVariantStats.Builder setTiTvRatio(float value) {
      validate(fields()[7], value);
      this.tiTvRatio = value;
      fieldSetFlags()[7] = true;
      return this; 
    }
    
    /** Checks whether the 'tiTvRatio' field has been set */
    public boolean hasTiTvRatio() {
      return fieldSetFlags()[7];
    }
    
    /** Clears the value of the 'tiTvRatio' field */
    public org.opencb.biodata.models.variant.metadata.SampleVariantStats.Builder clearTiTvRatio() {
      fieldSetFlags()[7] = 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.SampleVariantStats.Builder setQualityAvg(float value) {
      validate(fields()[8], value);
      this.qualityAvg = value;
      fieldSetFlags()[8] = true;
      return this; 
    }
    
    /** Checks whether the 'qualityAvg' field has been set */
    public boolean hasQualityAvg() {
      return fieldSetFlags()[8];
    }
    
    /** Clears the value of the 'qualityAvg' field */
    public org.opencb.biodata.models.variant.metadata.SampleVariantStats.Builder clearQualityAvg() {
      fieldSetFlags()[8] = 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.SampleVariantStats.Builder setQualityStdDev(float value) {
      validate(fields()[9], value);
      this.qualityStdDev = value;
      fieldSetFlags()[9] = true;
      return this; 
    }
    
    /** Checks whether the 'qualityStdDev' field has been set */
    public boolean hasQualityStdDev() {
      return fieldSetFlags()[9];
    }
    
    /** Clears the value of the 'qualityStdDev' field */
    public org.opencb.biodata.models.variant.metadata.SampleVariantStats.Builder clearQualityStdDev() {
      fieldSetFlags()[9] = false;
      return this;
    }

    /** Gets the value of the 'heterozygosityRate' field */
    public java.lang.Float getHeterozygosityRate() {
      return heterozygosityRate;
    }
    
    /** Sets the value of the 'heterozygosityRate' field */
    public org.opencb.biodata.models.variant.metadata.SampleVariantStats.Builder setHeterozygosityRate(float value) {
      validate(fields()[10], value);
      this.heterozygosityRate = value;
      fieldSetFlags()[10] = true;
      return this; 
    }
    
    /** Checks whether the 'heterozygosityRate' field has been set */
    public boolean hasHeterozygosityRate() {
      return fieldSetFlags()[10];
    }
    
    /** Clears the value of the 'heterozygosityRate' field */
    public org.opencb.biodata.models.variant.metadata.SampleVariantStats.Builder clearHeterozygosityRate() {
      fieldSetFlags()[10] = false;
      return this;
    }

    /** Gets the value of the 'mendelianErrorCount' field */
    public java.util.Map> getMendelianErrorCount() {
      return mendelianErrorCount;
    }
    
    /** Sets the value of the 'mendelianErrorCount' field */
    public org.opencb.biodata.models.variant.metadata.SampleVariantStats.Builder setMendelianErrorCount(java.util.Map> value) {
      validate(fields()[11], value);
      this.mendelianErrorCount = value;
      fieldSetFlags()[11] = true;
      return this; 
    }
    
    /** Checks whether the 'mendelianErrorCount' field has been set */
    public boolean hasMendelianErrorCount() {
      return fieldSetFlags()[11];
    }
    
    /** Clears the value of the 'mendelianErrorCount' field */
    public org.opencb.biodata.models.variant.metadata.SampleVariantStats.Builder clearMendelianErrorCount() {
      mendelianErrorCount = null;
      fieldSetFlags()[11] = false;
      return this;
    }

    /** Gets the value of the 'depthCount' field */
    public org.opencb.biodata.models.variant.metadata.DepthCount getDepthCount() {
      return depthCount;
    }
    
    /** Sets the value of the 'depthCount' field */
    public org.opencb.biodata.models.variant.metadata.SampleVariantStats.Builder setDepthCount(org.opencb.biodata.models.variant.metadata.DepthCount value) {
      validate(fields()[12], value);
      this.depthCount = value;
      fieldSetFlags()[12] = true;
      return this; 
    }
    
    /** Checks whether the 'depthCount' field has been set */
    public boolean hasDepthCount() {
      return fieldSetFlags()[12];
    }
    
    /** Clears the value of the 'depthCount' field */
    public org.opencb.biodata.models.variant.metadata.SampleVariantStats.Builder clearDepthCount() {
      depthCount = null;
      fieldSetFlags()[12] = 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.SampleVariantStats.Builder setConsequenceTypeCount(java.util.Map value) {
      validate(fields()[13], value);
      this.consequenceTypeCount = value;
      fieldSetFlags()[13] = true;
      return this; 
    }
    
    /** Checks whether the 'consequenceTypeCount' field has been set */
    public boolean hasConsequenceTypeCount() {
      return fieldSetFlags()[13];
    }
    
    /** Clears the value of the 'consequenceTypeCount' field */
    public org.opencb.biodata.models.variant.metadata.SampleVariantStats.Builder clearConsequenceTypeCount() {
      consequenceTypeCount = null;
      fieldSetFlags()[13] = 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.SampleVariantStats.Builder setBiotypeCount(java.util.Map value) {
      validate(fields()[14], value);
      this.biotypeCount = value;
      fieldSetFlags()[14] = true;
      return this; 
    }
    
    /** Checks whether the 'biotypeCount' field has been set */
    public boolean hasBiotypeCount() {
      return fieldSetFlags()[14];
    }
    
    /** Clears the value of the 'biotypeCount' field */
    public org.opencb.biodata.models.variant.metadata.SampleVariantStats.Builder clearBiotypeCount() {
      biotypeCount = null;
      fieldSetFlags()[14] = false;
      return this;
    }

    /** Gets the value of the 'clinicalSignificanceCount' field */
    public java.util.Map getClinicalSignificanceCount() {
      return clinicalSignificanceCount;
    }
    
    /** Sets the value of the 'clinicalSignificanceCount' field */
    public org.opencb.biodata.models.variant.metadata.SampleVariantStats.Builder setClinicalSignificanceCount(java.util.Map value) {
      validate(fields()[15], value);
      this.clinicalSignificanceCount = value;
      fieldSetFlags()[15] = true;
      return this; 
    }
    
    /** Checks whether the 'clinicalSignificanceCount' field has been set */
    public boolean hasClinicalSignificanceCount() {
      return fieldSetFlags()[15];
    }
    
    /** Clears the value of the 'clinicalSignificanceCount' field */
    public org.opencb.biodata.models.variant.metadata.SampleVariantStats.Builder clearClinicalSignificanceCount() {
      clinicalSignificanceCount = null;
      fieldSetFlags()[15] = false;
      return this;
    }

    @Override
    public SampleVariantStats build() {
      try {
        SampleVariantStats record = new SampleVariantStats();
        record.id = fieldSetFlags()[0] ? this.id : (java.lang.String) defaultValue(fields()[0]);
        record.variantCount = fieldSetFlags()[1] ? this.variantCount : (java.lang.Integer) defaultValue(fields()[1]);
        record.chromosomeCount = fieldSetFlags()[2] ? this.chromosomeCount : (java.util.Map) defaultValue(fields()[2]);
        record.typeCount = fieldSetFlags()[3] ? this.typeCount : (java.util.Map) defaultValue(fields()[3]);
        record.genotypeCount = fieldSetFlags()[4] ? this.genotypeCount : (java.util.Map) defaultValue(fields()[4]);
        record.indelLengthCount = fieldSetFlags()[5] ? this.indelLengthCount : (org.opencb.biodata.models.variant.metadata.IndelLength) defaultValue(fields()[5]);
        record.filterCount = fieldSetFlags()[6] ? this.filterCount : (java.util.Map) defaultValue(fields()[6]);
        record.tiTvRatio = fieldSetFlags()[7] ? this.tiTvRatio : (java.lang.Float) defaultValue(fields()[7]);
        record.qualityAvg = fieldSetFlags()[8] ? this.qualityAvg : (java.lang.Float) defaultValue(fields()[8]);
        record.qualityStdDev = fieldSetFlags()[9] ? this.qualityStdDev : (java.lang.Float) defaultValue(fields()[9]);
        record.heterozygosityRate = fieldSetFlags()[10] ? this.heterozygosityRate : (java.lang.Float) defaultValue(fields()[10]);
        record.mendelianErrorCount = fieldSetFlags()[11] ? this.mendelianErrorCount : (java.util.Map>) defaultValue(fields()[11]);
        record.depthCount = fieldSetFlags()[12] ? this.depthCount : (org.opencb.biodata.models.variant.metadata.DepthCount) defaultValue(fields()[12]);
        record.consequenceTypeCount = fieldSetFlags()[13] ? this.consequenceTypeCount : (java.util.Map) defaultValue(fields()[13]);
        record.biotypeCount = fieldSetFlags()[14] ? this.biotypeCount : (java.util.Map) defaultValue(fields()[14]);
        record.clinicalSignificanceCount = fieldSetFlags()[15] ? this.clinicalSignificanceCount : (java.util.Map) defaultValue(fields()[15]);
        return record;
      } catch (Exception e) {
        throw new org.apache.avro.AvroRuntimeException(e);
      }
    }
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy