ncbi_blast_results_parser 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,135 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
+ <html xmlns="http://www.w3.org/1999/xhtml">
3
+ <head>
4
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
5
+ <meta name="jig" content="ncbitoggler"/>
6
+ <meta name="ncbitoggler" content="animation:'none'"/>
7
+ <title>NCBI Blast:</title>
8
+ <script type="text/javascript" src="http://www.ncbi.nlm.nih.gov/core/jig/1.11/js/jig.min.js"></script>
9
+ <link rel="stylesheet" type="text/css" href="css/main.css" media="screen" />
10
+ <link rel="stylesheet" type="text/css" href="css/blastRes.css" media="screen" />
11
+ <link rel="stylesheet" type="text/css" href="css/print.css" media="print" />
12
+ <!--[if lte IE 6]>
13
+ <link rel="stylesheet" type="text/css" href="css/ie6_or_less.css" />
14
+ <![endif]-->
15
+ <script type="text/javascript" src="js/utils.js"></script>
16
+ <script type="text/javascript" src="js/results.js"></script>
17
+ </head>
18
+
19
+ <body id="type-a" class="noToggleCheck" >
20
+ <div id="wrap">
21
+ <div id="header">
22
+ <div id="site-name"><a id="logolink" href="http://www.ncbi.nlm.nih.gov" title="NCBI Home Page"><img src="css/images/helix.gif" alt="NCBI Logo" title="Link to NCBI Home Page" /></a>BLAST <span id="trdm"> &reg;</span><h1 class="desc">Basic Local Alignment Search Tool</h1>
23
+ </div>
24
+ <div id="search">
25
+
26
+ <div>
27
+ <script language="JavaScript" type="text/javascript"><!--
28
+ // --></script><table class="medium1" style="border:2px solid #336699;" cellpadding="2" cellspacing="0" id="myncbi_off"><tr><td
29
+ bgcolor="#336699" align="left"><a href="http://www.ncbi.nlm.nih.gov/myncbi/?"><font color="#FFFFFF"><b>My NCBI</b></font></a></td><td
30
+ bgcolor="#336699" align="right"><a href="http://www.ncbi.nlm.nih.gov/books/NBK3842/" title="My NCBI help"><img border="0"
31
+ src="http://www.ncbi.nlm.nih.gov/corehtml/query/MyNCBI/myncbihelpicon.gif" alt="My NCBI help" /></a></td></tr><tr><td colspan="2" nowrap="nowrap"><a
32
+ href="http://www.ncbi.nlm.nih.gov/account/?back_url=http%3A%2F%2Fwww%2Encbi%2Enlm%2Enih%2Egov%2Fblast%2FBlast%2Ecgi%3FALIGNMENTS%3D200%26ALIGNMENT%5FTYPE%3DPairwise%26CMD%3DGet%26DESCRIPTIONS%3D100%26FORMAT%5FOBJECT%3DAlignment%26FORMAT%5FTYPE%3DXML%26OLD%5FBLAST%3Dfalse%26OVERVIEW%3Dyes%26RID%3DHZMF5DEN015" title="Click to sign in"
33
+ onclick="MyNCBI_auto_submit('http://www.ncbi.nlm.nih.gov/account/?back_url=http%3A%2F%2Fwww%2Encbi%2Enlm%2Enih%2Egov%2Fblast%2FBlast%2Ecgi%3FALIGNMENTS%3D200%26ALIGNMENT%5FTYPE%3DPairwise%26CMD%3DGet%26DESCRIPTIONS%3D100%26FORMAT%5FOBJECT%3DAlignment%26FORMAT%5FTYPE%3DXML%26OLD%5FBLAST%3Dfalse%26OVERVIEW%3Dyes%26RID%3DHZMF5DEN015');return false;">[Sign In]</a> <a
34
+ href="http://www.ncbi.nlm.nih.gov/account/register/?back_url=http%3A%2F%2Fwww%2Encbi%2Enlm%2Enih%2Egov%2Fblast%2FBlast%2Ecgi%3FALIGNMENTS%3D200%26ALIGNMENT%5FTYPE%3DPairwise%26CMD%3DGet%26DESCRIPTIONS%3D100%26FORMAT%5FOBJECT%3DAlignment%26FORMAT%5FTYPE%3DXML%26OLD%5FBLAST%3Dfalse%26OVERVIEW%3Dyes%26RID%3DHZMF5DEN015" title="Click to register for an account"
35
+ onclick="MyNCBI_auto_submit('http://www.ncbi.nlm.nih.gov/account/register/?back_url=http%3A%2F%2Fwww%2Encbi%2Enlm%2Enih%2Egov%2Fblast%2FBlast%2Ecgi%3FALIGNMENTS%3D200%26ALIGNMENT%5FTYPE%3DPairwise%26CMD%3DGet%26DESCRIPTIONS%3D100%26FORMAT%5FOBJECT%3DAlignment%26FORMAT%5FTYPE%3DXML%26OLD%5FBLAST%3Dfalse%26OVERVIEW%3Dyes%26RID%3DHZMF5DEN015');return false;">[Register]</a></td></tr></table></div>
36
+ </div>
37
+ <a class="skp" href="#content-wrap">Jump to Page Content</a>
38
+ <ul id="nav">
39
+ <li class="first "><a href="Blast.cgi?CMD=Web&amp;PAGE_TYPE=BlastHome" title="BLAST Home">Home</a></li>
40
+ <li class="recent "><a href="Blast.cgi?CMD=GetSaved&amp;RECENT_RESULTS=on" title="Unexpired BLAST jobs">Recent Results</a></li>
41
+ <li class="saved "><a href="Blast.cgi?CMD=GetSaved" title="Saved sets of BLAST search parameters">Saved Strategies</a></li>
42
+ <li class= "last documentation "> <a href="Blast.cgi?CMD=Web&amp;PAGE_TYPE=BlastDocs" title="BLAST documentation">Help</a></li>
43
+ </ul>
44
+ </div>
45
+
46
+ <div id="content-wrap">
47
+
48
+ <div id="breadcrumb" class="inlineDiv">
49
+ <a href="http://www.ncbi.nlm.nih.gov/">NCBI</a>/
50
+ <a href="Blast.cgi?CMD=Web&PAGE_TYPE=BlastHome">BLAST</a>/
51
+ <a href="Blast.cgi?PAGE=Nucleotides&PROGRAM=blastn&BLAST_PROGRAMS=megaBlast&PAGE_TYPE=BlastSearch&SHOW_DEFAULTS=on&BLAST_SPEC=">blastn suite</a>/
52
+ <strong>Formatting Results - HZMF5DEN015</strong>
53
+ </div>
54
+ <div class="inlineDiv resHeader">
55
+ <a id="frmPage" class="WAITING" href="#" submitForm="reformat">[Formatting options] </a>
56
+ </div>
57
+ <h3 id="jtitle" >Job Title: </h3>
58
+
59
+ <div id="content">
60
+ <!--<ul id="msg" class="msg"><li class=""><p class=""></p><p class=""></p><p class=""></p></ul> -->
61
+ <ul id="msg" class="msg"><li class=""></li></ul>
62
+ <p><!--
63
+ QBlastInfoBegin
64
+ Status=UNKNOWN
65
+ QBlastInfoEnd
66
+ --></p>
67
+
68
+ <SCRIPT LANGUAGE="JavaScript"><!--
69
+ var tm = "2000";
70
+ if (tm != "") {
71
+ setTimeout('document.forms[0].submit();',tm);
72
+ }
73
+ //--></SCRIPT>
74
+ <table id="statInfo" class="WAITING">
75
+ <tr><td>Request ID</td><td> <b>HZMF5DEN015</b></td></tr>
76
+ <tr class="odd"><td>Status</td><td>Searching</td></tr>
77
+ <tr><td>Submitted at</td><td>Sat Feb 16 13:37:25 2013</td></tr>
78
+ <tr class="odd"><td>Current time</td><td>Sat Feb 16 13:37:26 2013</td></tr>
79
+ <tr><td>Time since submission</td><td>00:00:01</td></tr>
80
+ </table>
81
+ <p class="WAITING">This page will be automatically updated in <b>2</b> seconds</p>
82
+ <form action="Blast.cgi" enctype="application/x-www-form-urlencoded" method="POST" id="results">
83
+ <input name="ALIGNMENTS" type="hidden" value="200"><input name="ALIGNMENT_TYPE" type="hidden" value="Pairwise"><input name="DESCRIPTIONS" type="hidden" value="100"><input name="FORMAT_OBJECT" type="hidden" value="Alignment"><input name="FORMAT_TYPE" type="hidden" value="XML"><input name="OLD_BLAST" type="hidden" value="false"><input name="OVERVIEW" type="hidden" value="yes"><input name="RID" type="hidden" value="HZMF5DEN015"><input name="SEARCH_DB_STATUS" type="hidden" value="31"><input name="USER_TYPE" type="hidden" value="2"><input name="_PGR" type="hidden" value="0">
84
+ <input name="_PGR" type="hidden" value="0" >
85
+ <input name="CMD" type="hidden" value="Get">
86
+
87
+ </form>
88
+
89
+ </div><!-- /#content -->
90
+ <form action="Blast.cgi" enctype="application/x-www-form-urlencoded" method="post" name="reformat" id="reformat">
91
+ <input name="QUERY_INFO" type="hidden" value="" />
92
+ <input name="ENTREZ_QUERY" type="hidden" value="" />
93
+ <input name="CDD_RID" type="hidden" value="" />
94
+ <input name="CDD_SEARCH_STATE" type="hidden" value="" />
95
+ <input name="RID" type="hidden" value="HZMF5DEN015" />
96
+ <input name="STEP_NUMBER" type="hidden" value="" />
97
+ <input name="CMD" type="hidden" value="Web"/>
98
+ <input NAME="PAGE_TYPE" type="hidden" value="BlastFormatting"/>
99
+
100
+ <!-- TO DO: test all of those changes -->
101
+ <!-- Psi blast params PSI_BLAST_PARAMS - commented- using forms[0] from fromatter> -->
102
+ <!-- Current Formatting options FORMATTING_OPTIONS- commented- using forms[0] from fromatter> -->
103
+ <!-- Current Search options CURR_SAVED_OPTIONS - commented- using forms[0] from fromatter> -->
104
+ </form>
105
+ </div><!-- /#content-wrap -->
106
+
107
+
108
+ <div id="footer">
109
+ <div id="rgs">BLAST is a registered trademark of the National Library of Medicine.</div>
110
+ <p id="orgns">
111
+ <a href="http://www.ncbi.nlm.nih.gov/" title="National Center for Biotechnology Information">NCBI</a> |
112
+ <a href="http://www.nlm.nih.gov/" title="National Library of Medicine">NLM</a> |
113
+ <a href="http://www.nih.gov/" title="National Institutes of Health">NIH</a> |
114
+ <a href="http://www.hhs.gov/" title="US Department of Health and Human Services">DHHS</a>
115
+ </p>
116
+
117
+ <p>
118
+ <a href='http://www.ncbi.nlm.nih.gov/About/disclaimer.html'
119
+ title='NCBI intellectual property statement'>Copyright</a> |
120
+ <a href='http://www.ncbi.nlm.nih.gov/About/disclaimer.html#disclaimer'
121
+ title='About liability, endorsements, external links, pop-up advertisements'>Disclaimer</a> |
122
+ <a href='http://www.nlm.nih.gov/privacy.html'
123
+ title='NLM privacy policy'>Privacy</a> |
124
+ <a href='http://www.ncbi.nlm.nih.gov/About/accessibility.html'
125
+ title='About using NCBI resources with assistive technology'>Accessibility</a> |
126
+ <a href='http://www.ncbi.nlm.nih.gov/About/glance/contact_info.html'
127
+ title='How to get help, submit data, or provide feedback'>Contact</a> |
128
+ <a href='mailto:blast-help@ncbi.nlm.nih.gov'
129
+ title='How to get help, submit data, or provide feedback'>Send feedback</a>
130
+ </p>
131
+ </div>
132
+ </div><!--/#wrap-->
133
+ </body>
134
+
135
+ </html>
@@ -0,0 +1,135 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
+ <html xmlns="http://www.w3.org/1999/xhtml">
3
+ <head>
4
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
5
+ <meta name="jig" content="ncbitoggler"/>
6
+ <meta name="ncbitoggler" content="animation:'none'"/>
7
+ <title>NCBI Blast:</title>
8
+ <script type="text/javascript" src="http://www.ncbi.nlm.nih.gov/core/jig/1.11/js/jig.min.js"></script>
9
+ <link rel="stylesheet" type="text/css" href="css/main.css" media="screen" />
10
+ <link rel="stylesheet" type="text/css" href="css/blastRes.css" media="screen" />
11
+ <link rel="stylesheet" type="text/css" href="css/print.css" media="print" />
12
+ <!--[if lte IE 6]>
13
+ <link rel="stylesheet" type="text/css" href="css/ie6_or_less.css" />
14
+ <![endif]-->
15
+ <script type="text/javascript" src="js/utils.js"></script>
16
+ <script type="text/javascript" src="js/results.js"></script>
17
+ </head>
18
+
19
+ <body id="type-a" class="noToggleCheck" >
20
+ <div id="wrap">
21
+ <div id="header">
22
+ <div id="site-name"><a id="logolink" href="http://www.ncbi.nlm.nih.gov" title="NCBI Home Page"><img src="css/images/helix.gif" alt="NCBI Logo" title="Link to NCBI Home Page" /></a>BLAST <span id="trdm"> &reg;</span><h1 class="desc">Basic Local Alignment Search Tool</h1>
23
+ </div>
24
+ <div id="search">
25
+
26
+ <div>
27
+ <script language="JavaScript" type="text/javascript"><!--
28
+ // --></script><table class="medium1" style="border:2px solid #336699;" cellpadding="2" cellspacing="0" id="myncbi_off"><tr><td
29
+ bgcolor="#336699" align="left"><a href="http://www.ncbi.nlm.nih.gov/myncbi/?"><font color="#FFFFFF"><b>My NCBI</b></font></a></td><td
30
+ bgcolor="#336699" align="right"><a href="http://www.ncbi.nlm.nih.gov/books/NBK3842/" title="My NCBI help"><img border="0"
31
+ src="http://www.ncbi.nlm.nih.gov/corehtml/query/MyNCBI/myncbihelpicon.gif" alt="My NCBI help" /></a></td></tr><tr><td colspan="2" nowrap="nowrap"><a
32
+ href="http://www.ncbi.nlm.nih.gov/account/?back_url=http%3A%2F%2Fwww%2Encbi%2Enlm%2Enih%2Egov%2Fblast%2FBlast%2Ecgi%3FALIGNMENTS%3D200%26ALIGNMENT%5FTYPE%3DPairwise%26CMD%3DGet%26DESCRIPTIONS%3D100%26FORMAT%5FOBJECT%3DAlignment%26FORMAT%5FTYPE%3DXML%26OLD%5FBLAST%3Dfalse%26OVERVIEW%3Dyes%26RID%3DHZMF5DEN015" title="Click to sign in"
33
+ onclick="MyNCBI_auto_submit('http://www.ncbi.nlm.nih.gov/account/?back_url=http%3A%2F%2Fwww%2Encbi%2Enlm%2Enih%2Egov%2Fblast%2FBlast%2Ecgi%3FALIGNMENTS%3D200%26ALIGNMENT%5FTYPE%3DPairwise%26CMD%3DGet%26DESCRIPTIONS%3D100%26FORMAT%5FOBJECT%3DAlignment%26FORMAT%5FTYPE%3DXML%26OLD%5FBLAST%3Dfalse%26OVERVIEW%3Dyes%26RID%3DHZMF5DEN015');return false;">[Sign In]</a> <a
34
+ href="http://www.ncbi.nlm.nih.gov/account/register/?back_url=http%3A%2F%2Fwww%2Encbi%2Enlm%2Enih%2Egov%2Fblast%2FBlast%2Ecgi%3FALIGNMENTS%3D200%26ALIGNMENT%5FTYPE%3DPairwise%26CMD%3DGet%26DESCRIPTIONS%3D100%26FORMAT%5FOBJECT%3DAlignment%26FORMAT%5FTYPE%3DXML%26OLD%5FBLAST%3Dfalse%26OVERVIEW%3Dyes%26RID%3DHZMF5DEN015" title="Click to register for an account"
35
+ onclick="MyNCBI_auto_submit('http://www.ncbi.nlm.nih.gov/account/register/?back_url=http%3A%2F%2Fwww%2Encbi%2Enlm%2Enih%2Egov%2Fblast%2FBlast%2Ecgi%3FALIGNMENTS%3D200%26ALIGNMENT%5FTYPE%3DPairwise%26CMD%3DGet%26DESCRIPTIONS%3D100%26FORMAT%5FOBJECT%3DAlignment%26FORMAT%5FTYPE%3DXML%26OLD%5FBLAST%3Dfalse%26OVERVIEW%3Dyes%26RID%3DHZMF5DEN015');return false;">[Register]</a></td></tr></table></div>
36
+ </div>
37
+ <a class="skp" href="#content-wrap">Jump to Page Content</a>
38
+ <ul id="nav">
39
+ <li class="first "><a href="Blast.cgi?CMD=Web&amp;PAGE_TYPE=BlastHome" title="BLAST Home">Home</a></li>
40
+ <li class="recent "><a href="Blast.cgi?CMD=GetSaved&amp;RECENT_RESULTS=on" title="Unexpired BLAST jobs">Recent Results</a></li>
41
+ <li class="saved "><a href="Blast.cgi?CMD=GetSaved" title="Saved sets of BLAST search parameters">Saved Strategies</a></li>
42
+ <li class= "last documentation "> <a href="Blast.cgi?CMD=Web&amp;PAGE_TYPE=BlastDocs" title="BLAST documentation">Help</a></li>
43
+ </ul>
44
+ </div>
45
+
46
+ <div id="content-wrap">
47
+
48
+ <div id="breadcrumb" class="inlineDiv">
49
+ <a href="http://www.ncbi.nlm.nih.gov/">NCBI</a>/
50
+ <a href="Blast.cgi?CMD=Web&PAGE_TYPE=BlastHome">BLAST</a>/
51
+ <a href="Blast.cgi?PAGE=Nucleotides&PROGRAM=blastn&BLAST_PROGRAMS=megaBlast&PAGE_TYPE=BlastSearch&SHOW_DEFAULTS=on&BLAST_SPEC=">blastn suite</a>/
52
+ <strong>Formatting Results - HZMF5DEN015</strong>
53
+ </div>
54
+ <div class="inlineDiv resHeader">
55
+ <a id="frmPage" class="WAITING" href="#" submitForm="reformat">[Formatting options] </a>
56
+ </div>
57
+ <h3 id="jtitle" >Job Title: </h3>
58
+
59
+ <div id="content">
60
+ <!--<ul id="msg" class="msg"><li class=""><p class=""></p><p class=""></p><p class=""></p></ul> -->
61
+ <ul id="msg" class="msg"><li class=""></li></ul>
62
+ <p><!--
63
+ QBlastInfoBegin
64
+ Status=WAITING
65
+ QBlastInfoEnd
66
+ --></p>
67
+
68
+ <SCRIPT LANGUAGE="JavaScript"><!--
69
+ var tm = "2000";
70
+ if (tm != "") {
71
+ setTimeout('document.forms[0].submit();',tm);
72
+ }
73
+ //--></SCRIPT>
74
+ <table id="statInfo" class="WAITING">
75
+ <tr><td>Request ID</td><td> <b>HZMF5DEN015</b></td></tr>
76
+ <tr class="odd"><td>Status</td><td>Searching</td></tr>
77
+ <tr><td>Submitted at</td><td>Sat Feb 16 13:37:25 2013</td></tr>
78
+ <tr class="odd"><td>Current time</td><td>Sat Feb 16 13:37:26 2013</td></tr>
79
+ <tr><td>Time since submission</td><td>00:00:01</td></tr>
80
+ </table>
81
+ <p class="WAITING">This page will be automatically updated in <b>2</b> seconds</p>
82
+ <form action="Blast.cgi" enctype="application/x-www-form-urlencoded" method="POST" id="results">
83
+ <input name="ALIGNMENTS" type="hidden" value="200"><input name="ALIGNMENT_TYPE" type="hidden" value="Pairwise"><input name="DESCRIPTIONS" type="hidden" value="100"><input name="FORMAT_OBJECT" type="hidden" value="Alignment"><input name="FORMAT_TYPE" type="hidden" value="XML"><input name="OLD_BLAST" type="hidden" value="false"><input name="OVERVIEW" type="hidden" value="yes"><input name="RID" type="hidden" value="HZMF5DEN015"><input name="SEARCH_DB_STATUS" type="hidden" value="31"><input name="USER_TYPE" type="hidden" value="2"><input name="_PGR" type="hidden" value="0">
84
+ <input name="_PGR" type="hidden" value="0" >
85
+ <input name="CMD" type="hidden" value="Get">
86
+
87
+ </form>
88
+
89
+ </div><!-- /#content -->
90
+ <form action="Blast.cgi" enctype="application/x-www-form-urlencoded" method="post" name="reformat" id="reformat">
91
+ <input name="QUERY_INFO" type="hidden" value="" />
92
+ <input name="ENTREZ_QUERY" type="hidden" value="" />
93
+ <input name="CDD_RID" type="hidden" value="" />
94
+ <input name="CDD_SEARCH_STATE" type="hidden" value="" />
95
+ <input name="RID" type="hidden" value="HZMF5DEN015" />
96
+ <input name="STEP_NUMBER" type="hidden" value="" />
97
+ <input name="CMD" type="hidden" value="Web"/>
98
+ <input NAME="PAGE_TYPE" type="hidden" value="BlastFormatting"/>
99
+
100
+ <!-- TO DO: test all of those changes -->
101
+ <!-- Psi blast params PSI_BLAST_PARAMS - commented- using forms[0] from fromatter> -->
102
+ <!-- Current Formatting options FORMATTING_OPTIONS- commented- using forms[0] from fromatter> -->
103
+ <!-- Current Search options CURR_SAVED_OPTIONS - commented- using forms[0] from fromatter> -->
104
+ </form>
105
+ </div><!-- /#content-wrap -->
106
+
107
+
108
+ <div id="footer">
109
+ <div id="rgs">BLAST is a registered trademark of the National Library of Medicine.</div>
110
+ <p id="orgns">
111
+ <a href="http://www.ncbi.nlm.nih.gov/" title="National Center for Biotechnology Information">NCBI</a> |
112
+ <a href="http://www.nlm.nih.gov/" title="National Library of Medicine">NLM</a> |
113
+ <a href="http://www.nih.gov/" title="National Institutes of Health">NIH</a> |
114
+ <a href="http://www.hhs.gov/" title="US Department of Health and Human Services">DHHS</a>
115
+ </p>
116
+
117
+ <p>
118
+ <a href='http://www.ncbi.nlm.nih.gov/About/disclaimer.html'
119
+ title='NCBI intellectual property statement'>Copyright</a> |
120
+ <a href='http://www.ncbi.nlm.nih.gov/About/disclaimer.html#disclaimer'
121
+ title='About liability, endorsements, external links, pop-up advertisements'>Disclaimer</a> |
122
+ <a href='http://www.nlm.nih.gov/privacy.html'
123
+ title='NLM privacy policy'>Privacy</a> |
124
+ <a href='http://www.ncbi.nlm.nih.gov/About/accessibility.html'
125
+ title='About using NCBI resources with assistive technology'>Accessibility</a> |
126
+ <a href='http://www.ncbi.nlm.nih.gov/About/glance/contact_info.html'
127
+ title='How to get help, submit data, or provide feedback'>Contact</a> |
128
+ <a href='mailto:blast-help@ncbi.nlm.nih.gov'
129
+ title='How to get help, submit data, or provide feedback'>Send feedback</a>
130
+ </p>
131
+ </div>
132
+ </div><!--/#wrap-->
133
+ </body>
134
+
135
+ </html>
@@ -0,0 +1,22 @@
1
+ require_relative '../../spec_helper'
2
+
3
+ describe NCBIBlastResultsParser::RIDParser do
4
+
5
+ # Parser Setup
6
+ let(:rid_parser) { NCBIBlastResultsParser::RIDParser.new }
7
+ let(:parser) { Nokogiri::HTML::SAX::Parser.new(rid_parser) }
8
+
9
+ # RID Response
10
+ let(:response) { File.read(File.expand_path('../../fixtures/rid_response.html', File.dirname(__FILE__))) }
11
+
12
+ it 'parses an RID response' do
13
+ parser.parse(response)
14
+ rid_parser.rid.must_equal 'BUCSAKD101R'
15
+ end
16
+
17
+ it 'parses the suggested wait time' do
18
+ parser.parse(response)
19
+ rid_parser.wait.must_equal 17
20
+ end
21
+
22
+ end
@@ -0,0 +1,29 @@
1
+ require_relative '../../spec_helper'
2
+
3
+ describe NCBIBlastResultsParser::StatusParser do
4
+
5
+ # Parser Setup
6
+ let(:status_parser) { NCBIBlastResultsParser::StatusParser.new }
7
+ let(:parser) { Nokogiri::HTML::SAX::Parser.new(status_parser) }
8
+
9
+ # Status Responses
10
+ let(:ready) { File.read(File.expand_path('../../fixtures/ready_response.html', File.dirname(__FILE__))) }
11
+ let(:waiting) { File.read(File.expand_path('../../fixtures/waiting_response.html', File.dirname(__FILE__))) }
12
+ let(:unknown) { File.read(File.expand_path('../../fixtures/unknown_response.html', File.dirname(__FILE__))) }
13
+
14
+ it 'parses a ready response' do
15
+ parser.parse(ready)
16
+ status_parser.status.must_equal 'READY'
17
+ end
18
+
19
+ it 'parses a waiting response' do
20
+ parser.parse(waiting)
21
+ status_parser.status.must_equal 'WAITING'
22
+ end
23
+
24
+ it 'parses an unknown response' do
25
+ parser.parse(unknown)
26
+ status_parser.status.must_equal 'UNKNOWN'
27
+ end
28
+
29
+ end
@@ -0,0 +1,24 @@
1
+ require_relative '../spec_helper'
2
+
3
+ describe NCBIBlastResultsParser do
4
+
5
+ # Parser Setup
6
+ let(:parser) { NCBIBlastResultsParser }
7
+
8
+ # Responses
9
+ let(:rid_response) { File.read(File.expand_path('../fixtures/rid_response.html', File.dirname(__FILE__))) }
10
+ let(:ready_response) { File.read(File.expand_path('../fixtures/ready_response.html', File.dirname(__FILE__))) }
11
+
12
+ it 'parses a request id' do
13
+ parser.rid(rid_response).must_equal 'BUCSAKD101R'
14
+ end
15
+
16
+ it 'parses a suggested wait time' do
17
+ parser.wait(rid_response).must_equal 17
18
+ end
19
+
20
+ it 'parses a status' do
21
+ parser.status(ready_response).must_equal 'READY'
22
+ end
23
+
24
+ end
@@ -0,0 +1,8 @@
1
+ require_relative '../lib/ncbi_blast_results_parser'
2
+
3
+ require 'minitest/autorun'
4
+ require 'turn'
5
+
6
+ Turn.config do |c|
7
+ c.format = :dot
8
+ end
metadata ADDED
@@ -0,0 +1,115 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: ncbi_blast_results_parser
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Gareth Rees
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2013-02-17 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: nokogiri
16
+ requirement: &70334262957880 !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: *70334262957880
25
+ - !ruby/object:Gem::Dependency
26
+ name: minitest
27
+ requirement: &70334259121780 !ruby/object:Gem::Requirement
28
+ none: false
29
+ requirements:
30
+ - - ! '>='
31
+ - !ruby/object:Gem::Version
32
+ version: '0'
33
+ type: :development
34
+ prerelease: false
35
+ version_requirements: *70334259121780
36
+ - !ruby/object:Gem::Dependency
37
+ name: turn
38
+ requirement: &70334264495440 !ruby/object:Gem::Requirement
39
+ none: false
40
+ requirements:
41
+ - - ! '>='
42
+ - !ruby/object:Gem::Version
43
+ version: '0'
44
+ type: :development
45
+ prerelease: false
46
+ version_requirements: *70334264495440
47
+ - !ruby/object:Gem::Dependency
48
+ name: rake
49
+ requirement: &70334264471540 !ruby/object:Gem::Requirement
50
+ none: false
51
+ requirements:
52
+ - - ! '>='
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ type: :development
56
+ prerelease: false
57
+ version_requirements: *70334264471540
58
+ description: Parses useful information from the HTML response of an NCBI Blast
59
+ email:
60
+ - gareth@garethrees.co.uk
61
+ executables: []
62
+ extensions: []
63
+ extra_rdoc_files: []
64
+ files:
65
+ - .gitignore
66
+ - Gemfile
67
+ - LICENCE
68
+ - README.md
69
+ - Rakefile
70
+ - lib/ncbi_blast_results_parser.rb
71
+ - lib/ncbi_blast_results_parser/rid_parser.rb
72
+ - lib/ncbi_blast_results_parser/status_parser.rb
73
+ - lib/ncbi_blast_results_parser/version.rb
74
+ - ncbi_blast_results_parser.gemspec
75
+ - spec/fixtures/ready_response.html
76
+ - spec/fixtures/rid_response.html
77
+ - spec/fixtures/unknown_response.html
78
+ - spec/fixtures/waiting_response.html
79
+ - spec/lib/ncbi_blast_results_parser/rid_parser_spec.rb
80
+ - spec/lib/ncbi_blast_results_parser/status_parser_spec.rb
81
+ - spec/lib/ncbi_blast_results_parser_spec.rb
82
+ - spec/spec_helper.rb
83
+ homepage: ''
84
+ licenses: []
85
+ post_install_message:
86
+ rdoc_options: []
87
+ require_paths:
88
+ - lib
89
+ required_ruby_version: !ruby/object:Gem::Requirement
90
+ none: false
91
+ requirements:
92
+ - - ! '>='
93
+ - !ruby/object:Gem::Version
94
+ version: '0'
95
+ required_rubygems_version: !ruby/object:Gem::Requirement
96
+ none: false
97
+ requirements:
98
+ - - ! '>='
99
+ - !ruby/object:Gem::Version
100
+ version: '0'
101
+ requirements: []
102
+ rubyforge_project:
103
+ rubygems_version: 1.8.15
104
+ signing_key:
105
+ specification_version: 3
106
+ summary: Parses useful information from the HTML response of an NCBI Blast
107
+ test_files:
108
+ - spec/fixtures/ready_response.html
109
+ - spec/fixtures/rid_response.html
110
+ - spec/fixtures/unknown_response.html
111
+ - spec/fixtures/waiting_response.html
112
+ - spec/lib/ncbi_blast_results_parser/rid_parser_spec.rb
113
+ - spec/lib/ncbi_blast_results_parser/status_parser_spec.rb
114
+ - spec/lib/ncbi_blast_results_parser_spec.rb
115
+ - spec/spec_helper.rb