lib/bio/db/gff/gffcomponent.rb in bio-gff3-0.8.5 vs lib/bio/db/gff/gffcomponent.rb in bio-gff3-0.8.6
- old
+ new
@@ -5,17 +5,19 @@
# Pjotr Prins <pjotr.prins@thebird.nl>
# License:: The Ruby License
#
# Fetch information from a GFF file
+require 'set'
+
module Bio
module GFFbrowser
module Helpers
module Record
- include Error
+ include Logger
# Format a record ID by, first, getting the ID attribute. If that fails
# the seqname is used with the start/stop positions.
def Record::formatID rec
id = rec.id if rec.id
if !id
@@ -31,15 +33,15 @@
end
end
module Gff3Component
- include Error
+ include Logger
- COMPONENT_TYPES = %w{
+ COMPONENT_TYPES = Set.new(%w{
gene SO:0000704 contig transcript Component region
- }
+ })
# Walk the component list to find a matching component/container for a
# record. First use the parent ID. If that is missing go by sequence
# name.
def find_component rec
@@ -78,16 +80,16 @@
end
module Gff3Features
# Ignore the following features (case sensitive?)
- IGNORE_FEATURES = Gff3Component::COMPONENT_TYPES + %w{
+ IGNORE_FEATURES = Gff3Component::COMPONENT_TYPES + Set.new(%w{
transposon Match similarity UTR
TF_binding_site intronSO:0000188 polyA_sequence SO:0000610
polyA_site SO:0000553
five_prime_UTR SO:0000204 three_prime_UTR SO:0000205
exon SO:0000147
- }
+ })
end
end
end
end