Beispiel #1
0
 /// <summary>
 /// Constructor used to get the codec and map from these things 
 /// </summary>
 /// <param name="baseCodec">The base codec, necessary to get the string cache from</param>
 public ListAndSetHash(AbstractVCFCodec baseCodec)
 {
     this.parentCodec = baseCodec;
     ListAndHash passList = new ListAndHash() { List = new List<string>().AsReadOnly(), Hash = new ImmutableHashSet<string>() };
     _strToListAndHash[VCFConstants.PASSES_FILTERS_v3] = passList;
     _strToListAndHash[VCFConstants.PASSES_FILTERS_v4] = passList;
 }
Beispiel #2
0
        /// <summary>
        /// Constructor used to get the codec and map from these things
        /// </summary>
        /// <param name="baseCodec">The base codec, necessary to get the string cache from</param>
        public ListAndSetHash(AbstractVCFCodec baseCodec)
        {
            this.parentCodec = baseCodec;
            ListAndHash passList = new ListAndHash()
            {
                List = new List <string>().AsReadOnly(), Hash = new ImmutableHashSet <string>()
            };

            _strToListAndHash[VCFConstants.PASSES_FILTERS_v3] = passList;
            _strToListAndHash[VCFConstants.PASSES_FILTERS_v4] = passList;
        }
Beispiel #3
0
		/// <summary>
		/// Creates a new lazy loading genotypes context using the LazyParser to create
		/// genotypes data on demand.
		/// </summary>
		/// <param name="parser"> the parser to be used to load on-demand genotypes data </param>
		/// <param name="unparsedGenotypeData"> the encoded genotypes data that we will decode if necessary </param>
		/// <param name="nUnparsedGenotypes"> the number of genotypes that will be produced if / when we actually decode the genotypes data </param>
		public LazyGenotypesContext (AbstractVCFCodec codec, IList<Allele> alleles, string contig, int start, string unparsedGenotypeData, int nUnparsedGenotypes)
            : base (EMPTY)
		{
			this.codec = codec;
			this.alleles = alleles;
			this.contig = contig;
			this.start = start;
			//Note: This formally kept a reference to a parser interface, decided that was too much overhead though so skipped it.  
			//this.parser = parser;
			this.UnparsedGenotypeData = unparsedGenotypeData;
			this.nUnparsedGenotypes = nUnparsedGenotypes;
		}
Beispiel #4
0
 /// <summary>
 /// Creates a new lazy loading genotypes context using the LazyParser to create
 /// genotypes data on demand.
 /// </summary>
 /// <param name="parser"> the parser to be used to load on-demand genotypes data </param>
 /// <param name="unparsedGenotypeData"> the encoded genotypes data that we will decode if necessary </param>
 /// <param name="nUnparsedGenotypes"> the number of genotypes that will be produced if / when we actually decode the genotypes data </param>
 public LazyGenotypesContext(AbstractVCFCodec codec, IList <Allele> alleles, string contig, int start, string unparsedGenotypeData, int nUnparsedGenotypes)
     : base(EMPTY)
 {
     this.codec   = codec;
     this.alleles = alleles;
     this.contig  = contig;
     this.start   = start;
     //Note: This formally kept a reference to a parser interface, decided that was too much overhead though so skipped it.
     //this.parser = parser;
     this.UnparsedGenotypeData = unparsedGenotypeData;
     this.nUnparsedGenotypes   = nUnparsedGenotypes;
 }