protk 1.3.1.pre3 → 1.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (44) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +21 -19
  3. data/bin/add_retention_times.rb +1 -1
  4. data/bin/interprophet.rb +16 -5
  5. data/bin/make_decoy.rb +1 -1
  6. data/bin/manage_db.rb +1 -1
  7. data/bin/mascot_search.rb +2 -2
  8. data/bin/mascot_to_pepxml.rb +1 -1
  9. data/bin/msgfplus_search.rb +26 -9
  10. data/bin/omssa_search.rb +1 -1
  11. data/bin/peptide_prophet.rb +57 -20
  12. data/bin/pepxml_to_table.rb +15 -2
  13. data/bin/protein_prophet.rb +41 -1
  14. data/bin/protk_setup.rb +2 -2
  15. data/bin/protxml_to_gff.rb +50 -42
  16. data/bin/protxml_to_psql.rb +1 -1
  17. data/bin/protxml_to_table.rb +16 -3
  18. data/bin/repair_run_summary.rb +1 -1
  19. data/bin/sixframe.rb +2 -2
  20. data/bin/swissprot_to_table.rb +1 -1
  21. data/bin/tandem_search.rb +1 -1
  22. data/bin/tandem_to_pepxml.rb +1 -1
  23. data/lib/protk/constants.rb +2 -1
  24. data/lib/protk/convert_util.rb +1 -1
  25. data/lib/protk/data/tandem-style.css +349 -0
  26. data/lib/protk/data/tandem-style.xsl +264 -0
  27. data/lib/protk/data/tandem_gpm_defaults.xml +3 -3
  28. data/lib/protk/data/tandem_isb_kscore_defaults.xml +2 -0
  29. data/lib/protk/data/tandem_isb_native_defaults.xml +3 -0
  30. data/lib/protk/data/tandem_params.xml +0 -8
  31. data/lib/protk/fastadb.rb +1 -1
  32. data/lib/protk/galaxy_stager.rb +14 -3
  33. data/lib/protk/galaxy_util.rb +39 -31
  34. data/lib/protk/gffdb.rb +6 -1
  35. data/lib/protk/manage_db_rakefile.rake +1 -1
  36. data/lib/protk/manage_db_tool.rb +1 -1
  37. data/lib/protk/pepxml.rb +159 -7
  38. data/lib/protk/plasmodb.rb +1 -1
  39. data/lib/protk/prophet_tool.rb +20 -52
  40. data/lib/protk/setup_rakefile.rake +18 -11
  41. data/lib/protk/tandem_search_tool.rb +20 -7
  42. data/lib/protk/tool.rb +1 -1
  43. data/lib/protk/uniprot_mapper.rb +1 -1
  44. metadata +10 -14
