Class: GenomerPluginValidate::Validator::Gff3Attributes
- Inherits:
-
Genomer::Plugin
- Object
- Genomer::Plugin
- GenomerPluginValidate::Validator::Gff3Attributes
- Defined in:
- lib/genomer-plugin-validate/validator/gff3_attributes.rb
Instance Method Summary collapse
Instance Method Details
#run ⇒ Object
8 9 10 11 12 13 14 15 |
# File 'lib/genomer-plugin-validate/validator/gff3_attributes.rb', line 8 def run annotations. map{|attn| attn.attributes.map{|(k,v)| [k,attn] }}. flatten(1). select{|(term,_)| term =~ (/^[A-Z]/) }. reject{|(term,_)| valid_gff3_attributes.include? term }. map{|(term,attn)| "Illegal GFF3 attribute '#{term}' for '#{attn.id}'"} end |
#valid_gff3_attributes ⇒ Object
3 4 5 6 |
# File 'lib/genomer-plugin-validate/validator/gff3_attributes.rb', line 3 def valid_gff3_attributes %w|ID Name Alias Parent Target Gap Derives_from Note Dbxref Ontology_term Is_circular| end |