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

org.opencb.biodata.models.variant.avro.StudyEntry Maven / Gradle / Ivy

The newest version!
/**
 * Autogenerated by Avro
 * 
 * DO NOT EDIT DIRECTLY
 */
package org.opencb.biodata.models.variant.avro;  
@SuppressWarnings("all")
@org.apache.avro.specific.AvroGenerated
public class StudyEntry 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\":\"StudyEntry\",\"namespace\":\"org.opencb.biodata.models.variant.avro\",\"fields\":[{\"name\":\"studyId\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"doc\":\"* Unique identifier of the study.\"},{\"name\":\"files\",\"type\":{\"type\":\"array\",\"items\":{\"type\":\"record\",\"name\":\"FileEntry\",\"fields\":[{\"name\":\"fileId\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"doc\":\"* Unique identifier of the source file.\"},{\"name\":\"call\",\"type\":[\"null\",{\"type\":\"record\",\"name\":\"OriginalCall\",\"fields\":[{\"name\":\"variantId\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"doc\":\"* Original variant ID before normalization including all secondary alternates.\"},{\"name\":\"alleleIndex\",\"type\":[\"null\",\"int\"],\"doc\":\"* Alternate allele index of the original multi-allellic variant call in which was decomposed.\"}]}],\"doc\":\"* Original call position for the variant, if the file was normalized.\\n         *\\n         * {position}:{reference}:{alternate}(,{other_alternate})*:{allele_index}\"},{\"name\":\"data\",\"type\":{\"type\":\"map\",\"values\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"avro.java.string\":\"String\"},\"doc\":\"* Optional data that probably depend on the format of the file the\\n         * variant was initially read from.\"}]}},\"doc\":\"* List of files from the study where the variant was present.\",\"default\":[]},{\"name\":\"secondaryAlternates\",\"type\":[\"null\",{\"type\":\"array\",\"items\":{\"type\":\"record\",\"name\":\"AlternateCoordinate\",\"fields\":[{\"name\":\"chromosome\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}]},{\"name\":\"start\",\"type\":[\"null\",\"int\"],\"doc\":\"* First position 1-based of the alternate. If null, the start is the same of the variant.\"},{\"name\":\"end\",\"type\":[\"null\",\"int\"],\"doc\":\"* End position 1-based of the alternate. If null, the end is the same of the variant.\"},{\"name\":\"reference\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"doc\":\"* Reference allele. If null, the reference is the same of the variant.\"},{\"name\":\"alternate\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"doc\":\"* Alternate allele.\"},{\"name\":\"type\",\"type\":{\"type\":\"enum\",\"name\":\"VariantType\",\"doc\":\"* Type of variation, which depends mostly on its length.\\n     * 
    \\n *
  • SNVs involve a single nucleotide, without changes in length
  • \\n *
  • MNVs involve multiple nucleotides, without changes in length
  • \\n *
  • Indels are insertions or deletions of less than SV_THRESHOLD (50) nucleotides
  • \\n *
  • Structural variations are large changes of more than SV_THRESHOLD nucleotides
  • \\n *
  • Copy-number variations alter the number of copies of a region
  • \\n *