@@ -0,0 +1,264 @@
1
+ <?xml version="1.0" encoding="ISO-8859-1"?>
2
+ <xsl:stylesheet version="1.0"
3
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
4
+ xmlns:GAML="http://www.bioml.com/gaml/" >
5
+ <!--
6
+ X! tandem default style sheet
7
+ Copyright (C) 2003-2004 Ronald C. Beavis
8
+ Version 2004.03.01
9
+ All Rights Reserved
10
+ This source code is distributed under the terms of the
11
+ Artistic License.
12
+ -->
13
+ <xsl:template match="/">
14
+ <html>
15
+ <head>
16
+ <title>thegpm site 000 <xsl:value-of select="/bioml/@label" /></title>
17
+ <link rel="stylesheet" href="/tandem/tandem-style.css" />
18
+ <SCRIPT lanuage="JavaScript">
19
+
20
+ function changeState(id)
21
+ {
22
+ var block = document.getElementById(id);
23
+ if(block.style.display == 'none') {
24
+ block.style.display = 'block';
25
+ }
26
+ else {
27
+ block.style.display = 'none';
28
+ }
29
+ }
30
+ </SCRIPT>
31
+ </head>
32
+
33
+ <body bgcolor="#FFFFFF">
34
+ <TABLE bgcolor="#d0d0d0" CELLSPACING="2" CELLPADDING="2">
35
+ <TR>
36
+ <TD WIDTH="700" VALIGN="TOP" ALIGN="LEFT" class="top_note">X! tandem results</TD>
37
+ </TR>
38
+ <TR>
39
+ <TD WIDTH="700" VALIGN="TOP" ALIGN="LEFT" class="top_note"><B><xsl:value-of select="/bioml/@label" /></B></TD>
40
+ </TR>
41
+ </TABLE>
42
+ <BR></BR>
43
+ <table border="1" bgcolor="#d0ffd0" cellpadding="2" cellspacing="2">
44
+ <xsl:apply-templates select="/bioml/group" />
45
+ </table>
46
+ <xsl:if test="not(/bioml/group)">
47
+ <TABLE CELLSPACING="2" CELLPADDING="2">
48
+ <TR>
49
+ <TD WIDTH="700" VALIGN="TOP" ALIGN="LEFT">No models were provided.</TD>
50
+ </TR>
51
+ </TABLE>
52
+
53
+ </xsl:if>
54
+ </body>
55
+ </html>
56
+ </xsl:template>
57
+
58
+ <xsl:template match="group">
59
+ <xsl:if test="not(contains(@label,'parameters'))">
60
+ <tr><td>
61
+ <DIV onClick="changeState('{generate-id()}');" class="e" title="click to see/hide sequences and evidence">
62
+ <SPAN CLASS="top_label">
63
+ #<xsl:value-of select="@id" />,
64
+ e = <xsl:value-of select="@expect" />,
65
+ M+H = <sup><xsl:value-of select="@z" /></sup><xsl:value-of select="@mh" />
66
+ <sup><xsl:value-of select="./protein/peptide/domain/@delta" /></sup>,
67
+ <SPAN class="aa_s"><xsl:value-of select="./protein/peptide/domain/@pre" /></SPAN>
68
+ <SUP><xsl:value-of select="./protein/peptide/domain/@start" /></SUP>
69
+ <SPAN class="aa_h"><xsl:value-of select="./protein/peptide/domain/@seq" /></SPAN>
70
+ <SUP><xsl:value-of select="./protein/peptide/domain/@end" /></SUP>
71
+ <SPAN class="aa_s"><xsl:value-of select="./protein/peptide/domain/@post" /></SPAN>,
72
+ <xsl:for-each select="./protein[1]/peptide[1]/domain[1]/aa">
73
+
74
+ <SUP><xsl:value-of select="@at" /></SUP><xsl:value-of select="@type" />(<xsl:value-of select="@modified" />),
75
+
76
+ </xsl:for-each>
77
+ </SPAN><BR></BR>
78
+ <SPAN CLASS="top_note">
79
+ <span class="b"> log(E) = <xsl:value-of select="./protein/@expect" /></span>,
80
+ <xsl:value-of select="@label" />
81
+ </SPAN>
82
+ </DIV>
83
+
84
+ <DIV id="{generate-id()}" STYLE="display:none" class="k">
85
+ <TABLE border="1" bgcolor="#ffd0ff" CELLPADDING="1" CELLSPACING="1">
86
+ <xsl:apply-templates select="protein" mode="sequence"/>
87
+ </TABLE>
88
+ <xsl:apply-templates select="group" mode="support"/>
89
+ </DIV>
90
+ </td></tr>
91
+ </xsl:if>
92
+
93
+ <xsl:if test="contains(@label,'parameters')">
94
+ <DIV onClick="changeState('{generate-id()}');" title="click to see/hide values" class="e">
95
+ <SPAN CLASS="top_label">+ <xsl:value-of select="@label" />
96
+ </SPAN>
97
+ </DIV>
98
+ <DIV id="{generate-id()}" class="k" STYLE="display:none">
99
+ <BR></BR>
100
+ <TABLE border="0" bgcolor="#ffd0d0" CELLPADDING="1" CELLSPACING="1">
101
+ <SPAN CLASS="top_note"><xsl:apply-templates select="note" />
102
+ </SPAN>
103
+ </TABLE>
104
+ <HR></HR>
105
+ </DIV>
106
+ </xsl:if>
107
+ </xsl:template>
108
+
109
+ <xsl:template match="protein" mode="description">
110
+ <BR></BR><SPAN CLASS="top_note"><B><xsl:value-of select="@id" /></B> : </SPAN><PRE><xsl:apply-templates select="note" /></PRE>
111
+ </xsl:template>
112
+
113
+ <xsl:template match="protein" mode="sequence">
114
+ <tr><td>
115
+ <DIV onClick="changeState('{generate-id()}');" title="click to see/hide details">
116
+ <SPAN CLASS="top_label"><xsl:value-of select="@id" />: <xsl:value-of select="@label" />
117
+ <xsl:apply-templates select="file" /></SPAN>
118
+ </DIV>
119
+ <DIV id="{generate-id()}" class="k" STYLE="display:none">
120
+ <xsl:apply-templates select="peptide" />
121
+ </DIV>
122
+ </td></tr>
123
+ </xsl:template>
124
+
125
+ <xsl:template match="file">
126
+ <SPAN class="top_label">(<xsl:value-of select="@URL" />)</SPAN>
127
+ </xsl:template>
128
+
129
+ <xsl:template match="aa">
130
+ <SPAN class="top_note"><SUP><xsl:value-of select="@at" /></SUP><xsl:value-of select="@type" />(<xsl:value-of select="@modified" />),</SPAN>
131
+ </xsl:template>
132
+
133
+ <xsl:template match="GAML:attribute">
134
+ <SPAN class="small_label"><xsl:value-of select="@type" /> = <xsl:value-of select="text()" />, </SPAN>
135
+ </xsl:template>
136
+
137
+ <xsl:template match="GAML:trace">
138
+
139
+ <SPAN class="small_label">
140
+ <B>
141
+ <xsl:value-of select="@type" />
142
+ </B>
143
+ </SPAN>
144
+ <TABLE BORDER="0" bgcolor="#ffffd0" CELLPADDING="1" CELLSPACING="1">
145
+ <xsl:if test="GAML:attribute">
146
+ <TR>
147
+ <TD WIDTH="500" VALIGN="TOP" ALIGN="LEFT">
148
+ parameters: <xsl:apply-templates select="GAML:attribute" />
149
+ </TD>
150
+ </TR>
151
+ </xsl:if>
152
+ <TR>
153
+ <TD WIDTH="500" VALIGN="TOP" ALIGN="LEFT">
154
+ x-values
155
+ </TD>
156
+ </TR>
157
+ <TR>
158
+ <TD WIDTH="500" VALIGN="TOP" ALIGN="LEFT">
159
+ <xsl:value-of select="./GAML:Xdata/GAML:values/text()" />
160
+ </TD>
161
+ </TR>
162
+ <TR>
163
+ <TD WIDTH="500" VALIGN="TOP" ALIGN="LEFT">
164
+ y-values
165
+ </TD>
166
+ </TR>
167
+ <TR>
168
+ <TD WIDTH="500" VALIGN="TOP" ALIGN="LEFT">
169
+ <xsl:value-of select="./GAML:Ydata/GAML:values/text()" />
170
+ </TD>
171
+ </TR>
172
+ </TABLE>
173
+ </xsl:template>
174
+
175
+ <xsl:template match="group" mode="support">
176
+ <xsl:if test="@type='support'">
177
+ <DIV onClick="changeState('{generate-id()}');" class="e" title="click to see/hide evidence">
178
+ <SPAN CLASS="top_label">
179
+ <xsl:value-of select="@label" />
180
+ </SPAN></DIV>
181
+ <DIV id="{generate-id()}" STYLE="display:none" class="k">
182
+ <xsl:apply-templates select="GAML:trace" />
183
+ </DIV>
184
+ </xsl:if>
185
+ </xsl:template>
186
+
187
+
188
+
189
+ <xsl:template match="peptide">
190
+ <xsl:apply-templates select="domain" />
191
+ <DIV onClick="changeState('{generate-id()}');" class="e" title="click to see/hide sequence">
192
+ <SPAN class="top_label">
193
+ log(e) = <xsl:value-of select="./../@expect" />,
194
+ <xsl:value-of select="./../@label" />
195
+ </SPAN>
196
+ </DIV>
197
+ <DIV id="{generate-id()}" STYLE="display:none">
198
+ <TABLE BORDER="0" gbcolor="#d0d0ff">
199
+ <TR>
200
+ <TD WIDTH="500" ALIGN="LEFT" VALIGN="TOP" CLASS="residues"><xsl:value-of select="text()" />
201
+ </TD>
202
+ </TR>
203
+ </TABLE>
204
+ </DIV>
205
+ </xsl:template>
206
+
207
+ <xsl:template match="domain">
208
+ <SPAN CLASS="top_note">
209
+ <B><xsl:value-of select="@id" /></B>:
210
+ e = <xsl:value-of select="@expect" />,
211
+ <SUP><xsl:value-of select="@start" /></SUP><SPAN class="aa_h"><xsl:value-of select="@seq" /></SPAN><SUP><xsl:value-of select="@end" /></SUP>,
212
+ <xsl:apply-templates select="aa"/><BR></BR>
213
+ M+H = <xsl:value-of select="@mh" /> Da,
214
+ <SPAN CLASS="greek">d</SPAN> = <xsl:value-of select="@delta" />,
215
+ !score = <xsl:value-of select="@hyperscore" />,
216
+ y/b: scores = <xsl:value-of select="@y_score" />/<xsl:value-of select="@b_score" />,
217
+ ions = <xsl:value-of select="@y_ions" />/<xsl:value-of select="@b_ions" />
218
+ </SPAN>
219
+ <BR></BR>
220
+ </xsl:template>
221
+
222
+ <xsl:template match="note">
223
+ <xsl:if test="not(contains(@label,'description'))">
224
+ <TR>
225
+ <TD WIDTH="350" ALIGN="RIGHT"><xsl:value-of select="@label" /> = </TD>
226
+ <TD WIDTH="350" ALIGN="LEFT"><xsl:value-of select="text()" /></TD>
227
+ </TR>
228
+ </xsl:if>
229
+ <xsl:if test="contains(@label,'description')">
230
+ <SPAN CLASS="top_note">
231
+ <xsl:choose>
232
+ <xsl:when test="contains(self::note,'ENSMUSP')">
233
+ <a target="_BLANK">
234
+ <xsl:attribute name="href">http://www.ensembl.org/Mus_musculus/protview?peptide=<xsl:value-of select="text()"/></xsl:attribute>
235
+ <xsl:attribute name="title">View Ensembl Protein Report</xsl:attribute>
236
+ <span class="ensembl"><xsl:value-of select="text()" /></span>
237
+ </a>
238
+ </xsl:when>
239
+ <xsl:when test="contains(self::note,'ENSRNOP')">
240
+ <a target="_BLANK">
241
+ <xsl:attribute name="href">http://www.ensembl.org/Rattus_norvegicus/protview?peptide=<xsl:value-of select="text()"/></xsl:attribute>
242
+ <xsl:attribute name="title">View Ensembl Protein Report</xsl:attribute>
243
+ <span class="ensembl"><xsl:value-of select="text()" /></span>
244
+ </a>
245
+ </xsl:when>
246
+ <xsl:when test="contains(self::note,'ENSP')">
247
+ <a target="_BLANK">
248
+ <xsl:attribute name="href">http://www.ensembl.org/Homo_sapiens/protview?peptide=<xsl:value-of select="text()"/></xsl:attribute>
249
+ <xsl:attribute name="title">View Ensembl Protein Report</xsl:attribute>
250
+ <span class="ensembl"><xsl:value-of select="text()" /></span>
251
+ </a>
252
+ </xsl:when>
253
+ <xsl:otherwise>
254
+ <xsl:value-of select="text()" />
255
+ </xsl:otherwise>
256
+ </xsl:choose>
257
+ </SPAN>
258
+ </xsl:if>
259
+ </xsl:template>
260
+
261
+
262
+
263
+ </xsl:stylesheet>
264
+
@@ -10,11 +10,11 @@
10
10
  <note type="input" label="spectrum, fragment monoisotopic mass error units">Daltons</note>
