public AlignmentSource(IAlignmentExtractor alignmentExtractor, IAlignmentMateFinder mateFinder, AlignmentSourceConfig config) // add intervals { _alignmentExtractor = alignmentExtractor; _mateFinder = mateFinder; _config = config; }
public BamFileAlignmentExtractor(string bamFilePath, string chromosomeFilter = null, Dictionary <string, List <Region> > bamIntervals = null, IAlignmentMateFinder mateFinder = null) { if (!File.Exists(bamFilePath)) { throw new ArgumentException(string.Format("Bam file '{0}' does not exist.", bamFilePath)); } if (!File.Exists(bamFilePath + ".bai")) { throw new ArgumentException(string.Format("Bai file '{0}.bai' does not exist.", bamFilePath)); } _bamFilePath = bamFilePath; _remainingIntervals = bamIntervals == null ? null : Copy(bamIntervals); _mateFinder = mateFinder; InitializeReader(chromosomeFilter); }