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); }
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); }
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(); }
private void SetRecomposer(IRecomposer recomposer) => _recomposer = _sampleNames == null ? new NullRecomposer() : recomposer;
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)); }