/// <summary>
        /// Gets the blast results from a given job ID.
        /// If the job is not complete, this method will throw an exception.
        /// </summary>
        /// <param name="jobID">Job ID for which the blast results should be fetched.</param>
        /// <returns>List of BlastResult.</returns>
        public static IList<BlastResult> GetBlastResults(string jobID)
        {
            // Create the service provider
            NCBIBlastHandler serviceProvider = new NCBIBlastHandler();

            ConfigParameters configParams = new ConfigParameters();
            configParams.UseBrowserProxy = true;
            serviceProvider.Configuration = configParams;

            // Check the job status
            ServiceRequestInformation info = serviceProvider.GetRequestStatus(jobID);
            if (info.Status != ServiceRequestStatus.Ready)
            {
                throw new InvalidOperationException("Blast search results are not yet ready!");
            }

            // Get the results back and parse it.
            IBlastParser blastXmlParser = new BlastXmlParser();
            return blastXmlParser.Parse(new System.IO.StringReader(serviceProvider.GetResult(jobID, GetBlastSearchParams())));
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Validate general fetching results by passing 
        /// different parameters.
        /// </summary>
        /// <param name="nodeName">xml node name</param>
        /// <param name="NcbiCtorPam">Ncbi constructor different parameters</param>
        void GeneralMethodToValidateResults(string nodeName,
            NcbiWebServiceCtorParameters NcbiCtorPam)
        {
            // Gets the search query parameter and their values.
            string queryParameter = utilityObj.xmlUtil.GetTextValue(
                nodeName, Constants.QuerySequencyparameter);
            string querySequence = utilityObj.xmlUtil.GetTextValue(
                nodeName, Constants.QuerySequency);
            string queryDatabaseValue = utilityObj.xmlUtil.GetTextValue(
                nodeName, Constants.DatabaseValue);
            string queryProgramValue = utilityObj.xmlUtil.GetTextValue(
                nodeName, Constants.ProgramValue);
            string queryDatabaseParameter = utilityObj.xmlUtil.GetTextValue(
                nodeName, Constants.DatabaseParameter);
            string queryProgramParameter = utilityObj.xmlUtil.GetTextValue(
                nodeName, Constants.ProgramParameter);
            string expectedHitId = utilityObj.xmlUtil.GetTextValue(
                nodeName, Constants.HitID);
            string expectedAccession = utilityObj.xmlUtil.GetTextValue(
                nodeName, Constants.HitAccession);

            object responseResults = null;

            NCBIBlastHandler service;
            IBlastParser blastXmlParser = new BlastXmlParser();
            ConfigParameters configParams = new ConfigParameters();
            configParams.UseBrowserProxy = true;

            switch (NcbiCtorPam)
            {
                case NcbiWebServiceCtorParameters.ConfigPams:
                    service = new NCBIBlastHandler(configParams);
                    break;
                case NcbiWebServiceCtorParameters.ParserAndConfigPams:
                    service = new NCBIBlastHandler(blastXmlParser, configParams);
                    break;
                default:
                    service = new NCBIBlastHandler();
                    break;
            }

            ISequence sequence = new Sequence(Utility.GetAlphabet("DNA"), "ATCGCC");
            BlastParameters searchParams = new BlastParameters();

            searchParams.Add(queryParameter, querySequence);
            searchParams.Add(queryDatabaseParameter, queryDatabaseValue);
            searchParams.Add(queryProgramParameter, queryProgramValue);

            // Careate a request without passing sequence.
            string reqId = service.SubmitRequest(sequence, searchParams);

            // validate request identifier.
            Assert.IsNotNull(reqId);

            // submit request identifier and get the status
            ServiceRequestInformation info = service.GetRequestStatus(reqId);
            if (info.Status != ServiceRequestStatus.Waiting
                && info.Status != ServiceRequestStatus.Ready)
            {
                string err = ApplicationLog.WriteLine("Unexpected status: '{0}'", info.Status);
                Assert.Fail(err);
            }

            // get async results, poll until ready
            int maxAttempts = 10;
            int attempt = 1;
            while (attempt <= maxAttempts
                && info.Status != ServiceRequestStatus.Error
                && info.Status != ServiceRequestStatus.Ready)
            {
                Thread.Sleep(info.Status == ServiceRequestStatus.Waiting ? 40000 : 0);
                info = service.GetRequestStatus(reqId);
                ++attempt;
            }

            responseResults = blastXmlParser.Parse(
                    new StringReader(service.GetResult(reqId, searchParams)));

            // Validate blast results.
            Assert.IsNotNull(responseResults);
            List<BlastResult> blastResults = responseResults as List<BlastResult>;
            Assert.IsNotNull(blastResults);
            BlastSearchRecord record = blastResults[0].Records[0];
            Hit hit = null;
            if (record.Hits.Count > 0)
            {
                hit = record.Hits[0];
                Assert.AreEqual(hit.Accession, expectedAccession);
                Assert.AreEqual(hit.Id.ToString((IFormatProvider)null), expectedHitId);

                ApplicationLog.WriteLine(string.Format((IFormatProvider)null, "Blast BVT: Hits count '{0}'.", blastResults.Count));
                ApplicationLog.WriteLine(string.Format((IFormatProvider)null, "Blast BVT: Accession '{0}'.", hit.Accession));
                ApplicationLog.WriteLine(string.Format((IFormatProvider)null, "Blast BVT: Hit Id '{0}'.", hit.Id));
                ApplicationLog.WriteLine(string.Format((IFormatProvider)null, "Blast BVT: Hits Count '{0}'.", hit.Hsps.Count));
            }
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Validate general fetching results.by passing 
        /// differnt parameters.
        /// <param name="nodeName">xml node name.</param>
        /// <param name="expectParameter">expectparameter name</param>
        /// <param name="compositionBasedStaticParameter">compositionBasedStaticParameter name</param>
        /// <param name="isFetchSynchronous">Is Fetch Synchronous?</param>
        /// </summary>
        void ValidateGeneralFetchResults(
            string nodeName, string expectParameter,
            string compositionBasedStaticParameter,
            bool isFetchSynchronous)
        {
            // Gets the search query parameter and their values.
            string queryParameter = utilityObj.xmlUtil.GetTextValue(
                nodeName, Constants.QuerySequencyparameter);
            string querySequence = utilityObj.xmlUtil.GetTextValue(
                nodeName, Constants.QuerySequency);
            string queryDatabaseValue = utilityObj.xmlUtil.GetTextValue(
                nodeName, Constants.DatabaseValue);
            string queryProgramValue = utilityObj.xmlUtil.GetTextValue(
                nodeName, Constants.ProgramValue);
            string queryDatabaseParameter = utilityObj.xmlUtil.GetTextValue(
                nodeName, Constants.DatabaseParameter);
            string queryProgramParameter = utilityObj.xmlUtil.GetTextValue(
                nodeName, Constants.ProgramParameter);
            string optionalExpectParameter = utilityObj.xmlUtil.GetTextValue(
                nodeName, Constants.BlastExpectParameter);
            string optionalExpectValue = utilityObj.xmlUtil.GetTextValue(
                nodeName, Constants.BlastExpectparameterValue);
            string optionalCBSParameter = utilityObj.xmlUtil.GetTextValue(
                nodeName, Constants.BlastCompositionBasedStaticsParameter);
            string optionalCBSParameterValue = utilityObj.xmlUtil.GetTextValue(
                nodeName, Constants.BlastCompositionBasedStaticsValue);
            string expectedHitId = utilityObj.xmlUtil.GetTextValue(
                nodeName, Constants.HitID);
            string expectedAccession = utilityObj.xmlUtil.GetTextValue(
                nodeName, Constants.HitAccession);

            object responseResults = null;

            NCBIBlastHandler service = new NCBIBlastHandler();
            ConfigParameters configParams = new ConfigParameters();
            configParams.UseBrowserProxy = true;
            service.Configuration = configParams;
            ISequence sequence = new Sequence(Alphabets.DNA, "ATCGGGGCCC");
            BlastParameters searchParams = new BlastParameters();

            // Set mandatory parameters only if optional parameters are null
            if ((0 == string.Compare(expectParameter, null, true,
                CultureInfo.CurrentCulture))
                && (0 == string.Compare(compositionBasedStaticParameter, null, true,
                CultureInfo.CurrentCulture)))
            {
                searchParams.Add(queryParameter, querySequence);
                searchParams.Add(queryDatabaseParameter, queryDatabaseValue);
                searchParams.Add(queryProgramParameter, queryProgramValue);
            }
            else
            {
                searchParams.Add(queryParameter, querySequence);
                searchParams.Add(queryDatabaseParameter, queryDatabaseValue);
                searchParams.Add(queryProgramParameter, queryProgramValue);
                searchParams.Add(optionalExpectParameter, optionalExpectValue);
                searchParams.Add(optionalCBSParameter, optionalCBSParameterValue);
            }

            // Careate a request without passing sequence.
            string reqId = service.SubmitRequest(sequence, searchParams);

            // validate request identifier.
            Assert.IsNotNull(reqId);

            // submit request identifier and get the status
            ServiceRequestInformation info = service.GetRequestStatus(reqId);
            if (info.Status != ServiceRequestStatus.Waiting &&
                info.Status != ServiceRequestStatus.Ready)
            {
                string err = ApplicationLog.WriteLine("Unexpected status: '{0}'", info.Status);
                Assert.Fail(err);
            }

            // get async results, poll until ready
            int maxAttempts = 10;
            int attempt = 1;
            while (attempt <= maxAttempts
                && info.Status != ServiceRequestStatus.Error
                && info.Status != ServiceRequestStatus.Ready)
            {
                if (isFetchSynchronous)
                {
                    info = service.GetRequestStatus(reqId);
                    Thread.Sleep(info.Status == ServiceRequestStatus.Waiting
                        || info.Status == ServiceRequestStatus.Queued
                        ? 20000 * attempt : 0);
                }
                else
                {
                    Thread.Sleep(info.Status == ServiceRequestStatus.Waiting ? 30000 : 0);
                    info = service.GetRequestStatus(reqId);
                }
                ++attempt;
            }

            IBlastParser blastXmlParser = new BlastXmlParser();
            responseResults = blastXmlParser.Parse(
                new StringReader(service.GetResult(reqId, searchParams)));

            // Validate blast results.
            Assert.IsNotNull(responseResults);
            List<BlastResult> blastResults = responseResults as List<BlastResult>;
            Assert.IsNotNull(blastResults);
            BlastSearchRecord record = blastResults[0].Records[0];
            if (record.Hits.Count > 0)
            {
                Hit hit = record.Hits[0];
                Assert.AreEqual(hit.Accession, expectedAccession);
                Assert.AreEqual(hit.Id.ToString((IFormatProvider)null), expectedHitId);
                ApplicationLog.WriteLine(string.Format((IFormatProvider)null,
                    "Blast BVT: Hits count '{0}'.", blastResults.Count));
                ApplicationLog.WriteLine(string.Format((IFormatProvider)null,
                    "Blast BVT: Accession '{0}'.", hit.Accession));
                ApplicationLog.WriteLine(string.Format((IFormatProvider)null, "Blast BVT: Hit Id '{0}'.", hit.Id));
                ApplicationLog.WriteLine(string.Format((IFormatProvider)null,
                    "Blast BVT: Hits Count '{0}'.", hit.Hsps.Count));
            }
            // Validate the results Synchronously with the results got earlier.
            if (isFetchSynchronous)
            {
                IList<BlastResult> syncBlastResults =
                    service.FetchResultsSync(reqId, searchParams) as List<BlastResult>;
                Assert.IsNotNull(syncBlastResults);
                if (null != blastResults[0].Records[0].Hits
                    && 0 < blastResults[0].Records[0].Hits.Count
                    && null != blastResults[0].Records[0].Hits[0].Hsps
                    && 0 < blastResults[0].Records[0].Hits[0].Hsps.Count)
                {
                    Assert.AreEqual(blastResults[0].Records[0].Hits[0].Hsps[0].QuerySequence,
                        syncBlastResults[0].Records[0].Hits[0].Hsps[0].QuerySequence);
                }
                else
                {
                    ApplicationLog.WriteLine("No significant hits found with the these parameters.");
                }
            }
        }
Ejemplo n.º 4
0
        /// <summary>
        /// Validate general Parse() method by passing 
        /// differnt XML node name
        /// <param name="nodeName">xml node name.</param>
        /// <param name="textReader">true to validate Parse(text-reader)
        /// method else parse(file-name)</param>
        /// </summary>
        void ValidateParseXmlGeneralTestCases(string nodeName, bool textReader)
        {
            // Gets the Blast Xml file 
            string blastFilePath = utilityObj.xmlUtil.GetTextValue(
                nodeName, Constants.BlastResultfilePath);
            string expectedBitScore = utilityObj.xmlUtil.GetTextValue(
                nodeName, Constants.BitScore);
            string expectedDatabselength = utilityObj.xmlUtil.GetTextValue(
                nodeName, Constants.DatabaseLength);
            string expectedParameterMatrix = utilityObj.xmlUtil.GetTextValue(
                nodeName, Constants.ParameterMatrix);
            string expectedGapCost = utilityObj.xmlUtil.GetTextValue(
                nodeName, Constants.ParameterGap);
            string expectedHitSequence = utilityObj.xmlUtil.GetTextValue(
                nodeName, Constants.HitSequence);
            string expectedAccession = utilityObj.xmlUtil.GetTextValue(
                nodeName, Constants.HitAccession);
            string expectedAlignmentLength = utilityObj.xmlUtil.GetTextValue(
                nodeName, Constants.AlignmentLength);
            string expectedResultCount = utilityObj.xmlUtil.GetTextValue(
                nodeName, Constants.ResultsCount);
            string expectedHitsCount = utilityObj.xmlUtil.GetTextValue(
                nodeName, Constants.HitsCount);

            // Validate if Xml file exists in the mentioned path.
            Assert.IsTrue(File.Exists(blastFilePath));

            // Logs information to the log file
            ApplicationLog.WriteLine(string.Format((IFormatProvider)null,
                "Blast P1: File Exists in the Path '{0}'.", blastFilePath));

            // Parse a Blast xml file.
            BlastXmlParser parser = new BlastXmlParser();
            IList<BlastResult> blastResults = null;

            if (textReader)
            {
                using (StreamReader reader = File.OpenText(blastFilePath))
                {
                    blastResults = parser.Parse(reader);
                }
            }
            else
            {
                blastResults = parser.Parse(blastFilePath);
            }

            blastResults = parser.Parse(blastFilePath);

            // Validate Meta data 
            BlastXmlMetadata meta = blastResults[0].Metadata;

            Assert.AreEqual(meta.ParameterGapOpen.ToString((IFormatProvider)null),
                expectedGapCost);
            Assert.AreEqual(meta.ParameterMatrix.ToString((IFormatProvider)null),
                expectedParameterMatrix);

            // Validate blast records.
            BlastSearchRecord record = blastResults[4].Records[0];

            Assert.AreEqual(expectedResultCount,
                blastResults.Count.ToString((IFormatProvider)null));
            Assert.AreEqual(expectedDatabselength,
                record.Statistics.DatabaseLength.ToString((IFormatProvider)null));
            Assert.AreEqual(expectedHitsCount,
                record.Hits.Count.ToString((IFormatProvider)null));
            Assert.AreEqual(expectedAccession,
                record.Hits[0].Accession.ToString((IFormatProvider)null));
            Assert.AreEqual(expectedHitsCount,
                record.Hits[0].Hsps.Count.ToString((IFormatProvider)null));

            // Validate bit score.
            Hsp highScoreSgment = record.Hits[0].Hsps[0];
            Assert.AreEqual(expectedAlignmentLength,
                highScoreSgment.AlignmentLength.ToString((IFormatProvider)null));
            Assert.AreEqual(expectedBitScore, highScoreSgment.BitScore.ToString((
                IFormatProvider)null));
            Assert.AreEqual(expectedHitSequence, highScoreSgment.HitSequence.ToString(
                (IFormatProvider)null));

            // Log results to VSTest GUI.
            ApplicationLog.WriteLine(string.Format((IFormatProvider)null, "Blast P1: Bit Sequence '{0}'.",
                highScoreSgment.HitSequence.ToString()));
            ApplicationLog.WriteLine(string.Format((IFormatProvider)null, "Blast P1: Bit Score '{0}'.",
                highScoreSgment.BitScore));
            ApplicationLog.WriteLine(string.Format((IFormatProvider)null, "Blast P1: Bit Alignment '{0}'.",
                highScoreSgment.AlignmentLength));
            ApplicationLog.WriteLine(string.Format((IFormatProvider)null, "Blast P1: Hits Count '{0}'.",
                record.Hits[0].Hsps.Count));
            ApplicationLog.WriteLine(string.Format((IFormatProvider)null, "Blast P1: Results Count '{0}'.",
                blastResults.Count));
        }
Ejemplo n.º 5
0
        /// <summary>
        /// Validate general fetching results.by passing 
        /// differnt parameters for BioHPC Blast web service.
        /// <param name="nodeName">xml node name.</param>
        /// <param name="isFetchSynchronous">Is Fetch Synchronous?</param>
        /// </summary>
        void ValidateBioHPCBlastResultsFetch(
            string nodeName, bool isFetchSynchronous)
        {
            // Gets the search query parameter and their values.
            string alphabetName = utilityObj.xmlUtil.GetTextValue(
                nodeName, Constants.AlphabetNameNode);
            string querySequence = utilityObj.xmlUtil.GetTextValue(
                nodeName, Constants.QuerySequency);
            string queryDatabaseValue = utilityObj.xmlUtil.GetTextValue(
                nodeName, Constants.DatabaseValue);
            string email = utilityObj.xmlUtil.GetTextValue(
                nodeName, Constants.EmailAdress);
            string queryProgramValue = utilityObj.xmlUtil.GetTextValue(
                nodeName,
                Constants.ProgramValue);
            string queryDatabaseParameter = utilityObj.xmlUtil.GetTextValue(
                nodeName, Constants.DatabaseParameter);
            string queryProgramParameter = utilityObj.xmlUtil.GetTextValue(
                nodeName, Constants.ProgramParameter);
            string expectedHitId = utilityObj.xmlUtil.GetTextValue(
                nodeName, Constants.HitID);
            string expectedAccession = utilityObj.xmlUtil.GetTextValue(
                nodeName, Constants.HitAccession);
            string expectedResultCount = utilityObj.xmlUtil.GetTextValue(
                nodeName, Constants.ResultsCount);
            string expectedHitsCount = utilityObj.xmlUtil.GetTextValue(
                nodeName, Constants.HitsCount);
            string expectedEntropyStatistics =
                utilityObj.xmlUtil.GetTextValue(
                nodeName, Constants.EntropyStatistics);
            string expectedKappaStatistics = utilityObj.xmlUtil.GetTextValue(
                nodeName, Constants.KappaStatistics);
            string expectedLambdaStatistics = utilityObj.xmlUtil.GetTextValue(
                nodeName, Constants.LambdaStatistics);
            string expectedLength = utilityObj.xmlUtil.GetTextValue(
                nodeName, Constants.Length);
            int maxAttempts = int.Parse(utilityObj.xmlUtil.GetTextValue(
                nodeName, Constants.MaxAttemptsNode), (IFormatProvider)null);
            int waitingTime = int.Parse(utilityObj.xmlUtil.GetTextValue(
                nodeName, Constants.WaitTimeNode), (IFormatProvider)null);
            string expect = utilityObj.xmlUtil.GetTextValue(
                nodeName, Constants.Expectparameter);
            string emailNotify = utilityObj.xmlUtil.GetTextValue(
                nodeName, Constants.EmailNotifyParameterNode);
            string jobName = utilityObj.xmlUtil.GetTextValue(
                nodeName, Constants.JobNameParameterNode);
            string expectValue = utilityObj.xmlUtil.GetTextValue(
                nodeName, Constants.ExpectNode);
            string emailNotifyValue = utilityObj.xmlUtil.GetTextValue(
                nodeName, Constants.EmailNotifyNode);
            string jobNameValue = utilityObj.xmlUtil.GetTextValue(
                nodeName, Constants.JobNameNode);

            object responseResults = null;
            Sequence seq = new Sequence(
                Utility.GetAlphabet(alphabetName),
                querySequence);

            // create BioHPC Blast Web Service object.
            IBlastServiceHandler service = new BioHPCBlastHandler();
            ConfigParameters configPams = new ConfigParameters();
            configPams.EmailAddress = email;
            configPams.Password = String.Empty;
            configPams.UseBrowserProxy = true;
            service.Configuration = configPams;

            BlastParameters searchParams = new BlastParameters();

            // Set Request parameters.
            searchParams.Add(queryDatabaseParameter, queryDatabaseValue);
            searchParams.Add(queryProgramParameter, queryProgramValue);
            searchParams.Add(expect, expectValue);
            searchParams.Add(emailNotify, emailNotifyValue);
            searchParams.Add(jobName, jobNameValue);

            // Create a request without passing sequence.
            string reqId = service.SubmitRequest(seq, searchParams);

            // validate request identifier.
            Assert.IsNotNull(reqId);

            ServiceRequestInformation info = service.GetRequestStatus(reqId);
            if (info.Status != ServiceRequestStatus.Waiting
                && info.Status != ServiceRequestStatus.Ready
                && info.Status != ServiceRequestStatus.Queued)
            {
                string err =
                    ApplicationLog.WriteLine("Unexpected status: '{0}'",
                    info.Status);
                Assert.Fail(err);
            }

            // get async results, poll until ready
            int attempt = 1;
            while (attempt <= maxAttempts
                    && info.Status != ServiceRequestStatus.Error
                    && info.Status != ServiceRequestStatus.Ready)
            {
                ++attempt;
                if (isFetchSynchronous)
                {
                    info = service.GetRequestStatus(reqId);
                    Thread.Sleep(
                        info.Status == ServiceRequestStatus.Waiting
                        || info.Status == ServiceRequestStatus.Queued
                        ? waitingTime * attempt : 0);
                }
                else
                {
                    Thread.Sleep(
                        info.Status == ServiceRequestStatus.Waiting
                        || info.Status == ServiceRequestStatus.Queued ?
                        waitingTime * attempt : 0);
                    info = service.GetRequestStatus(reqId);
                }

            }

            IBlastParser blastXmlParser = new BlastXmlParser();
            responseResults = blastXmlParser.Parse(
                    new StringReader(service.GetResult(reqId, searchParams)));


            Assert.IsNotNull(responseResults);
            List<BlastResult> eBlastResults =
                responseResults as List<BlastResult>;
            Assert.IsNotNull(eBlastResults);
            Assert.AreEqual(eBlastResults.Count.ToString(
                (IFormatProvider)null), expectedResultCount);
            Assert.AreEqual(eBlastResults[0].Records.Count.ToString((
                IFormatProvider)null), expectedResultCount);
            BlastSearchRecord record = eBlastResults[0].Records[0];
            Assert.AreEqual(record.Statistics.Kappa.ToString(
                (IFormatProvider)null), expectedKappaStatistics);
            Assert.AreEqual(record.Statistics.Lambda.ToString(
                (IFormatProvider)null), expectedLambdaStatistics);
            Assert.AreEqual(record.Statistics.Entropy.ToString(
                (IFormatProvider)null), expectedEntropyStatistics);
            Assert.AreEqual(record.Hits.Count.ToString(
                (IFormatProvider)null), expectedHitsCount);
            Hit hit = record.Hits[0];
            Assert.AreEqual(hit.Accession, expectedAccession);
            Assert.AreEqual(hit.Length.ToString((IFormatProvider)null),
                expectedLength);
            Assert.AreEqual(hit.Id.ToString((IFormatProvider)null),
                expectedHitId);
            Assert.AreEqual(hit.Hsps.Count.ToString((IFormatProvider)null),
                expectedResultCount);
            Console.WriteLine(string.Format((IFormatProvider)null,
               "BioHPC Blast BVT : Hits count '{0}'.", eBlastResults.Count));
            Console.WriteLine(string.Format((IFormatProvider)null,
                "BioHPC Blast BVT : Accession '{0}'.", hit.Accession));
            Console.WriteLine(string.Format((IFormatProvider)null,
                "BioHPC Blast BVT : Hit Id '{0}'.", hit.Id));
            Console.WriteLine(string.Format((IFormatProvider)null,
                "BioHPC Blast BVT : Hits Count '{0}'.", hit.Hsps.Count));
            // Validate the results Synchronously with the results got earlier.
            if (isFetchSynchronous)
            {
                IList<BlastResult> syncBlastResults =
                    service.FetchResultsSync(reqId, searchParams) as List<BlastResult>;
                Assert.IsNotNull(syncBlastResults);
                if (null != eBlastResults[0].Records[0].Hits
                    && 0 < eBlastResults[0].Records[0].Hits.Count
                    && null != eBlastResults[0].Records[0].Hits[0].Hsps
                    && 0 < eBlastResults[0].Records[0].Hits[0].Hsps.Count)
                {
                    Assert.AreEqual(
                        eBlastResults[0].Records[0].Hits[0].Hsps[0].QuerySequence,
                        syncBlastResults[0].Records[0].Hits[0].Hsps[0].QuerySequence);
                }
                else
                {
                    ApplicationLog.WriteLine(
                        "No significant hits found with the these parameters.");
                    Console.WriteLine(
                        "No significant hits found with the these parameters.");
                }
            }
        }