\",\"symbols\":[\"SNV\",\"MNV\",\"INDEL\",\"SV\",\"INSERTION\",\"DELETION\",\"TRANSLOCATION\",\"INVERSION\",\"COPY_NUMBER\",\"COPY_NUMBER_GAIN\",\"COPY_NUMBER_LOSS\",\"DUPLICATION\",\"TANDEM_DUPLICATION\",\"BREAKEND\",\"NO_VARIATION\",\"SYMBOLIC\",\"MIXED\",\"SNP\",\"MNP\",\"CNV\"]}}]}}],\"doc\":\"* Alternate alleles that appear along with a variant alternate.\",\"default\":null},{\"name\":\"sampleDataKeys\",\"type\":{\"type\":\"array\",\"items\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},\"doc\":\"* Fields stored for each sample.\"},{\"name\":\"samples\",\"type\":{\"type\":\"array\",\"items\":{\"type\":\"record\",\"name\":\"SampleEntry\",\"fields\":[{\"name\":\"sampleId\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}]},{\"name\":\"fileIndex\",\"type\":[\"null\",\"int\"]},{\"name\":\"data\",\"type\":{\"type\":\"array\",\"items\":{\"type\":\"string\",\"avro.java.string\":\"String\"}}}]}},\"doc\":\"* Genotypes and other sample-related information. Each position is related\\n * with one sample. The content are lists of values in the same order than the\\n * sampleDataKeys array. The length of this lists must be the same as the sampleDataKeys field.\"},{\"name\":\"issues\",\"type\":{\"type\":\"array\",\"items\":{\"type\":\"record\",\"name\":\"IssueEntry\",\"fields\":[{\"name\":\"type\",\"type\":{\"type\":\"enum\",\"name\":\"IssueType\",\"symbols\":[\"DUPLICATION\",\"DISCREPANCY\",\"MENDELIAN_ERROR\",\"DE_NOVO\",\"COMPOUND_HETEROZYGOUS\"]}},{\"name\":\"sample\",\"type\":\"SampleEntry\"},{\"name\":\"data\",\"type\":{\"type\":\"map\",\"values\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"avro.java.string\":\"String\"}}]}},\"default\":[]},{\"name\":\"stats\",\"type\":{\"type\":\"array\",\"items\":{\"type\":\"record\",\"name\":\"VariantStats\",\"fields\":[{\"name\":\"cohortId\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"doc\":\"* Unique cohort identifier within the study.\\n *\"},{\"name\":\"sampleCount\",\"type\":[\"null\",\"int\"],\"doc\":\"* Count of samples with non-missing genotypes in this variant from the cohort.\\n * This value is used as denominator for genotypeFreq.\\n *\"},{\"name\":\"fileCount\",\"type\":[\"null\",\"int\"],\"doc\":\"* Count of files with samples from the cohort that reported this variant.\\n * This value is used as denominator for filterFreq.\\n *\"},{\"name\":\"alleleCount\",\"type\":[\"null\",\"int\"],\"doc\":\"* Total number of alleles in called genotypes. It does not include missing alleles.\\n * This value is used as denominator for refAlleleFreq and altAlleleFreq.\\n *\"},{\"name\":\"refAlleleCount\",\"type\":[\"null\",\"int\"],\"doc\":\"* Number of reference alleles found in this variant.\\n *\"},{\"name\":\"altAlleleCount\",\"type\":[\"null\",\"int\"],\"doc\":\"* Number of main alternate alleles found in this variants. It does not include secondary alternates.\\n *\"},{\"name\":\"refAlleleFreq\",\"type\":[\"null\",\"float\"],\"doc\":\"* Reference allele frequency calculated from refAlleleCount and alleleCount, in the range [0,1]\\n *\"},{\"name\":\"altAlleleFreq\",\"type\":[\"null\",\"float\"],\"doc\":\"* Alternate allele frequency calculated from altAlleleCount and alleleCount, in the range [0,1]\\n *\"},{\"name\":\"missingAlleleCount\",\"type\":[\"null\",\"int\"],\"doc\":\"* Number of missing alleles.\\n *\"},{\"name\":\"missingGenotypeCount\",\"type\":[\"null\",\"int\"],\"doc\":\"* Number of genotypes with all alleles missing (e.g. ./.). It does not count partially missing genotypes like \\\"./0\\\" or \\\"./1\\\".\\n *\"},{\"name\":\"genotypeCount\",\"type\":{\"type\":\"map\",\"values\":\"int\",\"avro.java.string\":\"String\"},\"doc\":\"* Number of occurrences for each genotype.\\n * This does not include genotype with all alleles missing (e.g. ./.), but it includes partially missing genotypes like \\\"./0\\\" or \\\"./1\\\".\\n * Total sum of counts should be equal to the count of samples.\\n *\",\"default\":{}},{\"name\":\"genotypeFreq\",\"type\":{\"type\":\"map\",\"values\":\"float\",\"avro.java.string\":\"String\"},\"doc\":\"* Genotype frequency for each genotype found calculated from the genotypeCount and samplesCount, in the range [0,1]\\n * The sum of frequencies should be 1.\\n *\",\"default\":{}},{\"name\":\"filterCount\",\"type\":{\"type\":\"map\",\"values\":\"int\",\"avro.java.string\":\"String\"},\"doc\":\"* The number of occurrences for each FILTER value in files from samples in this cohort reporting this variant.\\n * As each file can contain more than one filter value (usually separated by ';'), the total sum of counts could be greater than the count of files.\\n *\"},{\"name\":\"filterFreq\",\"type\":{\"type\":\"map\",\"values\":\"float\",\"avro.java.string\":\"String\"},\"doc\":\"* Frequency of each filter calculated from the filterCount and filesCount, in the range [0,1]\\n *\"},{\"name\":\"qualityCount\",\"type\":[\"null\",\"int\"],\"doc\":\"* The number of files from samples in this cohort reporting this variant with valid QUAL values.\\n * This value is used as denominator to obtain the qualityAvg.\"},{\"name\":\"qualityAvg\",\"type\":[\"null\",\"float\"],\"doc\":\"* The average Quality value for files with valid QUAL values from samples in this cohort reporting this variant.\\n * Some files may not have defined the QUAL value, so the sampling could be less than the filesCount.\\n *\"},{\"name\":\"maf\",\"type\":[\"null\",\"float\"],\"doc\":\"* Minor allele frequency. Frequency of the less common allele between the reference and the main alternate alleles.\\n * This value does not take into acconunt secondary alternates.\\n *\"},{\"name\":\"mgf\",\"type\":[\"null\",\"float\"],\"doc\":\"* Minor genotype frequency. Frequency of the less common genotype seen in this variant.\\n * This value takes into account all values from the genotypeFreq map.\\n *\"},{\"na","me\":\"mafAllele\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"doc\":\"* Allele with minor frequency.\\n *\"},{\"name\":\"mgfGenotype\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"doc\":\"* Genotype with minor frequency.\\n *\"}]}},\"doc\":\"* Statistics of the genomic variation, such as its alleles/genotype count\\n * or its minimum allele frequency, grouped by cohort name.\"},{\"name\":\"scores\",\"type\":{\"type\":\"array\",\"items\":{\"type\":\"record\",\"name\":\"VariantScore\",\"fields\":[{\"name\":\"id\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"doc\":\"* Variant score ID.\"},{\"name\":\"cohort1\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"doc\":\"* Main cohort used for calculating the score.\"},{\"name\":\"cohort2\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"doc\":\"* Optional secondary cohort used for calculating the score.\",\"default\":null},{\"name\":\"score\",\"type\":\"float\",\"doc\":\"* Score value\"},{\"name\":\"pValue\",\"type\":[\"null\",\"float\"],\"doc\":\"* Score p value\",\"default\":null}]}},\"default\":[]}]}"); public static org.apache.avro.Schema getClassSchema() { return SCHEMA$; } /** * Unique identifier of the study. */ private java.lang.String studyId; /** * List of files from the study where the variant was present. */ private java.util.List files; /** * Alternate alleles that appear along with a variant alternate. */ private java.util.List secondaryAlternates; /** * Fields stored for each sample. */ private java.util.List sampleDataKeys; /** * Genotypes and other sample-related information. Each position is related * with one sample. The content are lists of values in the same order than the * sampleDataKeys array. The length of this lists must be the same as the sampleDataKeys field. */ private java.util.List samples; private java.util.List issues; /** * Statistics of the genomic variation, such as its alleles/genotype count * or its minimum allele frequency, grouped by cohort name. */ private java.util.List stats; private java.util.List scores; /** * 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 StudyEntry() {} /** * All-args constructor. */ public StudyEntry(java.lang.String studyId, java.util.List files, java.util.List secondaryAlternates, java.util.List sampleDataKeys, java.util.List samples, java.util.List issues, java.util.List stats, java.util.List scores) { this.studyId = studyId; this.files = files; this.secondaryAlternates = secondaryAlternates; this.sampleDataKeys = sampleDataKeys; this.samples = samples; this.issues = issues; this.stats = stats; this.scores = scores; } 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 studyId; case 1: return files; case 2: return secondaryAlternates; case 3: return sampleDataKeys; case 4: return samples; case 5: return issues; case 6: return stats; case 7: return scores; 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: studyId = (java.lang.String)value$; break; case 1: files = (java.util.List)value$; break; case 2: secondaryAlternates = (java.util.List)value$; break; case 3: sampleDataKeys = (java.util.List)value$; break; case 4: samples = (java.util.List)value$; break; case 5: issues = (java.util.List)value$; break; case 6: stats = (java.util.List)value$; break; case 7: scores = (java.util.List)value$; break; default: throw new org.apache.avro.AvroRuntimeException("Bad index"); } } /** * Gets the value of the 'studyId' field. * * Unique identifier of the study. */ public java.lang.String getStudyId() { return studyId; } /** * Sets the value of the 'studyId' field. * * Unique identifier of the study. * @param value the value to set. */ public void setStudyId(java.lang.String value) { this.studyId = value; } /** * Gets the value of the 'files' field. * * List of files from the study where the variant was present. */ public java.util.List getFiles() { return files; } /** * Sets the value of the 'files' field. * * List of files from the study where the variant was present. * @param value the value to set. */ public void setFiles(java.util.List value) { this.files = value; } /** * Gets the value of the 'secondaryAlternates' field. * * Alternate alleles that appear along with a variant alternate. */ public java.util.List getSecondaryAlternates() { return secondaryAlternates; } /** * Sets the value of the 'secondaryAlternates' field. * * Alternate alleles that appear along with a variant alternate. * @param value the value to set. */ public void setSecondaryAlternates(java.util.List value) { this.secondaryAlternates = value; } /** * Gets the value of the 'sampleDataKeys' field. * * Fields stored for each sample. */ public java.util.List getSampleDataKeys() { return sampleDataKeys; } /** * Sets the value of the 'sampleDataKeys' field. * * Fields stored for each sample. * @param value the value to set. */ public void setSampleDataKeys(java.util.List value) { this.sampleDataKeys = value; } /** * Gets the value of the 'samples' field. * * Genotypes and other sample-related information. Each position is related * with one sample. The content are lists of values in the same order than the * sampleDataKeys array. The length of this lists must be the same as the sampleDataKeys field. */ public java.util.List getSamples() { return samples; } /** * Sets the value of the 'samples' field. * * Genotypes and other sample-related information. Each position is related * with one sample. The content are lists of values in the same order than the * sampleDataKeys array. The length of this lists must be the same as the sampleDataKeys field. * @param value the value to set. */ public void setSamples(java.util.List value) { this.samples = value; } /** * Gets the value of the 'issues' field. */ public java.util.List getIssues() { return issues; } /** * Sets the value of the 'issues' field. * @param value the value to set. */ public void setIssues(java.util.List value) { this.issues = value; } /** * Gets the value of the 'stats' field. * * Statistics of the genomic variation, such as its alleles/genotype count * or its minimum allele frequency, grouped by cohort name. */ public java.util.List getStats() { return stats; } /** * Sets the value of the 'stats' field. * * Statistics of the genomic variation, such as its alleles/genotype count * or its minimum allele frequency, grouped by cohort name. * @param value the value to set. */ public void setStats(java.util.List value) { this.stats = value; } /** * Gets the value of the 'scores' field. */ public java.util.List getScores() { return scores; } /** * Sets the value of the 'scores' field. * @param value the value to set. */ public void setScores(java.util.List value) { this.scores = value; } /** Creates a new StudyEntry RecordBuilder */ public static org.opencb.biodata.models.variant.avro.StudyEntry.Builder newBuilder() { return new org.opencb.biodata.models.variant.avro.StudyEntry.Builder(); } /** Creates a new StudyEntry RecordBuilder by copying an existing Builder */ public static org.opencb.biodata.models.variant.avro.StudyEntry.Builder newBuilder(org.opencb.biodata.models.variant.avro.StudyEntry.Builder other) { return new org.opencb.biodata.models.variant.avro.StudyEntry.Builder(other); } /** Creates a new StudyEntry RecordBuilder by copying an existing StudyEntry instance */ public static org.opencb.biodata.models.variant.avro.StudyEntry.Builder newBuilder(org.opencb.biodata.models.variant.avro.StudyEntry other) { return new org.opencb.biodata.models.variant.avro.StudyEntry.Builder(other); } /** * RecordBuilder for StudyEntry instances. */ public static class Builder extends org.apache.avro.specific.SpecificRecordBuilderBase implements org.apache.avro.data.RecordBuilder { private java.lang.String studyId; private java.util.List files; private java.util.List secondaryAlternates; private java.util.List sampleDataKeys; private java.util.List samples; private java.util.List issues; private java.util.List stats; private java.util.List scores; /** Creates a new Builder */ private Builder() { super(org.opencb.biodata.models.variant.avro.StudyEntry.SCHEMA$); } /** Creates a Builder by copying an existing Builder */ private Builder(org.opencb.biodata.models.variant.avro.StudyEntry.Builder other) { super(other); if (isValidValue(fields()[0], other.studyId)) { this.studyId = data().deepCopy(fields()[0].schema(), other.studyId); fieldSetFlags()[0] = true; } if (isValidValue(fields()[1], other.files)) { this.files = data().deepCopy(fields()[1].schema(), other.files); fieldSetFlags()[1] = true; } if (isValidValue(fields()[2], other.secondaryAlternates)) { this.secondaryAlternates = data().deepCopy(fields()[2].schema(), other.secondaryAlternates); fieldSetFlags()[2] = true; } if (isValidValue(fields()[3], other.sampleDataKeys)) { this.sampleDataKeys = data().deepCopy(fields()[3].schema(), other.sampleDataKeys); fieldSetFlags()[3] = true; } if (isValidValue(fields()[4], other.samples)) { this.samples = data().deepCopy(fields()[4].schema(), other.samples); fieldSetFlags()[4] = true; } if (isValidValue(fields()[5], other.issues)) { this.issues = data().deepCopy(fields()[5].schema(), other.issues); fieldSetFlags()[5] = true; } if (isValidValue(fields()[6], other.stats)) { this.stats = data().deepCopy(fields()[6].schema(), other.stats); fieldSetFlags()[6] = true; } if (isValidValue(fields()[7], other.scores)) { this.scores = data().deepCopy(fields()[7].schema(), other.scores); fieldSetFlags()[7] = true; } } /** Creates a Builder by copying an existing StudyEntry instance */ private Builder(org.opencb.biodata.models.variant.avro.StudyEntry other) { super(org.opencb.biodata.models.variant.avro.StudyEntry.SCHEMA$); if (isValidValue(fields()[0], other.studyId)) { this.studyId = data().deepCopy(fields()[0].schema(), other.studyId); fieldSetFlags()[0] = true; } if (isValidValue(fields()[1], other.files)) { this.files = data().deepCopy(fields()[1].schema(), other.files); fieldSetFlags()[1] = true; } if (isValidValue(fields()[2], other.secondaryAlternates)) { this.secondaryAlternates = data().deepCopy(fields()[2].schema(), other.secondaryAlternates); fieldSetFlags()[2] = true; } if (isValidValue(fields()[3], other.sampleDataKeys)) { this.sampleDataKeys = data().deepCopy(fields()[3].schema(), other.sampleDataKeys); fieldSetFlags()[3] = true; } if (isValidValue(fields()[4], other.samples)) { this.samples = data().deepCopy(fields()[4].schema(), other.samples); fieldSetFlags()[4] = true; } if (isValidValue(fields()[5], other.issues)) { this.issues = data().deepCopy(fields()[5].schema(), other.issues); fieldSetFlags()[5] = true; } if (isValidValue(fields()[6], other.stats)) { this.stats = data().deepCopy(fields()[6].schema(), other.stats); fieldSetFlags()[6] = true; } if (isValidValue(fields()[7], other.scores)) { this.scores = data().deepCopy(fields()[7].schema(), other.scores); fieldSetFlags()[7] = true; } } /** Gets the value of the 'studyId' field */ public java.lang.String getStudyId() { return studyId; } /** Sets the value of the 'studyId' field */ public org.opencb.biodata.models.variant.avro.StudyEntry.Builder setStudyId(java.lang.String value) { validate(fields()[0], value); this.studyId = value; fieldSetFlags()[0] = true; return this; } /** Checks whether the 'studyId' field has been set */ public boolean hasStudyId() { return fieldSetFlags()[0]; } /** Clears the value of the 'studyId' field */ public org.opencb.biodata.models.variant.avro.StudyEntry.Builder clearStudyId() { studyId = null; fieldSetFlags()[0] = 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.avro.StudyEntry.Builder setFiles(java.util.List value) { validate(fields()[1], value); this.files = value; fieldSetFlags()[1] = true; return this; } /** Checks whether the 'files' field has been set */ public boolean hasFiles() { return fieldSetFlags()[1]; } /** Clears the value of the 'files' field */ public org.opencb.biodata.models.variant.avro.StudyEntry.Builder clearFiles() { files = null; fieldSetFlags()[1] = false; return this; } /** Gets the value of the 'secondaryAlternates' field */ public java.util.List getSecondaryAlternates() { return secondaryAlternates; } /** Sets the value of the 'secondaryAlternates' field */ public org.opencb.biodata.models.variant.avro.StudyEntry.Builder setSecondaryAlternates(java.util.List value) { validate(fields()[2], value); this.secondaryAlternates = value; fieldSetFlags()[2] = true; return this; } /** Checks whether the 'secondaryAlternates' field has been set */ public boolean hasSecondaryAlternates() { return fieldSetFlags()[2]; } /** Clears the value of the 'secondaryAlternates' field */ public org.opencb.biodata.models.variant.avro.StudyEntry.Builder clearSecondaryAlternates() { secondaryAlternates = null; fieldSetFlags()[2] = false; return this; } /** Gets the value of the 'sampleDataKeys' field */ public java.util.List getSampleDataKeys() { return sampleDataKeys; } /** Sets the value of the 'sampleDataKeys' field */ public org.opencb.biodata.models.variant.avro.StudyEntry.Builder setSampleDataKeys(java.util.List value) { validate(fields()[3], value); this.sampleDataKeys = value; fieldSetFlags()[3] = true; return this; } /** Checks whether the 'sampleDataKeys' field has been set */ public boolean hasSampleDataKeys() { return fieldSetFlags()[3]; } /** Clears the value of the 'sampleDataKeys' field */ public org.opencb.biodata.models.variant.avro.StudyEntry.Builder clearSampleDataKeys() { sampleDataKeys = null; fieldSetFlags()[3] = false; return this; } /** Gets the value of the 'samples' field */ public java.util.List getSamples() { return samples; } /** Sets the value of the 'samples' field */ public org.opencb.biodata.models.variant.avro.StudyEntry.Builder setSamples(java.util.List value) { validate(fields()[4], value); this.samples = value; fieldSetFlags()[4] = true; return this; } /** Checks whether the 'samples' field has been set */ public boolean hasSamples() { return fieldSetFlags()[4]; } /** Clears the value of the 'samples' field */ public org.opencb.biodata.models.variant.avro.StudyEntry.Builder clearSamples() { samples = null; fieldSetFlags()[4] = false; return this; } /** Gets the value of the 'issues' field */ public java.util.List getIssues() { return issues; } /** Sets the value of the 'issues' field */ public org.opencb.biodata.models.variant.avro.StudyEntry.Builder setIssues(java.util.List value) { validate(fields()[5], value); this.issues = value; fieldSetFlags()[5] = true; return this; } /** Checks whether the 'issues' field has been set */ public boolean hasIssues() { return fieldSetFlags()[5]; } /** Clears the value of the 'issues' field */ public org.opencb.biodata.models.variant.avro.StudyEntry.Builder clearIssues() { issues = null; fieldSetFlags()[5] = false; return this; } /** Gets the value of the 'stats' field */ public java.util.List getStats() { return stats; } /** Sets the value of the 'stats' field */ public org.opencb.biodata.models.variant.avro.StudyEntry.Builder setStats(java.util.List value) { validate(fields()[6], value); this.stats = value; fieldSetFlags()[6] = true; return this; } /** Checks whether the 'stats' field has been set */ public boolean hasStats() { return fieldSetFlags()[6]; } /** Clears the value of the 'stats' field */ public org.opencb.biodata.models.variant.avro.StudyEntry.Builder clearStats() { stats = null; fieldSetFlags()[6] = false; return this; } /** Gets the value of the 'scores' field */ public java.util.List getScores() { return scores; } /** Sets the value of the 'scores' field */ public org.opencb.biodata.models.variant.avro.StudyEntry.Builder setScores(java.util.List value) { validate(fields()[7], value); this.scores = value; fieldSetFlags()[7] = true; return this; } /** Checks whether the 'scores' field has been set */ public boolean hasScores() { return fieldSetFlags()[7]; } /** Clears the value of the 'scores' field */ public org.opencb.biodata.models.variant.avro.StudyEntry.Builder clearScores() { scores = null; fieldSetFlags()[7] = false; return this; } @Override public StudyEntry build() { try { StudyEntry record = new StudyEntry(); record.studyId = fieldSetFlags()[0] ? this.studyId : (java.lang.String) defaultValue(fields()[0]); record.files = fieldSetFlags()[1] ? this.files : (java.util.List) defaultValue(fields()[1]); record.secondaryAlternates = fieldSetFlags()[2] ? this.secondaryAlternates : (java.util.List) defaultValue(fields()[2]); record.sampleDataKeys = fieldSetFlags()[3] ? this.sampleDataKeys : (java.util.List) defaultValue(fields()[3]); record.samples = fieldSetFlags()[4] ? this.samples : (java.util.List) defaultValue(fields()[4]); record.issues = fieldSetFlags()[5] ? this.issues : (java.util.List) defaultValue(fields()[5]); record.stats = fieldSetFlags()[6] ? this.stats : (java.util.List) defaultValue(fields()[6]); record.scores = fieldSetFlags()[7] ? this.scores : (java.util.List) defaultValue(fields()[7]); return record; } catch (Exception e) { throw new org.apache.avro.AvroRuntimeException(e); } } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy