After some years of inactivity I'm updating BioSmalltalk (a bioinformatics library) for Pharo with the latests changes in NCBI services. One of these services, called QBlast, seems to be no longer accessible :
http://web.archive.org/web/20090125100600/http://www.ncbi.nlm.nih.gov/BLAST/Doc/urlapi.html
Clicking around, I've arrived to this (potentially) alternative service: https://ncbi.github.io/blast-cloud/dev/api.html but it seems to be "DEPRECATED".
Anyway I tried to send a request using the QBlast API, following recommendations in this biopython thread, which would be :
BioNCBIWebBlastWrapper new nucleotide
query: 'CCCCATGCATATAAGCAAGTACATGACCTCTATAGCAGTACATAATACATATAATTATTGACTGTACATAGTACATTATGTCAAATTCATTCTTGATAGTATATCTATTATATATTCCTTACCATTAGATCACGAGCTTAATTACCATGCCGCGTGAAACCAGCAACCCGCTAGGCAGGGATCCCTCTTCTCGCTCCGGGCCCATAAACCGTGGGGGTCGCTATCCAATGAATTTTACCA';
hitListSize: 10;
filterLowComplexity;
expectValue: 10;
wordSize: 10;
blastn;
formatTypeXML;
alignmentViewFlatQueryAnchoredNoIdentities;
fetch.
This translates into:
Fetching a NCBI BLAST request identifier (RID) ex:
20s wait before requesting the results
Fetch results with RID, ex: http://www.ncbi.nlm.nih.gov/blast/Blast.cgi?FORMAT_TYPE=XML&ALIGNMENT_VIEW=FlatQueryAnchoredNoIdentities&RID=JJSUNBA201R
Wait another 120 seconds, check if we have results, if not fetch results again with RID:...
- Otherwise when (my previously working parser) detects that is "finished", I get an HTML (see below) page instead of the requested XML.
Any idea what I should look to update?
This is the first bytes of the HTML page I get so far:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" >
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="robots" content="index,follow" />
<meta name="verify-v1" content="6esrL4Jqlv4/2lbCRFu0SeYW5zrKD7E9U+gmGlKNtro=" />
<META NAME="keywords" CONTENT="blast,basic local alignment search tool,sequence similarity,sequence alignment,sequence homology,bioinformatics" />
<META NAME="description" CONTENT="The Basic Local Alignment Search Tool (BLAST) finds regions of local similarity between sequences. The program compares nucleotide or protein sequences to sequence databases and calculates the statistical significance of matches. BLAST can be used to infer functional and evolutionary relationships between sequences as well as help identify members of gene families." />
<meta name="ncbitoggler" content="animation:'none'"/>
<meta name="referrer" content="origin-when-cross-origin" />
<meta name="ncbi_app" content="blast" />
<meta name="ncbi_pdid" content="blasthome" />
<meta name="ncbi_db" content="" />
<meta name="ncbi_program" content="" />
<meta name="ncbi_algorithm" content="" />
<meta name="ncbi_stat" content="false" />
<meta name="ncbi_sessionid" content="55BA32CE32961071_0000SID" />
<meta name="ncbi_phid" content="55BA32CE329610710000000000000001" />
<meta name="ncbi_pcid" content="" />
<script type="text/javascript"> var ncbi_startTime = new Date(); </script>
<title>BLAST: Basic Local Alignment Search Tool</title>
<script type="text/javascript" src="/core/jig/1.15.2/js/jig.min.js "></script>
<script type="text/javascript"> jQuery.getScript("/core/alerts/alerts.js", function() {
galert(['div#header', 'body > *:nth-child(1)'])
});</script>
<meta http-equiv="Pragma" content="no-cache">
<link rel="stylesheet" type="text/css" href="css/uswds.min.css" media="screen" />
<link rel="stylesheet" type="text/css" href="https://www.ncbi.nlm.nih.gov/style-guide/static/nwds/css/nwds.css"/>
<link rel="stylesheet" href="css/headerNew.css?v=1"/>
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.5.0/css/all.css" crossorigin="anonymous"> <!-- Font Awesome icons -->
<link rel="stylesheet" type="text/css" href="css/footerNew.css?v=1" media="screen" />
<link rel="stylesheet" type="text/css" href="css/home.css" media="screen" />
<link rel="stylesheet" type="text/css" href="css/print.css" media="print" />
<!--[if lte IE 6]>
<link rel="stylesheet" type="text/css" href="css/ie6_or_less.css" />
<![endif]-->
<script type="text/javascript" src="js/utils.js"></script>
<script type="text/javascript" src="js/blast.js"></script>
<script type="text/javascript" src="js/remote_data_provider.js"></script>
<script type="text/javascript" src="js/home.js"></script>
<script type="text/javascript" src="js/blastSurvey.js"></script>
<meta name="google-site-verification" content="DNp69-s7ILfn5FWNLN_xE4zVhpY0dDtLrLyOB_WOzpA" />
</head>
<body id="type-d">
<!--<div id="browsers_ajax"></div>-->
<script>var useOfficialGovtHeader = true;</script>
<section class="usa-banner">
<div class="usa-accordion">
<header class="usa-banner-header">