11
11
  <note>The value for this parameter may be 'Daltons' or 'ppm': all other values are ignored</note>
12
12
  <note type="input" label="spectrum, parent monoisotopic mass error units">ppm</note>
13
- <note>The value for this parameter may be 'Daltons' or 'ppm': all other values are ignored</note>
13
+ <note>The value for this parameter may be 'Daltons' or 'ppm': all other values are ignored</note>
14
14
  <note type="input" label="spectrum, fragment mass type">monoisotopic</note>
15
- <note>values are monoisotopic|average </note>
15
+ <note>values are monoisotopic|average </note>
16
16
 
17
- <note>spectrum conditioning parameters</note>
17
+ <note>spectrum conditioning parameters</note>
18
18
  <note type="input" label="spectrum, dynamic range">100.0</note>
19
19
  <note>The peaks read in are normalized so that the most intense peak
20
20
  is set to the dynamic range value. All peaks with values of less that
@@ -1,3 +1,5 @@
1
+ <?xml version="1.0"?>
2
+ <?xml-stylesheet type="text/xsl" href="tandem-input-style.xsl"?>
1
3
  <bioml>
2
4
 
3
5
  <note>spectrum parameters</note>
@@ -3,6 +3,9 @@
3
3
  <bioml>
4
4
 
5
5
  <note>spectrum parameters</note>
