org.opencb.biodata.models.variant.avro.VariantClassification Maven / Gradle / Ivy
The newest version!
/**
* Autogenerated by Avro
*
* DO NOT EDIT DIRECTLY
*/
package org.opencb.biodata.models.variant.avro;
@SuppressWarnings("all")
/** The variant classification according to different properties. */
@org.apache.avro.specific.AvroGenerated
public class VariantClassification 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\":\"VariantClassification\",\"namespace\":\"org.opencb.biodata.models.variant.avro\",\"doc\":\"The variant classification according to different properties.\",\"fields\":[{\"name\":\"clinicalSignificance\",\"type\":[\"null\",{\"type\":\"enum\",\"name\":\"ClinicalSignificance\",\"doc\":\"Mendelian variants classification with ACMG terminology as defined in Richards, S. et al. (2015). Standards and\\n guidelines for the interpretation of sequence variants: a joint consensus recommendation of the American College\\n of Medical Genetics and Genomics and the Association for Molecular Pathology. Genetics in Medicine, 17(5),\\n 405–423. https://doi.org/10.1038/gim.2015.30.\\n\\n Classification for pharmacogenomic variants, variants associated to\\n disease and somatic variants based on the ACMG recommendations and ClinVar classification\\n (https://www.ncbi.nlm.nih.gov/clinvar/docs/clinsig/).\\n\\n* `benign_variant` : Benign variants interpreted for Mendelian disorders\\n* `likely_benign_variant` : Likely benign variants interpreted for Mendelian disorders with a certainty of at least 90%\\n* `pathogenic_variant` : Pathogenic variants interpreted for Mendelian disorders\\n* `likely_pathogenic_variant` : Likely pathogenic variants interpreted for Mendelian disorders with a certainty of at\\nleast 90%\\n* `uncertain_significance` : Uncertain significance variants interpreted for Mendelian disorders. Variants with\\nconflicting evidences should be classified as uncertain_significance\",\"symbols\":[\"benign\",\"likely_benign\",\"VUS\",\"likely_pathogenic\",\"pathogenic\",\"uncertain_significance\"]}],\"doc\":\"The variant's clinical significance.\"},{\"name\":\"drugResponseClassification\",\"type\":[\"null\",{\"type\":\"enum\",\"name\":\"DrugResponseClassification\",\"doc\":\"Pharmacogenomics drug response variant classification\",\"symbols\":[\"responsive\",\"altered_sensitivity\",\"reduced_sensitivity\",\"increased_sensitivity\",\"altered_resistance\",\"increased_resistance\",\"reduced_resistance\",\"increased_risk_of_toxicity\",\"reduced_risk_of_toxicity\",\"altered_toxicity\",\"adverse_drug_reaction\",\"indication\",\"contraindication\",\"dosing_alteration\",\"increased_dose\",\"reduced_dose\",\"increased_monitoring\",\"increased_efficacy\",\"reduced_efficacy\",\"altered_efficacy\"]}],\"doc\":\"The variant's pharmacogenomics classification.\"},{\"name\":\"traitAssociation\",\"type\":[\"null\",{\"type\":\"enum\",\"name\":\"TraitAssociation\",\"doc\":\"Association of variants to a given trait.\\n* `established_risk_allele` : Established risk allele for variants associated to disease\\n* `likely_risk_allele` : Likely risk allele for variants associated to disease\\n* `uncertain_risk_allele` : Uncertain risk allele for variants associated to disease\\n* `protective` : Protective allele\",\"symbols\":[\"established_risk_allele\",\"likely_risk_allele\",\"uncertain_risk_allele\",\"protective\"]}],\"doc\":\"The variant's trait association.\"},{\"name\":\"tumorigenesisClassification\",\"type\":[\"null\",{\"type\":\"enum\",\"name\":\"TumorigenesisClassification\",\"doc\":\"Variant classification according to its relation to cancer aetiology.\\n* `driver` : Driver variants\\n* `passenger` : Passenger variants\\n* `modifier` : Modifier variants\",\"symbols\":[\"driver\",\"passenger\",\"modifier\"]}],\"doc\":\"The variant's tumorigenesis classification.\"},{\"name\":\"functionalEffect\",\"type\":[\"null\",{\"type\":\"enum\",\"name\":\"VariantFunctionalEffect\",\"doc\":\"Variant effect with Sequence Ontology terms.\\n\\n* `SO_0002052`: dominant_negative_variant (http://purl.obolibrary.org/obo/SO_0002052)\\n* `SO_0002053`: gain_of_function_variant (http://purl.obolibrary.org/obo/SO_0002053)\\n* `SO_0001773`: lethal_variant (http://purl.obolibrary.org/obo/SO_0001773)\\n* `SO_0002054`: loss_of_function_variant (http://purl.obolibrary.org/obo/SO_0002054)\\n* `SO_0001786`: loss_of_heterozygosity (http://purl.obolibrary.org/obo/SO_0001786)\\n* `SO_0002055`: null_variant (http://purl.obolibrary.org/obo/SO_0002055)\",\"symbols\":[\"dominant_negative_variant\",\"gain_of_function_variant\",\"lethal_variant\",\"loss_of_function_variant\",\"loss_of_heterozygosity\",\"null_variant\"]}],\"doc\":\"The variant functional effect\"}]}");
public static org.apache.avro.Schema getClassSchema() { return SCHEMA$; }
/** The variant's clinical significance. */
private org.opencb.biodata.models.variant.avro.ClinicalSignificance clinicalSignificance;
/** The variant's pharmacogenomics classification. */
private org.opencb.biodata.models.variant.avro.DrugResponseClassification drugResponseClassification;
/** The variant's trait association. */
private org.opencb.biodata.models.variant.avro.TraitAssociation traitAssociation;
/** The variant's tumorigenesis classification. */
private org.opencb.biodata.models.variant.avro.TumorigenesisClassification tumorigenesisClassification;
/** The variant functional effect */
private org.opencb.biodata.models.variant.avro.VariantFunctionalEffect functionalEffect;
/**
* 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 VariantClassification() {}
/**
* All-args constructor.
*/
public VariantClassification(org.opencb.biodata.models.variant.avro.ClinicalSignificance clinicalSignificance, org.opencb.biodata.models.variant.avro.DrugResponseClassification drugResponseClassification, org.opencb.biodata.models.variant.avro.TraitAssociation traitAssociation, org.opencb.biodata.models.variant.avro.TumorigenesisClassification tumorigenesisClassification, org.opencb.biodata.models.variant.avro.VariantFunctionalEffect functionalEffect) {
this.clinicalSignificance = clinicalSignificance;
this.drugResponseClassification = drugResponseClassification;
this.traitAssociation = traitAssociation;
this.tumorigenesisClassification = tumorigenesisClassification;
this.functionalEffect = functionalEffect;
}
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 clinicalSignificance;
case 1: return drugResponseClassification;
case 2: return traitAssociation;
case 3: return tumorigenesisClassification;
case 4: return functionalEffect;
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: clinicalSignificance = (org.opencb.biodata.models.variant.avro.ClinicalSignificance)value$; break;
case 1: drugResponseClassification = (org.opencb.biodata.models.variant.avro.DrugResponseClassification)value$; break;
case 2: traitAssociation = (org.opencb.biodata.models.variant.avro.TraitAssociation)value$; break;
case 3: tumorigenesisClassification = (org.opencb.biodata.models.variant.avro.TumorigenesisClassification)value$; break;
case 4: functionalEffect = (org.opencb.biodata.models.variant.avro.VariantFunctionalEffect)value$; break;
default: throw new org.apache.avro.AvroRuntimeException("Bad index");
}
}
/**
* Gets the value of the 'clinicalSignificance' field.
* The variant's clinical significance. */
public org.opencb.biodata.models.variant.avro.ClinicalSignificance getClinicalSignificance() {
return clinicalSignificance;
}
/**
* Sets the value of the 'clinicalSignificance' field.
* The variant's clinical significance. * @param value the value to set.
*/
public void setClinicalSignificance(org.opencb.biodata.models.variant.avro.ClinicalSignificance value) {
this.clinicalSignificance = value;
}
/**
* Gets the value of the 'drugResponseClassification' field.
* The variant's pharmacogenomics classification. */
public org.opencb.biodata.models.variant.avro.DrugResponseClassification getDrugResponseClassification() {
return drugResponseClassification;
}
/**
* Sets the value of the 'drugResponseClassification' field.
* The variant's pharmacogenomics classification. * @param value the value to set.
*/
public void setDrugResponseClassification(org.opencb.biodata.models.variant.avro.DrugResponseClassification value) {
this.drugResponseClassification = value;
}
/**
* Gets the value of the 'traitAssociation' field.
* The variant's trait association. */
public org.opencb.biodata.models.variant.avro.TraitAssociation getTraitAssociation() {
return traitAssociation;
}
/**
* Sets the value of the 'traitAssociation' field.
* The variant's trait association. * @param value the value to set.
*/
public void setTraitAssociation(org.opencb.biodata.models.variant.avro.TraitAssociation value) {
this.traitAssociation = value;
}
/**
* Gets the value of the 'tumorigenesisClassification' field.
* The variant's tumorigenesis classification. */
public org.opencb.biodata.models.variant.avro.TumorigenesisClassification getTumorigenesisClassification() {
return tumorigenesisClassification;
}
/**
* Sets the value of the 'tumorigenesisClassification' field.
* The variant's tumorigenesis classification. * @param value the value to set.
*/
public void setTumorigenesisClassification(org.opencb.biodata.models.variant.avro.TumorigenesisClassification value) {
this.tumorigenesisClassification = value;
}
/**
* Gets the value of the 'functionalEffect' field.
* The variant functional effect */
public org.opencb.biodata.models.variant.avro.VariantFunctionalEffect getFunctionalEffect() {
return functionalEffect;
}
/**
* Sets the value of the 'functionalEffect' field.
* The variant functional effect * @param value the value to set.
*/
public void setFunctionalEffect(org.opencb.biodata.models.variant.avro.VariantFunctionalEffect value) {
this.functionalEffect = value;
}
/** Creates a new VariantClassification RecordBuilder */
public static org.opencb.biodata.models.variant.avro.VariantClassification.Builder newBuilder() {
return new org.opencb.biodata.models.variant.avro.VariantClassification.Builder();
}
/** Creates a new VariantClassification RecordBuilder by copying an existing Builder */
public static org.opencb.biodata.models.variant.avro.VariantClassification.Builder newBuilder(org.opencb.biodata.models.variant.avro.VariantClassification.Builder other) {
return new org.opencb.biodata.models.variant.avro.VariantClassification.Builder(other);
}
/** Creates a new VariantClassification RecordBuilder by copying an existing VariantClassification instance */
public static org.opencb.biodata.models.variant.avro.VariantClassification.Builder newBuilder(org.opencb.biodata.models.variant.avro.VariantClassification other) {
return new org.opencb.biodata.models.variant.avro.VariantClassification.Builder(other);
}
/**
* RecordBuilder for VariantClassification instances.
*/
public static class Builder extends org.apache.avro.specific.SpecificRecordBuilderBase
implements org.apache.avro.data.RecordBuilder {
private org.opencb.biodata.models.variant.avro.ClinicalSignificance clinicalSignificance;
private org.opencb.biodata.models.variant.avro.DrugResponseClassification drugResponseClassification;
private org.opencb.biodata.models.variant.avro.TraitAssociation traitAssociation;
private org.opencb.biodata.models.variant.avro.TumorigenesisClassification tumorigenesisClassification;
private org.opencb.biodata.models.variant.avro.VariantFunctionalEffect functionalEffect;
/** Creates a new Builder */
private Builder() {
super(org.opencb.biodata.models.variant.avro.VariantClassification.SCHEMA$);
}
/** Creates a Builder by copying an existing Builder */
private Builder(org.opencb.biodata.models.variant.avro.VariantClassification.Builder other) {
super(other);
if (isValidValue(fields()[0], other.clinicalSignificance)) {
this.clinicalSignificance = data().deepCopy(fields()[0].schema(), other.clinicalSignificance);
fieldSetFlags()[0] = true;
}
if (isValidValue(fields()[1], other.drugResponseClassification)) {
this.drugResponseClassification = data().deepCopy(fields()[1].schema(), other.drugResponseClassification);
fieldSetFlags()[1] = true;
}
if (isValidValue(fields()[2], other.traitAssociation)) {
this.traitAssociation = data().deepCopy(fields()[2].schema(), other.traitAssociation);
fieldSetFlags()[2] = true;
}
if (isValidValue(fields()[3], other.tumorigenesisClassification)) {
this.tumorigenesisClassification = data().deepCopy(fields()[3].schema(), other.tumorigenesisClassification);
fieldSetFlags()[3] = true;
}
if (isValidValue(fields()[4], other.functionalEffect)) {
this.functionalEffect = data().deepCopy(fields()[4].schema(), other.functionalEffect);
fieldSetFlags()[4] = true;
}
}
/** Creates a Builder by copying an existing VariantClassification instance */
private Builder(org.opencb.biodata.models.variant.avro.VariantClassification other) {
super(org.opencb.biodata.models.variant.avro.VariantClassification.SCHEMA$);
if (isValidValue(fields()[0], other.clinicalSignificance)) {
this.clinicalSignificance = data().deepCopy(fields()[0].schema(), other.clinicalSignificance);
fieldSetFlags()[0] = true;
}
if (isValidValue(fields()[1], other.drugResponseClassification)) {
this.drugResponseClassification = data().deepCopy(fields()[1].schema(), other.drugResponseClassification);
fieldSetFlags()[1] = true;
}
if (isValidValue(fields()[2], other.traitAssociation)) {
this.traitAssociation = data().deepCopy(fields()[2].schema(), other.traitAssociation);
fieldSetFlags()[2] = true;
}
if (isValidValue(fields()[3], other.tumorigenesisClassification)) {
this.tumorigenesisClassification = data().deepCopy(fields()[3].schema(), other.tumorigenesisClassification);
fieldSetFlags()[3] = true;
}
if (isValidValue(fields()[4], other.functionalEffect)) {
this.functionalEffect = data().deepCopy(fields()[4].schema(), other.functionalEffect);
fieldSetFlags()[4] = true;
}
}
/** Gets the value of the 'clinicalSignificance' field */
public org.opencb.biodata.models.variant.avro.ClinicalSignificance getClinicalSignificance() {
return clinicalSignificance;
}
/** Sets the value of the 'clinicalSignificance' field */
public org.opencb.biodata.models.variant.avro.VariantClassification.Builder setClinicalSignificance(org.opencb.biodata.models.variant.avro.ClinicalSignificance value) {
validate(fields()[0], value);
this.clinicalSignificance = value;
fieldSetFlags()[0] = true;
return this;
}
/** Checks whether the 'clinicalSignificance' field has been set */
public boolean hasClinicalSignificance() {
return fieldSetFlags()[0];
}
/** Clears the value of the 'clinicalSignificance' field */
public org.opencb.biodata.models.variant.avro.VariantClassification.Builder clearClinicalSignificance() {
clinicalSignificance = null;
fieldSetFlags()[0] = false;
return this;
}
/** Gets the value of the 'drugResponseClassification' field */
public org.opencb.biodata.models.variant.avro.DrugResponseClassification getDrugResponseClassification() {
return drugResponseClassification;
}
/** Sets the value of the 'drugResponseClassification' field */
public org.opencb.biodata.models.variant.avro.VariantClassification.Builder setDrugResponseClassification(org.opencb.biodata.models.variant.avro.DrugResponseClassification value) {
validate(fields()[1], value);
this.drugResponseClassification = value;
fieldSetFlags()[1] = true;
return this;
}
/** Checks whether the 'drugResponseClassification' field has been set */
public boolean hasDrugResponseClassification() {
return fieldSetFlags()[1];
}
/** Clears the value of the 'drugResponseClassification' field */
public org.opencb.biodata.models.variant.avro.VariantClassification.Builder clearDrugResponseClassification() {
drugResponseClassification = null;
fieldSetFlags()[1] = false;
return this;
}
/** Gets the value of the 'traitAssociation' field */
public org.opencb.biodata.models.variant.avro.TraitAssociation getTraitAssociation() {
return traitAssociation;
}
/** Sets the value of the 'traitAssociation' field */
public org.opencb.biodata.models.variant.avro.VariantClassification.Builder setTraitAssociation(org.opencb.biodata.models.variant.avro.TraitAssociation value) {
validate(fields()[2], value);
this.traitAssociation = value;
fieldSetFlags()[2] = true;
return this;
}
/** Checks whether the 'traitAssociation' field has been set */
public boolean hasTraitAssociation() {
return fieldSetFlags()[2];
}
/** Clears the value of the 'traitAssociation' field */
public org.opencb.biodata.models.variant.avro.VariantClassification.Builder clearTraitAssociation() {
traitAssociation = null;
fieldSetFlags()[2] = false;
return this;
}
/** Gets the value of the 'tumorigenesisClassification' field */
public org.opencb.biodata.models.variant.avro.TumorigenesisClassification getTumorigenesisClassification() {
return tumorigenesisClassification;
}
/** Sets the value of the 'tumorigenesisClassification' field */
public org.opencb.biodata.models.variant.avro.VariantClassification.Builder setTumorigenesisClassification(org.opencb.biodata.models.variant.avro.TumorigenesisClassification value) {
validate(fields()[3], value);
this.tumorigenesisClassification = value;
fieldSetFlags()[3] = true;
return this;
}
/** Checks whether the 'tumorigenesisClassification' field has been set */
public boolean hasTumorigenesisClassification() {
return fieldSetFlags()[3];
}
/** Clears the value of the 'tumorigenesisClassification' field */
public org.opencb.biodata.models.variant.avro.VariantClassification.Builder clearTumorigenesisClassification() {
tumorigenesisClassification = null;
fieldSetFlags()[3] = false;
return this;
}
/** Gets the value of the 'functionalEffect' field */
public org.opencb.biodata.models.variant.avro.VariantFunctionalEffect getFunctionalEffect() {
return functionalEffect;
}
/** Sets the value of the 'functionalEffect' field */
public org.opencb.biodata.models.variant.avro.VariantClassification.Builder setFunctionalEffect(org.opencb.biodata.models.variant.avro.VariantFunctionalEffect value) {
validate(fields()[4], value);
this.functionalEffect = value;
fieldSetFlags()[4] = true;
return this;
}
/** Checks whether the 'functionalEffect' field has been set */
public boolean hasFunctionalEffect() {
return fieldSetFlags()[4];
}
/** Clears the value of the 'functionalEffect' field */
public org.opencb.biodata.models.variant.avro.VariantClassification.Builder clearFunctionalEffect() {
functionalEffect = null;
fieldSetFlags()[4] = false;
return this;
}
@Override
public VariantClassification build() {
try {
VariantClassification record = new VariantClassification();
record.clinicalSignificance = fieldSetFlags()[0] ? this.clinicalSignificance : (org.opencb.biodata.models.variant.avro.ClinicalSignificance) defaultValue(fields()[0]);
record.drugResponseClassification = fieldSetFlags()[1] ? this.drugResponseClassification : (org.opencb.biodata.models.variant.avro.DrugResponseClassification) defaultValue(fields()[1]);
record.traitAssociation = fieldSetFlags()[2] ? this.traitAssociation : (org.opencb.biodata.models.variant.avro.TraitAssociation) defaultValue(fields()[2]);
record.tumorigenesisClassification = fieldSetFlags()[3] ? this.tumorigenesisClassification : (org.opencb.biodata.models.variant.avro.TumorigenesisClassification) defaultValue(fields()[3]);
record.functionalEffect = fieldSetFlags()[4] ? this.functionalEffect : (org.opencb.biodata.models.variant.avro.VariantFunctionalEffect) defaultValue(fields()[4]);
return record;
} catch (Exception e) {
throw new org.apache.avro.AvroRuntimeException(e);
}
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy