org.opencb.biodata.models.variant.metadata.VariantStudyMetadata 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 VariantStudyMetadata 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\":\"VariantStudyMetadata\",\"namespace\":\"org.opencb.biodata.models.variant.metadata\",\"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\":{}}]}");
public static org.apache.avro.Schema getClassSchema() { return SCHEMA$; }
/** Study id. Will match with the {@link org.opencb.biodata.models.variant.StudyEntry#getStudyId} */
private java.lang.String id;
/** Optional description */
private java.lang.String description;
/** Some studies does not provide real samples information.
Instead, only aggregated data is provided as file attributes.
This field represents the schema of representing aggregated data (if any) */
private org.opencb.biodata.models.variant.metadata.Aggregation aggregation;
/** Aggregation of all the file headers from this study */
private org.opencb.biodata.models.variant.metadata.VariantFileHeader aggregatedHeader;
/** Metadata from all the files contained in this study */
private java.util.List files;
/** Metadata from all the individuals and samples in this study */
private java.util.List individuals;
/** Metadata from with all the cohorts defined in this study */
private java.util.List cohorts;
/** Type of sample set. Defines the type of the study. */
private org.opencb.biodata.models.metadata.SampleSetType sampleSetType;
/** Samples and Cohort global statistics */
private org.opencb.biodata.models.variant.metadata.VariantStudyStats stats;
/** Other user defined attributes related with the study */
private java.util.Map attributes;
/**
* 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 VariantStudyMetadata() {}
/**
* All-args constructor.
*/
public VariantStudyMetadata(java.lang.String id, java.lang.String description, org.opencb.biodata.models.variant.metadata.Aggregation aggregation, org.opencb.biodata.models.variant.metadata.VariantFileHeader aggregatedHeader, java.util.List files, java.util.List individuals, java.util.List cohorts, org.opencb.biodata.models.metadata.SampleSetType sampleSetType, org.opencb.biodata.models.variant.metadata.VariantStudyStats stats, java.util.Map attributes) {
this.id = id;
this.description = description;
this.aggregation = aggregation;
this.aggregatedHeader = aggregatedHeader;
this.files = files;
this.individuals = individuals;
this.cohorts = cohorts;
this.sampleSetType = sampleSetType;
this.stats = stats;
this.attributes = attributes;
}
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 description;
case 2: return aggregation;
case 3: return aggregatedHeader;
case 4: return files;
case 5: return individuals;
case 6: return cohorts;
case 7: return sampleSetType;
case 8: return stats;
case 9: return attributes;
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: description = (java.lang.String)value$; break;
case 2: aggregation = (org.opencb.biodata.models.variant.metadata.Aggregation)value$; break;
case 3: aggregatedHeader = (org.opencb.biodata.models.variant.metadata.VariantFileHeader)value$; break;
case 4: files = (java.util.List)value$; break;
case 5: individuals = (java.util.List)value$; break;
case 6: cohorts = (java.util.List)value$; break;
case 7: sampleSetType = (org.opencb.biodata.models.metadata.SampleSetType)value$; break;
case 8: stats = (org.opencb.biodata.models.variant.metadata.VariantStudyStats)value$; break;
case 9: attributes = (java.util.Map)value$; break;
default: throw new org.apache.avro.AvroRuntimeException("Bad index");
}
}
/**
* Gets the value of the 'id' field.
* Study id. Will match with the {@link org.opencb.biodata.models.variant.StudyEntry#getStudyId} */
public java.lang.String getId() {
return id;
}
/**
* Sets the value of the 'id' field.
* Study id. Will match with the {@link org.opencb.biodata.models.variant.StudyEntry#getStudyId} * @param value the value to set.
*/
public void setId(java.lang.String value) {
this.id = 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 'aggregation' field.
* Some studies does not provide real samples information.
Instead, only aggregated data is provided as file attributes.
This field represents the schema of representing aggregated data (if any) */
public org.opencb.biodata.models.variant.metadata.Aggregation getAggregation() {
return aggregation;
}
/**
* Sets the value of the 'aggregation' field.
* Some studies does not provide real samples information.
Instead, only aggregated data is provided as file attributes.
This field represents the schema of representing aggregated data (if any) * @param value the value to set.
*/
public void setAggregation(org.opencb.biodata.models.variant.metadata.Aggregation value) {
this.aggregation = value;
}
/**
* Gets the value of the 'aggregatedHeader' field.
* Aggregation of all the file headers from this study */
public org.opencb.biodata.models.variant.metadata.VariantFileHeader getAggregatedHeader() {
return aggregatedHeader;
}
/**
* Sets the value of the 'aggregatedHeader' field.
* Aggregation of all the file headers from this study * @param value the value to set.
*/
public void setAggregatedHeader(org.opencb.biodata.models.variant.metadata.VariantFileHeader value) {
this.aggregatedHeader = value;
}
/**
* Gets the value of the 'files' field.
* Metadata from all the files contained in this study */
public java.util.List getFiles() {
return files;
}
/**
* Sets the value of the 'files' field.
* Metadata from all the files contained in this study * @param value the value to set.
*/
public void setFiles(java.util.List value) {
this.files = value;
}
/**
* Gets the value of the 'individuals' field.
* Metadata from all the individuals and samples in this study */
public java.util.List getIndividuals() {
return individuals;
}
/**
* Sets the value of the 'individuals' field.
* Metadata from all the individuals and samples in this study * @param value the value to set.
*/
public void setIndividuals(java.util.List value) {
this.individuals = value;
}
/**
* Gets the value of the 'cohorts' field.
* Metadata from with all the cohorts defined in this study */
public java.util.List getCohorts() {
return cohorts;
}
/**
* Sets the value of the 'cohorts' field.
* Metadata from with all the cohorts defined in this study * @param value the value to set.
*/
public void setCohorts(java.util.List value) {
this.cohorts = value;
}
/**
* Gets the value of the 'sampleSetType' field.
* Type of sample set. Defines the type of the study. */
public org.opencb.biodata.models.metadata.SampleSetType getSampleSetType() {
return sampleSetType;
}
/**
* Sets the value of the 'sampleSetType' field.
* Type of sample set. Defines the type of the study. * @param value the value to set.
*/
public void setSampleSetType(org.opencb.biodata.models.metadata.SampleSetType value) {
this.sampleSetType = value;
}
/**
* Gets the value of the 'stats' field.
* Samples and Cohort global statistics */
public org.opencb.biodata.models.variant.metadata.VariantStudyStats getStats() {
return stats;
}
/**
* Sets the value of the 'stats' field.
* Samples and Cohort global statistics * @param value the value to set.
*/
public void setStats(org.opencb.biodata.models.variant.metadata.VariantStudyStats value) {
this.stats = value;
}
/**
* Gets the value of the 'attributes' field.
* Other user defined attributes related with the study */
public java.util.Map getAttributes() {
return attributes;
}
/**
* Sets the value of the 'attributes' field.
* Other user defined attributes related with the study * @param value the value to set.
*/
public void setAttributes(java.util.Map value) {
this.attributes = value;
}
/** Creates a new VariantStudyMetadata RecordBuilder */
public static org.opencb.biodata.models.variant.metadata.VariantStudyMetadata.Builder newBuilder() {
return new org.opencb.biodata.models.variant.metadata.VariantStudyMetadata.Builder();
}
/** Creates a new VariantStudyMetadata RecordBuilder by copying an existing Builder */
public static org.opencb.biodata.models.variant.metadata.VariantStudyMetadata.Builder newBuilder(org.opencb.biodata.models.variant.metadata.VariantStudyMetadata.Builder other) {
return new org.opencb.biodata.models.variant.metadata.VariantStudyMetadata.Builder(other);
}
/** Creates a new VariantStudyMetadata RecordBuilder by copying an existing VariantStudyMetadata instance */
public static org.opencb.biodata.models.variant.metadata.VariantStudyMetadata.Builder newBuilder(org.opencb.biodata.models.variant.metadata.VariantStudyMetadata other) {
return new org.opencb.biodata.models.variant.metadata.VariantStudyMetadata.Builder(other);
}
/**
* RecordBuilder for VariantStudyMetadata instances.
*/
public static class Builder extends org.apache.avro.specific.SpecificRecordBuilderBase
implements org.apache.avro.data.RecordBuilder {
private java.lang.String id;
private java.lang.String description;
private org.opencb.biodata.models.variant.metadata.Aggregation aggregation;
private org.opencb.biodata.models.variant.metadata.VariantFileHeader aggregatedHeader;
private java.util.List files;
private java.util.List individuals;
private java.util.List cohorts;
private org.opencb.biodata.models.metadata.SampleSetType sampleSetType;
private org.opencb.biodata.models.variant.metadata.VariantStudyStats stats;
private java.util.Map attributes;
/** Creates a new Builder */
private Builder() {
super(org.opencb.biodata.models.variant.metadata.VariantStudyMetadata.SCHEMA$);
}
/** Creates a Builder by copying an existing Builder */
private Builder(org.opencb.biodata.models.variant.metadata.VariantStudyMetadata.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.description)) {
this.description = data().deepCopy(fields()[1].schema(), other.description);
fieldSetFlags()[1] = true;
}
if (isValidValue(fields()[2], other.aggregation)) {
this.aggregation = data().deepCopy(fields()[2].schema(), other.aggregation);
fieldSetFlags()[2] = true;
}
if (isValidValue(fields()[3], other.aggregatedHeader)) {
this.aggregatedHeader = data().deepCopy(fields()[3].schema(), other.aggregatedHeader);
fieldSetFlags()[3] = true;
}
if (isValidValue(fields()[4], other.files)) {
this.files = data().deepCopy(fields()[4].schema(), other.files);
fieldSetFlags()[4] = true;
}
if (isValidValue(fields()[5], other.individuals)) {
this.individuals = data().deepCopy(fields()[5].schema(), other.individuals);
fieldSetFlags()[5] = true;
}
if (isValidValue(fields()[6], other.cohorts)) {
this.cohorts = data().deepCopy(fields()[6].schema(), other.cohorts);
fieldSetFlags()[6] = true;
}
if (isValidValue(fields()[7], other.sampleSetType)) {
this.sampleSetType = data().deepCopy(fields()[7].schema(), other.sampleSetType);
fieldSetFlags()[7] = true;
}
if (isValidValue(fields()[8], other.stats)) {
this.stats = data().deepCopy(fields()[8].schema(), other.stats);
fieldSetFlags()[8] = true;
}
if (isValidValue(fields()[9], other.attributes)) {
this.attributes = data().deepCopy(fields()[9].schema(), other.attributes);
fieldSetFlags()[9] = true;
}
}
/** Creates a Builder by copying an existing VariantStudyMetadata instance */
private Builder(org.opencb.biodata.models.variant.metadata.VariantStudyMetadata other) {
super(org.opencb.biodata.models.variant.metadata.VariantStudyMetadata.SCHEMA$);
if (isValidValue(fields()[0], other.id)) {
this.id = data().deepCopy(fields()[0].schema(), other.id);
fieldSetFlags()[0] = true;
}
if (isValidValue(fields()[1], other.description)) {
this.description = data().deepCopy(fields()[1].schema(), other.description);
fieldSetFlags()[1] = true;
}
if (isValidValue(fields()[2], other.aggregation)) {
this.aggregation = data().deepCopy(fields()[2].schema(), other.aggregation);
fieldSetFlags()[2] = true;
}
if (isValidValue(fields()[3], other.aggregatedHeader)) {
this.aggregatedHeader = data().deepCopy(fields()[3].schema(), other.aggregatedHeader);
fieldSetFlags()[3] = true;
}
if (isValidValue(fields()[4], other.files)) {
this.files = data().deepCopy(fields()[4].schema(), other.files);
fieldSetFlags()[4] = true;
}
if (isValidValue(fields()[5], other.individuals)) {
this.individuals = data().deepCopy(fields()[5].schema(), other.individuals);
fieldSetFlags()[5] = true;
}
if (isValidValue(fields()[6], other.cohorts)) {
this.cohorts = data().deepCopy(fields()[6].schema(), other.cohorts);
fieldSetFlags()[6] = true;
}
if (isValidValue(fields()[7], other.sampleSetType)) {
this.sampleSetType = data().deepCopy(fields()[7].schema(), other.sampleSetType);
fieldSetFlags()[7] = true;
}
if (isValidValue(fields()[8], other.stats)) {
this.stats = data().deepCopy(fields()[8].schema(), other.stats);
fieldSetFlags()[8] = true;
}
if (isValidValue(fields()[9], other.attributes)) {
this.attributes = data().deepCopy(fields()[9].schema(), other.attributes);
fieldSetFlags()[9] = 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.VariantStudyMetadata.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.VariantStudyMetadata.Builder clearId() {
id = null;
fieldSetFlags()[0] = 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.VariantStudyMetadata.Builder setDescription(java.lang.String value) {
validate(fields()[1], value);
this.description = value;
fieldSetFlags()[1] = true;
return this;
}
/** Checks whether the 'description' field has been set */
public boolean hasDescription() {
return fieldSetFlags()[1];
}
/** Clears the value of the 'description' field */
public org.opencb.biodata.models.variant.metadata.VariantStudyMetadata.Builder clearDescription() {
description = null;
fieldSetFlags()[1] = false;
return this;
}
/** Gets the value of the 'aggregation' field */
public org.opencb.biodata.models.variant.metadata.Aggregation getAggregation() {
return aggregation;
}
/** Sets the value of the 'aggregation' field */
public org.opencb.biodata.models.variant.metadata.VariantStudyMetadata.Builder setAggregation(org.opencb.biodata.models.variant.metadata.Aggregation value) {
validate(fields()[2], value);
this.aggregation = value;
fieldSetFlags()[2] = true;
return this;
}
/** Checks whether the 'aggregation' field has been set */
public boolean hasAggregation() {
return fieldSetFlags()[2];
}
/** Clears the value of the 'aggregation' field */
public org.opencb.biodata.models.variant.metadata.VariantStudyMetadata.Builder clearAggregation() {
aggregation = null;
fieldSetFlags()[2] = false;
return this;
}
/** Gets the value of the 'aggregatedHeader' field */
public org.opencb.biodata.models.variant.metadata.VariantFileHeader getAggregatedHeader() {
return aggregatedHeader;
}
/** Sets the value of the 'aggregatedHeader' field */
public org.opencb.biodata.models.variant.metadata.VariantStudyMetadata.Builder setAggregatedHeader(org.opencb.biodata.models.variant.metadata.VariantFileHeader value) {
validate(fields()[3], value);
this.aggregatedHeader = value;
fieldSetFlags()[3] = true;
return this;
}
/** Checks whether the 'aggregatedHeader' field has been set */
public boolean hasAggregatedHeader() {
return fieldSetFlags()[3];
}
/** Clears the value of the 'aggregatedHeader' field */
public org.opencb.biodata.models.variant.metadata.VariantStudyMetadata.Builder clearAggregatedHeader() {
aggregatedHeader = null;
fieldSetFlags()[3] = false;
return this;
}
/** Gets the value of the 'files' field */
public java.util.List getFiles() {
return files;
}
/** Sets the value of the 'files' field */
public org.opencb.biodata.models.variant.metadata.VariantStudyMetadata.Builder setFiles(java.util.List value) {
validate(fields()[4], value);
this.files = value;
fieldSetFlags()[4] = true;
return this;
}
/** Checks whether the 'files' field has been set */
public boolean hasFiles() {
return fieldSetFlags()[4];
}
/** Clears the value of the 'files' field */
public org.opencb.biodata.models.variant.metadata.VariantStudyMetadata.Builder clearFiles() {
files = null;
fieldSetFlags()[4] = false;
return this;
}
/** Gets the value of the 'individuals' field */
public java.util.List getIndividuals() {
return individuals;
}
/** Sets the value of the 'individuals' field */
public org.opencb.biodata.models.variant.metadata.VariantStudyMetadata.Builder setIndividuals(java.util.List value) {
validate(fields()[5], value);
this.individuals = value;
fieldSetFlags()[5] = true;
return this;
}
/** Checks whether the 'individuals' field has been set */
public boolean hasIndividuals() {
return fieldSetFlags()[5];
}
/** Clears the value of the 'individuals' field */
public org.opencb.biodata.models.variant.metadata.VariantStudyMetadata.Builder clearIndividuals() {
individuals = null;
fieldSetFlags()[5] = false;
return this;
}
/** Gets the value of the 'cohorts' field */
public java.util.List getCohorts() {
return cohorts;
}
/** Sets the value of the 'cohorts' field */
public org.opencb.biodata.models.variant.metadata.VariantStudyMetadata.Builder setCohorts(java.util.List value) {
validate(fields()[6], value);
this.cohorts = value;
fieldSetFlags()[6] = true;
return this;
}
/** Checks whether the 'cohorts' field has been set */
public boolean hasCohorts() {
return fieldSetFlags()[6];
}
/** Clears the value of the 'cohorts' field */
public org.opencb.biodata.models.variant.metadata.VariantStudyMetadata.Builder clearCohorts() {
cohorts = null;
fieldSetFlags()[6] = false;
return this;
}
/** Gets the value of the 'sampleSetType' field */
public org.opencb.biodata.models.metadata.SampleSetType getSampleSetType() {
return sampleSetType;
}
/** Sets the value of the 'sampleSetType' field */
public org.opencb.biodata.models.variant.metadata.VariantStudyMetadata.Builder setSampleSetType(org.opencb.biodata.models.metadata.SampleSetType value) {
validate(fields()[7], value);
this.sampleSetType = value;
fieldSetFlags()[7] = true;
return this;
}
/** Checks whether the 'sampleSetType' field has been set */
public boolean hasSampleSetType() {
return fieldSetFlags()[7];
}
/** Clears the value of the 'sampleSetType' field */
public org.opencb.biodata.models.variant.metadata.VariantStudyMetadata.Builder clearSampleSetType() {
sampleSetType = null;
fieldSetFlags()[7] = false;
return this;
}
/** Gets the value of the 'stats' field */
public org.opencb.biodata.models.variant.metadata.VariantStudyStats getStats() {
return stats;
}
/** Sets the value of the 'stats' field */
public org.opencb.biodata.models.variant.metadata.VariantStudyMetadata.Builder setStats(org.opencb.biodata.models.variant.metadata.VariantStudyStats value) {
validate(fields()[8], value);
this.stats = value;
fieldSetFlags()[8] = true;
return this;
}
/** Checks whether the 'stats' field has been set */
public boolean hasStats() {
return fieldSetFlags()[8];
}
/** Clears the value of the 'stats' field */
public org.opencb.biodata.models.variant.metadata.VariantStudyMetadata.Builder clearStats() {
stats = null;
fieldSetFlags()[8] = false;
return this;
}
/** Gets the value of the 'attributes' field */
public java.util.Map getAttributes() {
return attributes;
}
/** Sets the value of the 'attributes' field */
public org.opencb.biodata.models.variant.metadata.VariantStudyMetadata.Builder setAttributes(java.util.Map value) {
validate(fields()[9], value);
this.attributes = value;
fieldSetFlags()[9] = true;
return this;
}
/** Checks whether the 'attributes' field has been set */
public boolean hasAttributes() {
return fieldSetFlags()[9];
}
/** Clears the value of the 'attributes' field */
public org.opencb.biodata.models.variant.metadata.VariantStudyMetadata.Builder clearAttributes() {
attributes = null;
fieldSetFlags()[9] = false;
return this;
}
@Override
public VariantStudyMetadata build() {
try {
VariantStudyMetadata record = new VariantStudyMetadata();
record.id = fieldSetFlags()[0] ? this.id : (java.lang.String) defaultValue(fields()[0]);
record.description = fieldSetFlags()[1] ? this.description : (java.lang.String) defaultValue(fields()[1]);
record.aggregation = fieldSetFlags()[2] ? this.aggregation : (org.opencb.biodata.models.variant.metadata.Aggregation) defaultValue(fields()[2]);
record.aggregatedHeader = fieldSetFlags()[3] ? this.aggregatedHeader : (org.opencb.biodata.models.variant.metadata.VariantFileHeader) defaultValue(fields()[3]);
record.files = fieldSetFlags()[4] ? this.files : (java.util.List) defaultValue(fields()[4]);
record.individuals = fieldSetFlags()[5] ? this.individuals : (java.util.List) defaultValue(fields()[5]);
record.cohorts = fieldSetFlags()[6] ? this.cohorts : (java.util.List) defaultValue(fields()[6]);
record.sampleSetType = fieldSetFlags()[7] ? this.sampleSetType : (org.opencb.biodata.models.metadata.SampleSetType) defaultValue(fields()[7]);
record.stats = fieldSetFlags()[8] ? this.stats : (org.opencb.biodata.models.variant.metadata.VariantStudyStats) defaultValue(fields()[8]);
record.attributes = fieldSetFlags()[9] ? this.attributes : (java.util.Map) defaultValue(fields()[9]);
return record;
} catch (Exception e) {
throw new org.apache.avro.AvroRuntimeException(e);
}
}
}
}