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

org.gel.models.report.avro.AcmgVariantClassification Maven / Gradle / Ivy

/**
 * Autogenerated by Avro
 * 
 * DO NOT EDIT DIRECTLY
 */
package org.gel.models.report.avro;  
@SuppressWarnings("all")
/** Full record for the ACMG variant clasiffication, including all selectedd evidences and the final classification. */
@org.apache.avro.specific.AvroGenerated
public class AcmgVariantClassification 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\":\"AcmgVariantClassification\",\"namespace\":\"org.gel.models.report.avro\",\"doc\":\"Full record for the ACMG variant clasiffication, including all selectedd evidences and the final classification.\",\"fields\":[{\"name\":\"acmgEvidences\",\"type\":{\"type\":\"array\",\"items\":{\"type\":\"record\",\"name\":\"AcmgEvidence\",\"doc\":\"AcmgEvidence. This should be buit for each one of the evidences assing to a variants following the ACMG guidelines.\\n    An AcmgEvidence, should map with one of the criteria defined, i.e, PVS1, BA1, PM1...\",\"fields\":[{\"name\":\"category\",\"type\":{\"type\":\"enum\",\"name\":\"AcmgEvidenceCategory\",\"doc\":\"Each ACMG criterion is classified in one of these categories\",\"symbols\":[\"population_data\",\"computational_and_predictive_data\",\"functional_data\",\"segregation_data\",\"de_novo_data\",\"allelic_data\",\"other_database\",\"other_data\"]},\"doc\":\"Evidence category as defined in ACMG guidelines\"},{\"name\":\"type\",\"type\":{\"type\":\"enum\",\"name\":\"AcmgEvidenceType\",\"doc\":\"Each ACMG cirterion will be classifed as benign or pathogenic\",\"symbols\":[\"benign\",\"pathogenic\"]},\"doc\":\"Evidence type: benign or pathogenic\"},{\"name\":\"weight\",\"type\":{\"type\":\"enum\",\"name\":\"AcmgEvidenceWeight\",\"doc\":\"Each ACMG criterion is weighted using the following terms:\\n\\n* `stand_alone`: `A`, stand-alone applied for benign variant critieria `(BA1)`\\n* `supporting`: `P`, supporting applied for benign variant critieria `(BP1-6)` and pathogenic variant criteria `(PP1-5)`\\n* `moderate`: `M`, moderate applied for pathogenic variant critieria (PM1-6)\\n* `strong`: `S`, strong applied for pathogenic variant critieria (PS1-4)\\n* `very_strong`: `S`, Very Stong applied for pathogenic variant critieria (PVS1)\",\"symbols\":[\"stand_alone\",\"supporting\",\"moderate\",\"strong\",\"very_strong\"]},\"doc\":\"Default strength for criterion as defined in Table 3 of ACMG guidelines (Richards et al 2015). e.g. PM2 would be \\\"moderate\\\"\"},{\"name\":\"modifier\",\"type\":\"int\",\"doc\":\"The number suffix at the end of the ACMG criteria code e.g PM2 would be 2\"},{\"name\":\"activationStrength\",\"type\":{\"type\":\"enum\",\"name\":\"ActivationStrength\",\"doc\":\"Activation Strength enumeration:\\n* `strong`\\n* `moderate`\\n* `supporting`\\n* `very_strong`\\n* `stand_alone`\",\"symbols\":[\"strong\",\"moderate\",\"supporting\",\"very_strong\",\"stand_alone\"]},\"doc\":\"The strength this criterion has been used at in this interpretation. e.g. if PM2 was only used at \\\"supporting\\\" rather than \\\"moderate\\\", the activation strength would be \\\"supporting\\\"\"},{\"name\":\"description\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"doc\":\"The description of the evidence as described in ACMG guidelines e.g. for PM2 the description would be \\\"Absent from controls (or at extremely low frequency if recessive) in Exome Sequencing Project, 1000 Genomes Project, or Exome Aggregation Consortium\\\"\"},{\"name\":\"comments\",\"type\":[\"null\",{\"type\":\"array\",\"items\":{\"type\":\"record\",\"name\":\"UserComment\",\"fields\":[{\"name\":\"comment\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"doc\":\"Comment text\"},{\"name\":\"user\",\"type\":[\"null\",{\"type\":\"record\",\"name\":\"User\",\"fields\":[{\"name\":\"userid\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"doc\":\"Azure Active Directory immutable user OID\"},{\"name\":\"email\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"doc\":\"User email address\"},{\"name\":\"username\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"doc\":\"Username\"},{\"name\":\"role\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}]},{\"name\":\"groups\",\"type\":[\"null\",{\"type\":\"array\",\"items\":{\"type\":\"string\",\"avro.java.string\":\"String\"}}]}]}],\"doc\":\"User who created comment\"},{\"name\":\"timestamp\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"doc\":\"Date and time comment was created (ISO 8601 datetime with seconds and timezone e.g. 2020-11-23T15:52:36+00:00)\"}]}}],\"doc\":\"User comments attached to this ACMG criteria in this case\"}]}},\"doc\":\"Details of ACMG criteria used to score this variant\"},{\"name\":\"clinicalSignificance\",\"type\":{\"type\":\"enum\",\"name\":\"ClinicalSignificance\",\"symbols\":[\"benign\",\"likely_benign\",\"likely_pathogenic\",\"pathogenic\",\"uncertain_significance\",\"excluded\"]},\"doc\":\"Final classification selected by user\"},{\"name\":\"calculatedClinicalSignificance\",\"type\":[\"null\",\"ClinicalSignificance\"],\"doc\":\"Classification computed from ACMG scores\"},{\"name\":\"assessment\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}]},{\"name\":\"noAcmgEvidence\",\"type\":[\"null\",{\"type\":\"array\",\"items\":\"AcmgEvidenceCategory\"}],\"doc\":\"ACMG evidence categories for which the user has indicated there is no evidence available\"}]}");
  public static org.apache.avro.Schema getClassSchema() { return SCHEMA$; }
  /** Details of ACMG criteria used to score this variant */
   private java.util.List acmgEvidences;
  /** Final classification selected by user */
   private org.gel.models.report.avro.ClinicalSignificance clinicalSignificance;
  /** Classification computed from ACMG scores */
   private org.gel.models.report.avro.ClinicalSignificance calculatedClinicalSignificance;
   private java.lang.String assessment;
  /** ACMG evidence categories for which the user has indicated there is no evidence available */
   private java.util.List noAcmgEvidence;

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

  /**
   * All-args constructor.
   */
  public AcmgVariantClassification(java.util.List acmgEvidences, org.gel.models.report.avro.ClinicalSignificance clinicalSignificance, org.gel.models.report.avro.ClinicalSignificance calculatedClinicalSignificance, java.lang.String assessment, java.util.List noAcmgEvidence) {
    this.acmgEvidences = acmgEvidences;
    this.clinicalSignificance = clinicalSignificance;
    this.calculatedClinicalSignificance = calculatedClinicalSignificance;
    this.assessment = assessment;
    this.noAcmgEvidence = noAcmgEvidence;
  }

  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 acmgEvidences;
    case 1: return clinicalSignificance;
    case 2: return calculatedClinicalSignificance;
    case 3: return assessment;
    case 4: return noAcmgEvidence;
    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: acmgEvidences = (java.util.List)value$; break;
    case 1: clinicalSignificance = (org.gel.models.report.avro.ClinicalSignificance)value$; break;
    case 2: calculatedClinicalSignificance = (org.gel.models.report.avro.ClinicalSignificance)value$; break;
    case 3: assessment = (java.lang.String)value$; break;
    case 4: noAcmgEvidence = (java.util.List)value$; break;
    default: throw new org.apache.avro.AvroRuntimeException("Bad index");
    }
  }

  /**
   * Gets the value of the 'acmgEvidences' field.
   * Details of ACMG criteria used to score this variant   */
  public java.util.List getAcmgEvidences() {
    return acmgEvidences;
  }

  /**
   * Sets the value of the 'acmgEvidences' field.
   * Details of ACMG criteria used to score this variant   * @param value the value to set.
   */
  public void setAcmgEvidences(java.util.List value) {
    this.acmgEvidences = value;
  }

  /**
   * Gets the value of the 'clinicalSignificance' field.
   * Final classification selected by user   */
  public org.gel.models.report.avro.ClinicalSignificance getClinicalSignificance() {
    return clinicalSignificance;
  }

  /**
   * Sets the value of the 'clinicalSignificance' field.
   * Final classification selected by user   * @param value the value to set.
   */
  public void setClinicalSignificance(org.gel.models.report.avro.ClinicalSignificance value) {
    this.clinicalSignificance = value;
  }

  /**
   * Gets the value of the 'calculatedClinicalSignificance' field.
   * Classification computed from ACMG scores   */
  public org.gel.models.report.avro.ClinicalSignificance getCalculatedClinicalSignificance() {
    return calculatedClinicalSignificance;
  }

  /**
   * Sets the value of the 'calculatedClinicalSignificance' field.
   * Classification computed from ACMG scores   * @param value the value to set.
   */
  public void setCalculatedClinicalSignificance(org.gel.models.report.avro.ClinicalSignificance value) {
    this.calculatedClinicalSignificance = value;
  }

  /**
   * Gets the value of the 'assessment' field.
   */
  public java.lang.String getAssessment() {
    return assessment;
  }

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

  /**
   * Gets the value of the 'noAcmgEvidence' field.
   * ACMG evidence categories for which the user has indicated there is no evidence available   */
  public java.util.List getNoAcmgEvidence() {
    return noAcmgEvidence;
  }

  /**
   * Sets the value of the 'noAcmgEvidence' field.
   * ACMG evidence categories for which the user has indicated there is no evidence available   * @param value the value to set.
   */
  public void setNoAcmgEvidence(java.util.List value) {
    this.noAcmgEvidence = value;
  }

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

    private java.util.List acmgEvidences;
    private org.gel.models.report.avro.ClinicalSignificance clinicalSignificance;
    private org.gel.models.report.avro.ClinicalSignificance calculatedClinicalSignificance;
    private java.lang.String assessment;
    private java.util.List noAcmgEvidence;

    /** Creates a new Builder */
    private Builder() {
      super(org.gel.models.report.avro.AcmgVariantClassification.SCHEMA$);
    }
    
    /** Creates a Builder by copying an existing Builder */
    private Builder(org.gel.models.report.avro.AcmgVariantClassification.Builder other) {
      super(other);
      if (isValidValue(fields()[0], other.acmgEvidences)) {
        this.acmgEvidences = data().deepCopy(fields()[0].schema(), other.acmgEvidences);
        fieldSetFlags()[0] = true;
      }
      if (isValidValue(fields()[1], other.clinicalSignificance)) {
        this.clinicalSignificance = data().deepCopy(fields()[1].schema(), other.clinicalSignificance);
        fieldSetFlags()[1] = true;
      }
      if (isValidValue(fields()[2], other.calculatedClinicalSignificance)) {
        this.calculatedClinicalSignificance = data().deepCopy(fields()[2].schema(), other.calculatedClinicalSignificance);
        fieldSetFlags()[2] = true;
      }
      if (isValidValue(fields()[3], other.assessment)) {
        this.assessment = data().deepCopy(fields()[3].schema(), other.assessment);
        fieldSetFlags()[3] = true;
      }
      if (isValidValue(fields()[4], other.noAcmgEvidence)) {
        this.noAcmgEvidence = data().deepCopy(fields()[4].schema(), other.noAcmgEvidence);
        fieldSetFlags()[4] = true;
      }
    }
    
    /** Creates a Builder by copying an existing AcmgVariantClassification instance */
    private Builder(org.gel.models.report.avro.AcmgVariantClassification other) {
            super(org.gel.models.report.avro.AcmgVariantClassification.SCHEMA$);
      if (isValidValue(fields()[0], other.acmgEvidences)) {
        this.acmgEvidences = data().deepCopy(fields()[0].schema(), other.acmgEvidences);
        fieldSetFlags()[0] = true;
      }
      if (isValidValue(fields()[1], other.clinicalSignificance)) {
        this.clinicalSignificance = data().deepCopy(fields()[1].schema(), other.clinicalSignificance);
        fieldSetFlags()[1] = true;
      }
      if (isValidValue(fields()[2], other.calculatedClinicalSignificance)) {
        this.calculatedClinicalSignificance = data().deepCopy(fields()[2].schema(), other.calculatedClinicalSignificance);
        fieldSetFlags()[2] = true;
      }
      if (isValidValue(fields()[3], other.assessment)) {
        this.assessment = data().deepCopy(fields()[3].schema(), other.assessment);
        fieldSetFlags()[3] = true;
      }
      if (isValidValue(fields()[4], other.noAcmgEvidence)) {
        this.noAcmgEvidence = data().deepCopy(fields()[4].schema(), other.noAcmgEvidence);
        fieldSetFlags()[4] = true;
      }
    }

    /** Gets the value of the 'acmgEvidences' field */
    public java.util.List getAcmgEvidences() {
      return acmgEvidences;
    }
    
    /** Sets the value of the 'acmgEvidences' field */
    public org.gel.models.report.avro.AcmgVariantClassification.Builder setAcmgEvidences(java.util.List value) {
      validate(fields()[0], value);
      this.acmgEvidences = value;
      fieldSetFlags()[0] = true;
      return this; 
    }
    
    /** Checks whether the 'acmgEvidences' field has been set */
    public boolean hasAcmgEvidences() {
      return fieldSetFlags()[0];
    }
    
    /** Clears the value of the 'acmgEvidences' field */
    public org.gel.models.report.avro.AcmgVariantClassification.Builder clearAcmgEvidences() {
      acmgEvidences = null;
      fieldSetFlags()[0] = false;
      return this;
    }

    /** Gets the value of the 'clinicalSignificance' field */
    public org.gel.models.report.avro.ClinicalSignificance getClinicalSignificance() {
      return clinicalSignificance;
    }
    
    /** Sets the value of the 'clinicalSignificance' field */
    public org.gel.models.report.avro.AcmgVariantClassification.Builder setClinicalSignificance(org.gel.models.report.avro.ClinicalSignificance value) {
      validate(fields()[1], value);
      this.clinicalSignificance = value;
      fieldSetFlags()[1] = true;
      return this; 
    }
    
    /** Checks whether the 'clinicalSignificance' field has been set */
    public boolean hasClinicalSignificance() {
      return fieldSetFlags()[1];
    }
    
    /** Clears the value of the 'clinicalSignificance' field */
    public org.gel.models.report.avro.AcmgVariantClassification.Builder clearClinicalSignificance() {
      clinicalSignificance = null;
      fieldSetFlags()[1] = false;
      return this;
    }

    /** Gets the value of the 'calculatedClinicalSignificance' field */
    public org.gel.models.report.avro.ClinicalSignificance getCalculatedClinicalSignificance() {
      return calculatedClinicalSignificance;
    }
    
    /** Sets the value of the 'calculatedClinicalSignificance' field */
    public org.gel.models.report.avro.AcmgVariantClassification.Builder setCalculatedClinicalSignificance(org.gel.models.report.avro.ClinicalSignificance value) {
      validate(fields()[2], value);
      this.calculatedClinicalSignificance = value;
      fieldSetFlags()[2] = true;
      return this; 
    }
    
    /** Checks whether the 'calculatedClinicalSignificance' field has been set */
    public boolean hasCalculatedClinicalSignificance() {
      return fieldSetFlags()[2];
    }
    
    /** Clears the value of the 'calculatedClinicalSignificance' field */
    public org.gel.models.report.avro.AcmgVariantClassification.Builder clearCalculatedClinicalSignificance() {
      calculatedClinicalSignificance = null;
      fieldSetFlags()[2] = false;
      return this;
    }

    /** Gets the value of the 'assessment' field */
    public java.lang.String getAssessment() {
      return assessment;
    }
    
    /** Sets the value of the 'assessment' field */
    public org.gel.models.report.avro.AcmgVariantClassification.Builder setAssessment(java.lang.String value) {
      validate(fields()[3], value);
      this.assessment = value;
      fieldSetFlags()[3] = true;
      return this; 
    }
    
    /** Checks whether the 'assessment' field has been set */
    public boolean hasAssessment() {
      return fieldSetFlags()[3];
    }
    
    /** Clears the value of the 'assessment' field */
    public org.gel.models.report.avro.AcmgVariantClassification.Builder clearAssessment() {
      assessment = null;
      fieldSetFlags()[3] = false;
      return this;
    }

    /** Gets the value of the 'noAcmgEvidence' field */
    public java.util.List getNoAcmgEvidence() {
      return noAcmgEvidence;
    }
    
    /** Sets the value of the 'noAcmgEvidence' field */
    public org.gel.models.report.avro.AcmgVariantClassification.Builder setNoAcmgEvidence(java.util.List value) {
      validate(fields()[4], value);
      this.noAcmgEvidence = value;
      fieldSetFlags()[4] = true;
      return this; 
    }
    
    /** Checks whether the 'noAcmgEvidence' field has been set */
    public boolean hasNoAcmgEvidence() {
      return fieldSetFlags()[4];
    }
    
    /** Clears the value of the 'noAcmgEvidence' field */
    public org.gel.models.report.avro.AcmgVariantClassification.Builder clearNoAcmgEvidence() {
      noAcmgEvidence = null;
      fieldSetFlags()[4] = false;
      return this;
    }

    @Override
    public AcmgVariantClassification build() {
      try {
        AcmgVariantClassification record = new AcmgVariantClassification();
        record.acmgEvidences = fieldSetFlags()[0] ? this.acmgEvidences : (java.util.List) defaultValue(fields()[0]);
        record.clinicalSignificance = fieldSetFlags()[1] ? this.clinicalSignificance : (org.gel.models.report.avro.ClinicalSignificance) defaultValue(fields()[1]);
        record.calculatedClinicalSignificance = fieldSetFlags()[2] ? this.calculatedClinicalSignificance : (org.gel.models.report.avro.ClinicalSignificance) defaultValue(fields()[2]);
        record.assessment = fieldSetFlags()[3] ? this.assessment : (java.lang.String) defaultValue(fields()[3]);
        record.noAcmgEvidence = fieldSetFlags()[4] ? this.noAcmgEvidence : (java.util.List) defaultValue(fields()[4]);
        return record;
      } catch (Exception e) {
        throw new org.apache.avro.AvroRuntimeException(e);
      }
    }
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy