/// <summary> /// Returns an iterator over a set of SAMAlignedSequences retrieved from a parsed BAM file. /// </summary> /// <param name="parser">Parser</param> /// <param name="filename">Filename</param> /// <returns>IEnumerable SAMAlignedSequence object.</returns> public static IEnumerable <PacBioCCSRead> Parse(this PacBioCCSBamReader parser, string filename) { if (parser == null) { throw new ArgumentNullException("parser"); } if (filename == null) { throw new ArgumentNullException("filename"); } using (var fs = File.OpenRead(filename)) { foreach (var item in PacBioCCSBamReader.Parse(fs)) { yield return(item); } } }
public ISequence ParseOne(Stream stream) { return(PacBioCCSBamReader.Parse(stream).First()); }
IEnumerable <ISequence> IParser <ISequence> .Parse(Stream stream) { return(PacBioCCSBamReader.Parse(stream)); }