6
+ <note type="input" label="spectrum, parent monoisotopic mass error minus">2.0</note>
7
+ <note type="input" label="spectrum, parent monoisotopic mass error plus">4.0</note>
8
+ <note>PRECURSOR MASS TOLERANCE. This is monoisotopic mass, so for non-accurate-mass instruments, for which the precursor is often taken nearer to the isotopically averaged mass, an asymmetric tolerance (-2.0 Da to 4.0 Da) is preferable. This somewhat imitates a (-3.0 Da to 3.0 Da) window for averaged mass (but not exactly).</note>
6
9
  <note type="input" label="spectrum, parent monoisotopic mass isotope error">no</note>
7
10
  <note type="input" label="spectrum, parent monoisotopic mass error units">Daltons</note>
8
11
  <note>The value for this parameter may be 'Daltons' or 'ppm': all other values are ignored</note>
@@ -15,14 +15,6 @@
15
15
  </note>
16
16
  <note type="input" label="list path, default parameters">no default</note>
17
17
 
18
- <note> MODIFICATIONS. No Default</note>
19
-
20
- <note type="input" label="protein, cleavage C-terminal mass change"></note>
21
- <note type="input" label="protein, cleavage N-terminal mass change"></note>
22
- <note type="input" label="protein, N-terminal residue modification mass"></note>
23
- <note type="input" label="protein, C-terminal residue modification mass"></note>
24
- <note> These are *static* modifications on the PROTEINS' N or C-termini. </note>
25
-
26
18
 
