コード例 #1
0
 /// <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);
 }
コード例 #2
0
 /// <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?
 }
コード例 #3
0
 /// <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
 }
コード例 #4
0
 /// <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;
 }
コード例 #5
0
ファイル: VariantContextBuilder.cs プロジェクト: w3he/Bio.VCF
		/// <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
		}
コード例 #6
0
ファイル: VariantContextBuilder.cs プロジェクト: w3he/Bio.VCF
		/// <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;
		}
コード例 #7
0
ファイル: VariantContextBuilder.cs プロジェクト: w3he/Bio.VCF
		/// <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?
		}
コード例 #8
0
ファイル: VariantContextBuilder.cs プロジェクト: w3he/Bio.VCF
		/// <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;
		}