genevalidator 1.6.9 → 1.6.10
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 385bdeb501c790a57b5fd22fb431f8fcbff04b4f
|
4
|
+
data.tar.gz: 38297d81546366272db08cb00a7f2a4ae3319026
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1bfbc522536e0a08bbed42adba67110dd9193c315c3446dbfee1b54e3bce2e3b71ade70a8b18a28b232e952c4ca25f3a12bf166ca398bed8f67b9e740b7196f1
|
7
|
+
data.tar.gz: 388ed6ee18a07bec1ccecf71c3c99b6aad76da5a2c65255c0bc16fb489850a349056b2374a209d2052bd1a2fbe0a0fd17e298d75c3d433912c39277040a810e9
|
data/README.md
CHANGED
@@ -44,11 +44,18 @@ Each analysis of each query returns a binary result (good vs. potential problem)
|
|
44
44
|
### Installation Requirements
|
45
45
|
* Ruby (>= 2.0.0)
|
46
46
|
* NCBI BLAST+ (>= 2.2.30+) (download [here](http://blast.ncbi.nlm.nih.gov/Blast.cgi?PAGE_TYPE=BlastDocs&DOC_TYPE=Download)).
|
47
|
-
* MAFFT installation (download [here](http://mafft.cbrc.jp/alignment/software/)).
|
47
|
+
* MAFFT installation (>=7.273) (download [here](http://mafft.cbrc.jp/alignment/software/)).
|
48
48
|
* A web browser - [Mozilla FireFox](https://www.mozilla.org/en-GB/firefox/new/) & Safari are recommended. At the moment, it is not possible to use Chrome to view the results locally (as chrome does not allow ajax to local files). To avoid this, simply use a different browser (like Firefox or Safari) or start a local server in the results folder.
|
49
49
|
|
50
50
|
Please see [here](https://gist.github.com/IsmailM/b783e8a06565197084e6) for more help with installing the prerequisites.
|
51
51
|
|
52
|
+
#### Setting up a BLAST database
|
53
|
+
GeneValidator requires a protein BLAST database in order to fully analyse all sequences. The BLAST database needs to be set up with the `-parse_seqids` argument as follows:
|
54
|
+
|
55
|
+
```bash
|
56
|
+
makeblastdb -in input_db -dbtype prot -parse_seqids
|
57
|
+
```
|
58
|
+
|
52
59
|
### Installation
|
53
60
|
Simply run the following command in the terminal.
|
54
61
|
|
@@ -224,7 +231,7 @@ Lastly, a tabular summary of the results is also outputted in the terminal to pr
|
|
224
231
|
|
225
232
|
## Analysing the JSON output
|
226
233
|
|
227
|
-
There are numerous methods to analyse the JSON output including the [streamable JSON command line program](http://trentm.com/json/). The below examples use
|
234
|
+
There are numerous methods to analyse the JSON output including the [streamable JSON command line program](http://trentm.com/json/) or [jq](https://stedolan.github.io/jq/). The below examples use the JSON tool.
|
228
235
|
|
229
236
|
### Examplar JSON CLI Installation
|
230
237
|
After installing node:
|
@@ -253,7 +260,11 @@ $ json -f INPUT_JSON_FILE -A -e 'this.sort(function(a,b) {return (a.overall_scor
|
|
253
260
|
json -f INPUT_JSON_FILE -A -e 'this.sort(function(a,b) {return (a.overall_score < b.overall_score) ? 1 : ((b.overall_score < a.overall_score) ? -1 : 0);} );' > OUTPUT_JSON_FILE
|
254
261
|
```
|
255
262
|
|
263
|
+
The subsetted/sorted JSON file can then be passed back into GeneValidator (using the `-j` command line argument) to generate the HTML report for the sequences in the JSON file.
|
256
264
|
|
265
|
+
```bash
|
266
|
+
genevalidator -j SORTED_JSON_FILE
|
267
|
+
```
|
257
268
|
|
258
269
|
|
259
270
|
## Related projects
|
@@ -68,6 +68,14 @@ module GeneValidator
|
|
68
68
|
end
|
69
69
|
end
|
70
70
|
|
71
|
+
# Exception raised when the BLAST is not set up with the '-parse-seqids' arg.
|
72
|
+
class BLASTDBError < Exception
|
73
|
+
end
|
74
|
+
|
75
|
+
# Error raised by QI Validation when the query does not have QI tag
|
76
|
+
class NotEnoughEvidence < Exception
|
77
|
+
end
|
78
|
+
|
71
79
|
# Exception raised when the are alias duplications
|
72
80
|
class NoPIdentError < Exception
|
73
81
|
end
|
@@ -75,6 +75,12 @@ module GeneValidator
|
|
75
75
|
file = File.open(output_file, 'w+')
|
76
76
|
iterate_xml(file, db_type) if opt[:blast_xml_file]
|
77
77
|
iterate_tabular(file, db_type) if opt[:blast_tabular_file]
|
78
|
+
rescue BLASTDBError
|
79
|
+
$stderr.puts "*** BLAST Database Error: Genevalidator requires BLAST" \
|
80
|
+
" databases to be created with the '-parse_seqids argument."
|
81
|
+
$stderr.puts " See https://github.com/wurmlab/genevalidator" \
|
82
|
+
"#setting-up-a-blast-database for more information"
|
83
|
+
exit 1
|
78
84
|
rescue
|
79
85
|
$stderr.puts '*** Error: There was an error in analysing the BLAST'
|
80
86
|
$stderr.puts ' output file. Please ensure that BLAST output file'
|
@@ -92,6 +98,7 @@ module GeneValidator
|
|
92
98
|
n = Bio::BlastXMLParser::XmlIterator.new(opt[:blast_xml_file]).to_enum
|
93
99
|
n.each do |iter|
|
94
100
|
iter.each do |hit|
|
101
|
+
fail BLASTDBError if hit.hit_id =~ /\|BL_ORD_ID\|/
|
95
102
|
if db_type == 'remote' || hit.hit_id.nil?
|
96
103
|
file.puts FetchRawSequences.extract_from_remote_db(hit.accession)
|
97
104
|
else
|
@@ -109,6 +116,7 @@ module GeneValidator
|
|
109
116
|
headers: table_headers)
|
110
117
|
|
111
118
|
rows.each do |row|
|
119
|
+
fail BLASTDBError if row['sseqid'] =~ /\|BL_ORD_ID\|/
|
112
120
|
if db_type == 'remote' || row['sseqid'].nil?
|
113
121
|
file.puts FetchRawSequences.extract_from_remote_db(row['sacc'])
|
114
122
|
else
|
@@ -86,7 +86,7 @@ module GeneValidator
|
|
86
86
|
query = IO.binread(input_file, @query_idx[1], @query_idx[0])
|
87
87
|
parse_query = query.scan(/>([^\n]*)\n([A-Za-z\n]*)/)[0]
|
88
88
|
definition = parse_query[0].gsub("\n", '')
|
89
|
-
number = '
|
89
|
+
number = '-?\d*\.?\d*'
|
90
90
|
qi_match = definition.match(/QI:#{number}\|#{number}\|#{number}\|
|
91
91
|
#{number}\|#{number}\|#{number}\|
|
92
92
|
#{number}\|#{number}\|#{number}/x)
|
@@ -75,7 +75,7 @@ module GeneValidator
|
|
75
75
|
|
76
76
|
start = Time.now
|
77
77
|
|
78
|
-
number = '
|
78
|
+
number = '-?\d*\.?\d*'
|
79
79
|
match = @prediction.definition.match(/QI:#{number}\|(#{number})\|
|
80
80
|
(#{number})\|#{number}\|
|
81
81
|
#{number}\|#{number}\|#{number}\|
|
@@ -95,7 +95,7 @@ module GeneValidator
|
|
95
95
|
@validation_report
|
96
96
|
|
97
97
|
rescue NotEnoughEvidence
|
98
|
-
@validation_report = ValidationReport.new('
|
98
|
+
@validation_report = ValidationReport.new('No MAKER Quality Index',
|
99
99
|
:warning, @short_header,
|
100
100
|
@header, @description)
|
101
101
|
rescue
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: genevalidator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.6.
|
4
|
+
version: 1.6.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Monica Dragan
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2016-03
|
14
|
+
date: 2016-05-03 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: bundler
|