27
19
  <note>
28
20
  REFINEMENT. Not supported via tandem_search.rb.
@@ -8,7 +8,7 @@ require 'bio'
8
8
  class FastaDB
9
9
 
10
10
  def initialize(blast_database_file_path)
11
- env = Constants.new
11
+ env = Constants.instance
12
12
  @database = blast_database_file_path
13
13
  @makedbcmd = env.makeblastdb
14
14
  @searchdbcmd = env.blastdbcmd
@@ -2,17 +2,28 @@ $VERBOSE=nil
2
2
 
3
3
  require 'pathname'
4
4
 
5
+ # A GalaxyStager object represents a single file whose path needs to be staged for use within galaxy
6
+ #
7
+ # Staging occurs on init and generally involves creating a symlink from the original path to the staged path
8
+ #
9
+ # By keeping GalaxyStager objects around until script completion it is possible to perform a
10
+ # restore_references operation in script output files.
11
+ #
5
12
  class GalaxyStager
6
13
  attr_accessor :staged_path
14
+ attr_accessor :staged_base_path
7
15
 
16
+ # Initialize and perform staging
17
+ #
8
18
  def initialize(original_path, options = {})
9
19
  options = { :name => nil, :extension => '', :force_copy => false }.merge(options)
20
+
10
21
  @extension = options[:extension]
11
22
  @original_path = Pathname.new(original_path)
12
23
  @wd = Dir.pwd
13
24
  @staged_name = options[:name] || @original_path.basename
14
- @staged_base = File.join(@wd, @staged_name)
15
- @staged_path = "#{@staged_base}#{@extension}"
25
+ @staged_base_path = File.join(@wd, @staged_name)
26
+ @staged_path = "#{@staged_base_path}#{@extension}"
16
27
  if options[:force_copy]
17
28
  FileUtils.copy(@original_path, @staged_path)
18
29
  else
@@ -20,7 +31,7 @@ class GalaxyStager
20
31
  end
21
32
  end
22
33
 
23
- def replace_references(in_file)
34
+ def replace_references(in_file,replacement)
24
35
  GalaxyStager.replace_references(in_file, @original_path, replacement)
25
36
  end
26
37
 
@@ -12,40 +12,48 @@ class GalaxyUtil
12
12
  fg
13
13
  end
14
14
 
15
- def self.stage_pepxml(input_pepxml_path)
16
- stager = GalaxyStager.new(input_pepxml_path, :extension => ".pep.xml")
17
- stager
15
+ def self.stage_pepxml(input_pepxml_path,options={})
16
+ options = { :extension => '.pep.xml', :force_copy => false }.merge(options)
17
+ GalaxyStager.new(input_pepxml_path, options )
18
18
  end
