Пример #1
0
        /// <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);
                }
            }
        }
Пример #2
0
 public ISequence ParseOne(Stream stream)
 {
     return(PacBioCCSBamReader.Parse(stream).First());
 }
Пример #3
0
 IEnumerable <ISequence> IParser <ISequence> .Parse(Stream stream)
 {
     return(PacBioCCSBamReader.Parse(stream));
 }