org.opencb.biodata.models.variant.metadata.VariantMetadata 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 VariantMetadata 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\":\"VariantMetadata\",\"namespace\":\"org.opencb.biodata.models.variant.metadata\",\"fields\":[{\"name\":\"version\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"doc\":\"Data model version\",\"default\":\"v1.0.0\"},{\"name\":\"species\",\"type\":[\"null\",{\"type\":\"record\",\"name\":\"Species\",\"namespace\":\"org.opencb.biodata.models.metadata\",\"fields\":[{\"name\":\"id\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"doc\":\"Short species id. First letter from the first word + second word\\n e.g. hsapiens for homo sapiens, mmusculus for mus musculus,...\"},{\"name\":\"scientificName\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"doc\":\"Full scrientific name. e.g. homo sapiens, mus musculus,...\",\"default\":null},{\"name\":\"taxonomyId\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"default\":null},{\"name\":\"strain\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"default\":null},{\"name\":\"assembly\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"default\":null}]}],\"doc\":\"Species information. Same species and assembly for all the studies\",\"default\":null},{\"name\":\"creationDate\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"doc\":\"Creation date\",\"default\":null},{\"name\":\"description\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"doc\":\"Optional description\",\"default\":null},{\"name\":\"studies\",\"type\":{\"type\":\"array\",\"items\":{\"type\":\"record\",\"name\":\"VariantStudyMetadata\",\"fields\":[{\"name\":\"id\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"doc\":\"Study id. Will match with the {@link org.opencb.biodata.models.variant.StudyEntry#getStudyId}\"},{\"name\":\"description\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"doc\":\"Optional description\",\"default\":null},{\"name\":\"aggregation\",\"type\":{\"type\":\"enum\",\"name\":\"Aggregation\",\"doc\":\"EXAC like aggregated data\\n Adds some attributes to the basic mode:\\n - HOM: Homozygous Counts\\n - HET: Heterozygous Counts\",\"symbols\":[\"NONE\",\"BASIC\",\"EVS\",\"EXAC\"]},\"doc\":\"Some studies does not provide real samples information.\\n Instead, only aggregated data is provided as file attributes.\\n This field represents the schema of representing aggregated data (if any)\",\"default\":\"NONE\"},{\"name\":\"aggregatedHeader\",\"type\":[\"null\",{\"type\":\"record\",\"name\":\"VariantFileHeader\",\"doc\":\"Variant File Header. Contains simple and complex metadata lines describing the content of the file.\\n This header matches with the VCF header.\\n A header may have multiple Simple or Complex lines with the same key\",\"fields\":[{\"name\":\"version\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"complexLines\",\"type\":{\"type\":\"array\",\"items\":{\"type\":\"record\",\"name\":\"VariantFileHeaderComplexLine\",\"fields\":[{\"name\":\"key\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"doc\":\"Key of group of the Complex Header Line, e.g. INFO, FORMAT, FILTER, ALT, ...\"},{\"name\":\"id\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"doc\":\"ID or Name of the line\"},{\"name\":\"description\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"doc\":\"The description\",\"default\":null},{\"name\":\"number\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"doc\":\"Arity of the values associated with this metadata line.\\n Only present if the metadata line describes data fields, i.e. key == INFO or FORMAT\\n Accepted values:\\n - : The field has always this number of values.\\n - A: The field has one value per alternate allele.\\n - R: The field has one value for each possible allele, including the reference.\\n - G: The field has one value for each possible genotype\\n - .: The number of possible values varies, is unknown or unbounded.\",\"default\":null},{\"name\":\"type\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"doc\":\"Type of the values associated with this metadata line.\\n Only present if the metadata line describes data fields, i.e. key == INFO or FORMAT\\n Accepted values:\\n - Integer\\n - Float\\n - String\\n - Character\\n - Flag\",\"default\":null},{\"name\":\"genericFields\",\"type\":{\"type\":\"map\",\"values\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"avro.java.string\":\"String\"},\"doc\":\"Other optional fields\",\"default\":{}}]}},\"doc\":\"complex lines, e.g. INFO=\",\"default\":[]},{\"name\":\"simpleLines\",\"type\":{\"type\":\"array\",\"items\":{\"type\":\"record\",\"name\":\"VariantFileHeaderSimpleLine\",\"fields\":[{\"name\":\"key\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"doc\":\"Key of group of the Simple Header Line, e.g. source, assembly, pedigreeDB, ...\"},{\"name\":\"value\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"doc\":\"Value\"}]}},\"doc\":\"simple lines, e.g. fileDate=20090805\",\"default\":[]}]}],\"doc\":\"Aggregation of all the file headers from this study\",\"default\":null},{\"name\":\"files\",\"type\":{\"type\":\"array\",\"items\":{\"type\":\"record\",\"name\":\"VariantFileMetadata\",\"fields\":[{\"name\":\"id\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"doc\":\"File id. Will match with the {@link org.opencb.biodata.models.variant.avro.FileEntry#getFileId}\"},{\"name\":\"path\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"doc\":\"Path to the original file\",\"default\":null},{\"name\":\"sampleIds\",\"type\":{\"type\":\"array\",\"items\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},\"doc\":\"Ordered list of sample ids contained in the file\",\"default\":[]},{\"name\":\"stats\",\"type\":[\"null\",{\"type\":\"record\",\"name\":\"VariantSetStats\",\"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\":{}}]}],\"doc\":\"Global statistics calculated for this file\",\"default\":null},{\"name\":\"header\",\"type\":[\"null\",\"VariantFileHeader\"],\"doc\":\"The Variant File Header\",\"default\":null},{\"name\":\"attributes\",\"type\":{\"type\":\"map\",\"values\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"avro.java.string\":\"String\"},\"doc\":\"Other user defined attributes related with the file\",\"default\":{}}]}},\"doc\":\"Metadata from all the files contained in this study\",\"default\":[]},{\"name\":\"individuals\",\"type\":{\"type\":\"array\",\"items\":{\"type\":\"record\",\"name\":\"Individual\",\"namespace\":\"","org.opencb.biodata.models.metadata\",\"fields\":[{\"name\":\"id\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"doc\":\"Individual identifier\"},{\"name\":\"family\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"default\":null},{\"name\":\"father\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"default\":null},{\"name\":\"mother\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"default\":null},{\"name\":\"sex\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"default\":null},{\"name\":\"phenotype\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"default\":null},{\"name\":\"samples\",\"type\":{\"type\":\"array\",\"items\":{\"type\":\"record\",\"name\":\"Sample\",\"fields\":[{\"name\":\"id\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"doc\":\"Sample identifier\"},{\"name\":\"annotations\",\"type\":{\"type\":\"map\",\"values\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"avro.java.string\":\"String\"},\"doc\":\"Sample annotations stored in a map of attributes according to the format:\\n attribute_name[:x] where x defines the attribute type, its valid values are:\\n n for numeric (i = integer, f = float)\\n s for string\\n b for boolean\\n\\n e.g. age:n, population:s, height:n, weight, risk factors, secondary conditions,...\",\"default\":{}}]}},\"default\":[]}]}},\"doc\":\"Metadata from all the individuals and samples in this study\",\"default\":[]},{\"name\":\"cohorts\",\"type\":{\"type\":\"array\",\"items\":{\"type\":\"record\",\"name\":\"Cohort\",\"namespace\":\"org.opencb.biodata.models.metadata\",\"fields\":[{\"name\":\"id\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"sampleIds\",\"type\":{\"type\":\"array\",\"items\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},\"default\":[]},{\"name\":\"sampleSetType\",\"type\":{\"type\":\"enum\",\"name\":\"SampleSetType\",\"symbols\":[\"CASE_CONTROL\",\"CASE_SET\",\"CONTROL_SET\",\"PAIRED\",\"TIME_SERIES\",\"FAMILY\",\"TRIO\",\"MISCELLANEOUS\",\"UNKNOWN\"]}}]}},\"doc\":\"Metadata from with all the cohorts defined in this study\",\"default\":[]},{\"name\":\"sampleSetType\",\"type\":\"org.opencb.biodata.models.metadata.SampleSetType\",\"doc\":\"Type of sample set. Defines the type of the study.\"},{\"name\":\"stats\",\"type\":[\"null\",{\"type\":\"record\",\"name\":\"VariantStudyStats\",\"fields\":[{\"name\":\"sampleStats\",\"type\":{\"type\":\"map\",\"values\":\"VariantSetStats\",\"avro.java.string\":\"String\"},\"default\":{}},{\"name\":\"cohortStats\",\"type\":{\"type\":\"map\",\"values\":\"VariantSetStats\",\"avro.java.string\":\"String\"},\"default\":{}}]}],\"doc\":\"Samples and Cohort global statistics\",\"default\":null},{\"name\":\"attributes\",\"type\":{\"type\":\"map\",\"values\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"avro.java.string\":\"String\"},\"doc\":\"Other user defined attributes related with the study\",\"default\":{}}]}},\"doc\":\"List of studies within this set of data\",\"default\":[]}]}");
public static org.apache.avro.Schema getClassSchema() { return SCHEMA$; }
/** Data model version */
private java.lang.String version;
/** Species information. Same species and assembly for all the studies */
private org.opencb.biodata.models.metadata.Species species;
/** Creation date */
private java.lang.String creationDate;
/** Optional description */
private java.lang.String description;
/** List of studies within this set of data */
private java.util.List studies;
/**
* 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 VariantMetadata() {}
/**
* All-args constructor.
*/
public VariantMetadata(java.lang.String version, org.opencb.biodata.models.metadata.Species species, java.lang.String creationDate, java.lang.String description, java.util.List studies) {
this.version = version;
this.species = species;
this.creationDate = creationDate;
this.description = description;
this.studies = studies;
}
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 version;
case 1: return species;
case 2: return creationDate;
case 3: return description;
case 4: return studies;
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: version = (java.lang.String)value$; break;
case 1: species = (org.opencb.biodata.models.metadata.Species)value$; break;
case 2: creationDate = (java.lang.String)value$; break;
case 3: description = (java.lang.String)value$; break;
case 4: studies = (java.util.List)value$; break;
default: throw new org.apache.avro.AvroRuntimeException("Bad index");
}
}
/**
* Gets the value of the 'version' field.
* Data model version */
public java.lang.String getVersion() {
return version;
}
/**
* Sets the value of the 'version' field.
* Data model version * @param value the value to set.
*/
public void setVersion(java.lang.String value) {
this.version = value;
}
/**
* Gets the value of the 'species' field.
* Species information. Same species and assembly for all the studies */
public org.opencb.biodata.models.metadata.Species getSpecies() {
return species;
}
/**
* Sets the value of the 'species' field.
* Species information. Same species and assembly for all the studies * @param value the value to set.
*/
public void setSpecies(org.opencb.biodata.models.metadata.Species value) {
this.species = value;
}
/**
* Gets the value of the 'creationDate' field.
* Creation date */
public java.lang.String getCreationDate() {
return creationDate;
}
/**
* Sets the value of the 'creationDate' field.
* Creation date * @param value the value to set.
*/
public void setCreationDate(java.lang.String value) {
this.creationDate = value;
}
/**
* Gets the value of the 'description' field.
* Optional description */
public java.lang.String getDescription() {
return description;
}
/**
* Sets the value of the 'description' field.
* Optional description * @param value the value to set.
*/
public void setDescription(java.lang.String value) {
this.description = value;
}
/**
* Gets the value of the 'studies' field.
* List of studies within this set of data */
public java.util.List getStudies() {
return studies;
}
/**
* Sets the value of the 'studies' field.
* List of studies within this set of data * @param value the value to set.
*/
public void setStudies(java.util.List value) {
this.studies = value;
}
/** Creates a new VariantMetadata RecordBuilder */
public static org.opencb.biodata.models.variant.metadata.VariantMetadata.Builder newBuilder() {
return new org.opencb.biodata.models.variant.metadata.VariantMetadata.Builder();
}
/** Creates a new VariantMetadata RecordBuilder by copying an existing Builder */
public static org.opencb.biodata.models.variant.metadata.VariantMetadata.Builder newBuilder(org.opencb.biodata.models.variant.metadata.VariantMetadata.Builder other) {
return new org.opencb.biodata.models.variant.metadata.VariantMetadata.Builder(other);
}
/** Creates a new VariantMetadata RecordBuilder by copying an existing VariantMetadata instance */
public static org.opencb.biodata.models.variant.metadata.VariantMetadata.Builder newBuilder(org.opencb.biodata.models.variant.metadata.VariantMetadata other) {
return new org.opencb.biodata.models.variant.metadata.VariantMetadata.Builder(other);
}
/**
* RecordBuilder for VariantMetadata instances.
*/
public static class Builder extends org.apache.avro.specific.SpecificRecordBuilderBase
implements org.apache.avro.data.RecordBuilder {
private java.lang.String version;
private org.opencb.biodata.models.metadata.Species species;
private java.lang.String creationDate;
private java.lang.String description;
private java.util.List studies;
/** Creates a new Builder */
private Builder() {
super(org.opencb.biodata.models.variant.metadata.VariantMetadata.SCHEMA$);
}
/** Creates a Builder by copying an existing Builder */
private Builder(org.opencb.biodata.models.variant.metadata.VariantMetadata.Builder other) {
super(other);
if (isValidValue(fields()[0], other.version)) {
this.version = data().deepCopy(fields()[0].schema(), other.version);
fieldSetFlags()[0] = true;
}
if (isValidValue(fields()[1], other.species)) {
this.species = data().deepCopy(fields()[1].schema(), other.species);
fieldSetFlags()[1] = true;
}
if (isValidValue(fields()[2], other.creationDate)) {
this.creationDate = data().deepCopy(fields()[2].schema(), other.creationDate);
fieldSetFlags()[2] = true;
}
if (isValidValue(fields()[3], other.description)) {
this.description = data().deepCopy(fields()[3].schema(), other.description);
fieldSetFlags()[3] = true;
}
if (isValidValue(fields()[4], other.studies)) {
this.studies = data().deepCopy(fields()[4].schema(), other.studies);
fieldSetFlags()[4] = true;
}
}
/** Creates a Builder by copying an existing VariantMetadata instance */
private Builder(org.opencb.biodata.models.variant.metadata.VariantMetadata other) {
super(org.opencb.biodata.models.variant.metadata.VariantMetadata.SCHEMA$);
if (isValidValue(fields()[0], other.version)) {
this.version = data().deepCopy(fields()[0].schema(), other.version);
fieldSetFlags()[0] = true;
}
if (isValidValue(fields()[1], other.species)) {
this.species = data().deepCopy(fields()[1].schema(), other.species);
fieldSetFlags()[1] = true;
}
if (isValidValue(fields()[2], other.creationDate)) {
this.creationDate = data().deepCopy(fields()[2].schema(), other.creationDate);
fieldSetFlags()[2] = true;
}
if (isValidValue(fields()[3], other.description)) {
this.description = data().deepCopy(fields()[3].schema(), other.description);
fieldSetFlags()[3] = true;
}
if (isValidValue(fields()[4], other.studies)) {
this.studies = data().deepCopy(fields()[4].schema(), other.studies);
fieldSetFlags()[4] = true;
}
}
/** Gets the value of the 'version' field */
public java.lang.String getVersion() {
return version;
}
/** Sets the value of the 'version' field */
public org.opencb.biodata.models.variant.metadata.VariantMetadata.Builder setVersion(java.lang.String value) {
validate(fields()[0], value);
this.version = value;
fieldSetFlags()[0] = true;
return this;
}
/** Checks whether the 'version' field has been set */
public boolean hasVersion() {
return fieldSetFlags()[0];
}
/** Clears the value of the 'version' field */
public org.opencb.biodata.models.variant.metadata.VariantMetadata.Builder clearVersion() {
version = null;
fieldSetFlags()[0] = false;
return this;
}
/** Gets the value of the 'species' field */
public org.opencb.biodata.models.metadata.Species getSpecies() {
return species;
}
/** Sets the value of the 'species' field */
public org.opencb.biodata.models.variant.metadata.VariantMetadata.Builder setSpecies(org.opencb.biodata.models.metadata.Species value) {
validate(fields()[1], value);
this.species = value;
fieldSetFlags()[1] = true;
return this;
}
/** Checks whether the 'species' field has been set */
public boolean hasSpecies() {
return fieldSetFlags()[1];
}
/** Clears the value of the 'species' field */
public org.opencb.biodata.models.variant.metadata.VariantMetadata.Builder clearSpecies() {
species = null;
fieldSetFlags()[1] = false;
return this;
}
/** Gets the value of the 'creationDate' field */
public java.lang.String getCreationDate() {
return creationDate;
}
/** Sets the value of the 'creationDate' field */
public org.opencb.biodata.models.variant.metadata.VariantMetadata.Builder setCreationDate(java.lang.String value) {
validate(fields()[2], value);
this.creationDate = value;
fieldSetFlags()[2] = true;
return this;
}
/** Checks whether the 'creationDate' field has been set */
public boolean hasCreationDate() {
return fieldSetFlags()[2];
}
/** Clears the value of the 'creationDate' field */
public org.opencb.biodata.models.variant.metadata.VariantMetadata.Builder clearCreationDate() {
creationDate = null;
fieldSetFlags()[2] = false;
return this;
}
/** Gets the value of the 'description' field */
public java.lang.String getDescription() {
return description;
}
/** Sets the value of the 'description' field */
public org.opencb.biodata.models.variant.metadata.VariantMetadata.Builder setDescription(java.lang.String value) {
validate(fields()[3], value);
this.description = value;
fieldSetFlags()[3] = true;
return this;
}
/** Checks whether the 'description' field has been set */
public boolean hasDescription() {
return fieldSetFlags()[3];
}
/** Clears the value of the 'description' field */
public org.opencb.biodata.models.variant.metadata.VariantMetadata.Builder clearDescription() {
description = null;
fieldSetFlags()[3] = false;
return this;
}
/** Gets the value of the 'studies' field */
public java.util.List getStudies() {
return studies;
}
/** Sets the value of the 'studies' field */
public org.opencb.biodata.models.variant.metadata.VariantMetadata.Builder setStudies(java.util.List value) {
validate(fields()[4], value);
this.studies = value;
fieldSetFlags()[4] = true;
return this;
}
/** Checks whether the 'studies' field has been set */
public boolean hasStudies() {
return fieldSetFlags()[4];
}
/** Clears the value of the 'studies' field */
public org.opencb.biodata.models.variant.metadata.VariantMetadata.Builder clearStudies() {
studies = null;
fieldSetFlags()[4] = false;
return this;
}
@Override
public VariantMetadata build() {
try {
VariantMetadata record = new VariantMetadata();
record.version = fieldSetFlags()[0] ? this.version : (java.lang.String) defaultValue(fields()[0]);
record.species = fieldSetFlags()[1] ? this.species : (org.opencb.biodata.models.metadata.Species) defaultValue(fields()[1]);
record.creationDate = fieldSetFlags()[2] ? this.creationDate : (java.lang.String) defaultValue(fields()[2]);
record.description = fieldSetFlags()[3] ? this.description : (java.lang.String) defaultValue(fields()[3]);
record.studies = fieldSetFlags()[4] ? this.studies : (java.util.List) defaultValue(fields()[4]);
return record;
} catch (Exception e) {
throw new org.apache.avro.AvroRuntimeException(e);
}
}
}
}