Esempio n. 1
0
 /// <summary>
 /// Parses the sequences from the given filename.
 /// </summary>
 /// <param name="parser">Sequence Parser</param>
 /// <param name="fileName">Filename to open/close</param>
 /// <returns>Set of parsed sequences.</returns>
 public static IEnumerable <WiggleAnnotation> Parse(this WiggleParser parser, string fileName)
 {
     using (FileStream fs = File.OpenRead(fileName))
     {
         foreach (var item in parser.Parse(fs))
         {
             yield return(item);
         }
     }
 }
Esempio n. 2
0
        /// <summary>
        /// Parses the sequences from the open file.
        /// </summary>
        /// <param name="parser">Sequence Parser</param>
        /// <returns>Set of parsed sequences.</returns>
        public static IEnumerable <WiggleAnnotation> Parse(this WiggleParser parser)
        {
            var fs = ParserFormatterExtensions <WiggleParser> .GetOpenStream(parser, false);

            if (fs != null)
            {
                foreach (var item in parser.Parse(fs))
                {
                    yield return(item);
                }
            }
        }