/// <summary> /// Tells us that the resulting VariantContext should have the specified location </summary> /// <param name="contig"> </param> /// <param name="start"> </param> /// <param name="stop"> /// @return </param> public virtual VariantContextBuilder loc(string contig, long start, long stop) { this.Contig = contig; this.start_Renamed = start; this.stop_Renamed = stop; toValidate = toValidate | VariantContext.Validation.ALLELES; return(this); }
/// <summary> /// Tells this builder that the resulting VariantContext should use this genotypes GenotypeContext /// /// Note that genotypes can be null -> meaning there are no genotypes /// </summary> /// <param name="genotypes"> </param> public void SetGenotypes(GenotypesContext genotypes, bool requireValidation = true) { this.genotypes_Renamed = genotypes; if (genotypes != null && requireValidation) { toValidate = toValidate | VariantContext.Validation.GENOTYPES; } //TODO: Perhaps if the genotypes are reset we should remove the validation flag if it was not required but was already present? }
/// <summary> /// Create an empty VariantContextBuilder where all values adopt their default values, but the bare min. /// of info (source, chr, start, stop, and alleles) have been provided to start. /// </summary> public VariantContextBuilder(string source, string contig, long start, long stop, ICollection <Allele> alleles) : this() { this.Source = source; this.Contig = contig; this.start_Renamed = start; this.stop_Renamed = stop; this.alleles_Renamed = alleles; this.attributes_Renamed = new Dictionary <string, object> (); // Collections.emptyMap(); // immutable toValidate = toValidate | VariantContext.Validation.ALLELES; //using as bit flags }
/// <summary> /// Tells this builder to use this collection of alleles for the resulting VariantContext /// </summary> /// <param name="alleles"> </param> /// <returns> this builder </returns> public void SetAlleles(ICollection <Allele> alleles) { this.alleles_Renamed = alleles; toValidate = toValidate | VariantContext.Validation.ALLELES; }
/// <summary> /// Create an empty VariantContextBuilder where all values adopt their default values, but the bare min. /// of info (source, chr, start, stop, and alleles) have been provided to start. /// </summary> public VariantContextBuilder (string source, string contig, long start, long stop, ICollection<Allele> alleles) : this () { this.Source = source; this.Contig = contig; this.start_Renamed = start; this.stop_Renamed = stop; this.alleles_Renamed = alleles; this.attributes_Renamed = new Dictionary<string, object> ();// Collections.emptyMap(); // immutable toValidate = toValidate | VariantContext.Validation.ALLELES;//using as bit flags }
/// <summary> /// Tells us that the resulting VariantContext should have the specified location </summary> /// <param name="contig"> </param> /// <param name="start"> </param> /// <param name="stop"> /// @return </param> public virtual VariantContextBuilder loc (string contig, long start, long stop) { this.Contig = contig; this.start_Renamed = start; this.stop_Renamed = stop; toValidate = toValidate | VariantContext.Validation.ALLELES; return this; }
/// <summary> /// Tells this builder that the resulting VariantContext should use this genotypes GenotypeContext /// /// Note that genotypes can be null -> meaning there are no genotypes /// </summary> /// <param name="genotypes"> </param> public void SetGenotypes (GenotypesContext genotypes, bool requireValidation = true) { this.genotypes_Renamed = genotypes; if (genotypes != null && requireValidation) { toValidate = toValidate | VariantContext.Validation.GENOTYPES; } //TODO: Perhaps if the genotypes are reset we should remove the validation flag if it was not required but was already present? }
/// <summary> /// Tells this builder to use this collection of alleles for the resulting VariantContext /// </summary> /// <param name="alleles"> </param> /// <returns> this builder </returns> public void SetAlleles (ICollection<Allele> alleles) { this.alleles_Renamed = alleles; toValidate = toValidate | VariantContext.Validation.ALLELES; }