Beispiel #1
0
        public static VcfReader Create(StreamReader headerReader, StreamReader vcfLineReader, ISequenceProvider sequenceProvider,
                                       IRefMinorProvider refMinorProvider, IRecomposer recomposer, IVcfFilter vcfFilter, IVariantIdCreator vidCreator, IMitoHeteroplasmyProvider mitoHeteroplasmyProvider, bool enableDq = false)
        {
            var vcfReader = new VcfReader(headerReader, vcfLineReader, sequenceProvider, refMinorProvider, vcfFilter, vidCreator, mitoHeteroplasmyProvider, enableDq);

            vcfReader.ParseHeader();
            vcfReader.SetRecomposer(recomposer);
            return(vcfReader);
        }
Beispiel #2
0
        public static VcfReader Create(StreamReader headerReader, StreamReader vcfLineReader, ISequenceProvider sequenceProvider,
                                       IRefMinorProvider refMinorProvider, IRecomposer recomposer, IVcfFilter vcfFilter, IVariantIdCreator vidCreator)
        {
            var vcfReader = new VcfReader(headerReader, vcfLineReader, sequenceProvider, refMinorProvider, vcfFilter, vidCreator);

            vcfReader.ParseHeader();
            vcfReader.SetRecomposer(recomposer);
            return(vcfReader);
        }
Beispiel #3
0
        public VcfReader(Stream stream, IDictionary <string, IChromosome> refNameToChromosome,
                         IRefMinorProvider refMinorProvider, bool enableVerboseTranscript, IRecomposer recomposer)
        {
            _reader              = new StreamReader(stream);
            _variantFactory      = new VariantFactory(refNameToChromosome, refMinorProvider, enableVerboseTranscript);
            _refNameToChromosome = refNameToChromosome;
            bool hasSampleColumn = ParseHeader();

            _recomposer = hasSampleColumn ? recomposer : new NullRecomposer();
        }
Beispiel #4
0
 private void SetRecomposer(IRecomposer recomposer) => _recomposer = _sampleNames == null ? new NullRecomposer() : recomposer;
Beispiel #5
0
        public static IVcfReader GetVcfReader(string vcfPath, IDictionary <string, IChromosome> chromosomeDictionary,
                                              IRefMinorProvider refMinorProvider, bool verboseTranscript, IRecomposer recomposer)
        {
            var useStdInput = vcfPath == "-";

            var peekStream =
                new PeekStream(useStdInput
                        ? Console.OpenStandardInput()
                        : GZipUtilities.GetAppropriateReadStream(vcfPath));

            return(new VcfReader(peekStream, chromosomeDictionary, refMinorProvider, verboseTranscript, recomposer));
        }