Exemplo n.º 1
0
        public int ProcessQuery(IEnumerable <string> queryStrings, bool printHeader = false)
        {
            _writer.Write("{");
            if (printHeader)
            {
                string headerString = GetHeader();
                _writer.Write(headerString + ",");
            }
            Utilities.PrintQuerySectionOpening(JasixCommons.PositionsSectionTag, _writer);

            var count = 0;

            foreach (string queryString in queryStrings)
            {
                var query = Utilities.ParseQuery(queryString);
                query.Chromosome = _jasixIndex.GetIndexChromName(query.Chromosome);
                if (!_jasixIndex.ContainsChr(query.Chromosome))
                {
                    continue;
                }

                count  = PrintLargeVariantsExtendingIntoQuery(query);
                count += PrintAllVariantsFromQueryBegin(query, count > 0);
            }

            Utilities.PrintQuerySectionClosing(_writer);
            _writer.WriteLine("}");
            return(count);
        }