19
19
 
20
- def self.stage_protxml(input_protxml_path)
21
- # This method takes in the path to a protxml created in Galaxy,
22
- # finds the dependent pepxml and peak lists (mzml files), creates
23
- # symbolic links to the peak lists with the correct extension and
24
- # and indexes them if needed (both seem required for TPP quant
25
- # tools) and then produces new protxml and pepxml files with paths
26
- # updated to these new peak list files.
27
-
28
- protxml_path="interact.prot.xml"
29
- FileUtils.copy(input_protxml_path, "interact.prot.xml")
30
-
31
- protxml = ProtXML.new(protxml_path)
32
- pepxml_path = protxml.find_pep_xml()
33
-
34
- protxml_stager = GalaxyStager.new(protxml_path, :extension => ".prot.xml", :force_copy => true)
35
- pepxml_stager = GalaxyStager.new(pepxml_path, :name => "interact", :extension => ".xml", :force_copy => true)
36
- pepxml_path = pepxml_stager.staged_path
37
- pepxml_stager.replace_references(protxml_path)
38
- runs = PepXML.new(pepxml_stager.staged_path).find_runs()
39
-
40
- run_stagers = runs.map do |base_name, run|
41
- run_stager = GalaxyStager.new(base_name, :extension => ".#{run[:type]}")
42
- ConvertUtil.ensure_mzml_indexed(run_stager.staged_path)
43
- run_stager.replace_references(pepxml_path, :base_only => true)
44
- run_stager
45
- end
46
-
47
- protxml_path
20
+ def self.stage_fasta(input_path,options={})
21
+ options = { :extension => '.fasta', :force_copy => false }.merge(options)
22
+ GalaxyStager.new(input_path, options )
48
23
  end
24
+
25
+
26
+ # Unused
27
+
28
+ # def self.stage_protxml(input_protxml_path)
29
+ # # This method takes in the path to a protxml created in Galaxy,
30
+ # # finds the dependent pepxml and peak lists (mzml files), creates
31
+ # # symbolic links to the peak lists with the correct extension and
32
+ # # and indexes them if needed (both seem required for TPP quant
33
+ # # tools) and then produces new protxml and pepxml files with paths
34
+ # # updated to these new peak list files.
35
+
36
+ # protxml_path="interact.prot.xml"
37
+ # FileUtils.copy(input_protxml_path, "interact.prot.xml")
38
+
39
+ # protxml = ProtXML.new(protxml_path)
40
+ # pepxml_path = protxml.find_pep_xml()
41
+
42
+ # protxml_stager = GalaxyStager.new(protxml_path, :extension => ".prot.xml", :force_copy => true)
43
+ # pepxml_stager = GalaxyStager.new(pepxml_path, :name => "interact", :extension => ".xml", :force_copy => true)
44
+ # pepxml_path = pepxml_stager.staged_path
45
+ # pepxml_stager.replace_references(protxml_path)
46
+ # runs = PepXML.new(pepxml_stager.staged_path).find_runs()
47
+
48
+ # run_stagers = runs.map do |base_name, run|
49
+ # run_stager = GalaxyStager.new(base_name, :extension => ".#{run[:type]}")
50
+ # ConvertUtil.ensure_mzml_indexed(run_stager.staged_path)
51
+ # run_stager.replace_references(pepxml_path, :base_only => true)
52
+ # run_stager
53
+ # end
54
+
55
+ # protxml_path
56
+ # end
49
57
 
50
58
 
51
59
 
@@ -7,7 +7,6 @@ class GFFDB
7
7
  attr_accessor :id_to_records_map
8
8
 
9
9
  def initialize(gff_file_path)
10
- env = Constants.new
11
10
  @database = gff_file_path
12
11
  @id_to_records_map={}
13
12
  @id_to_cds_map={}
@@ -29,9 +28,15 @@ class GFFDB
29
28
 
30
29
 
31
30
  def make_index(input_gff)
31
+ env=Constants.instance
32
+
32
33
  io = File.open(input_gff, "r")
34
+ env.log "Parsing Input GFF",:info
33
35
  gffdb = Bio::GFF::GFF3.new(io) #parses the entire db
34
36
 
37
+ num_records = gffdb.records.length
38
+ env.log "Indexing #{num_records}", :info
39
+
35
40
  # Now create the mapping from ids to records
36
41
  gffdb.records.each do |record|
37
42